Showing posts with label backup. Show all posts
Showing posts with label backup. Show all posts

Sunday, March 11, 2012

Connecting to another SQL Server

Hi,

We are using two databases Live and Contingency. Everyday Backup is
taken and restored the same on Contingency Server. Cotingency Server act
as Live when Live server goes down.

I need to Connect to Contingency Server from Live Server through my
Stored Procedure to Stop/Delete particular Job running on Contingency
Server. Please, can anyone help me in this.

Sun

*** Sent via Developersdex http://www.developersdex.com ***What about set up a Linked Server , from Contingency to LIve ?

--
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
"Sun G" <sun_x22@.yahoo.com> wrote in message
news:5SwUf.6$Ea7.783@.news.uswest.net...
> Hi,
> We are using two databases Live and Contingency. Everyday Backup is
> taken and restored the same on Contingency Server. Cotingency Server act
> as Live when Live server goes down.
> I need to Connect to Contingency Server from Live Server through my
> Stored Procedure to Stop/Delete particular Job running on Contingency
> Server. Please, can anyone help me in this.
>
> Sun
> *** Sent via Developersdex http://www.developersdex.com ***

Friday, February 17, 2012

Connecting a user from a backup database to a new login

All,
In SQL Server 2000, I loaded a backup file into a new local database.
The database has an existing user which owns several stored procedures,
tables, etc.
Using SQL Server authentication, I want to create a login of the same
name as the user, so that when I login, I have access to the objects
owned by that user without having to prefix the objects with the owner
name.
For instance exec sp_mystoredproc instead of exec
ownername.sp_mystoredproc. (In fact, several of the stored procedures
exec other procedures without the owner name prefix and to go add the
owner will be a tedious process)
When I try to add login and grant the login name to the existing user
it tells me it already exists.
I cannot drop the existing user because it owns a whole bunch of
objects.
What can I do to work around this? How do I connect a login to an
existing database user? Is there a system table where I can just map
the two?
Brad> What can I do to work around this? How do I connect a login to an
> existing database user? Is there a system table where I can just map
> the two?
See the sp_change_users_login stored procedure in the Books Online. Also,
the Best Practice is to always schema-qualify objects.
Hope this helps.
Dan Guzman
SQL Server MVP
"brad" <brad.eckrose@.gmail.com> wrote in message
news:1168719405.103237.233140@.38g2000cwa.googlegroups.com...
> All,
> In SQL Server 2000, I loaded a backup file into a new local database.
> The database has an existing user which owns several stored procedures,
> tables, etc.
> Using SQL Server authentication, I want to create a login of the same
> name as the user, so that when I login, I have access to the objects
> owned by that user without having to prefix the objects with the owner
> name.
> For instance exec sp_mystoredproc instead of exec
> ownername.sp_mystoredproc. (In fact, several of the stored procedures
> exec other procedures without the owner name prefix and to go add the
> owner will be a tedious process)
> When I try to add login and grant the login name to the existing user
> it tells me it already exists.
> I cannot drop the existing user because it owns a whole bunch of
> objects.
> What can I do to work around this? How do I connect a login to an
> existing database user? Is there a system table where I can just map
> the two?
> Brad
>