Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 sql security

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-29 : 10:34:19
Mike writes "Is there a way to run a stored procedure from one database and have it update another database if you have the updated database userid and password passed to the stored procedure?? The databases are on the same server of course. Example:
I have a database named 'test1'. I have admin permissions to 'test1'. I want to pass a userid and password to a stored procedure on 'test1' and have it update database 'test2' using the userid and password passed. I hope I don't sound too confusing........
thanx
mike"

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-04-29 : 18:58:15
I'm sure there's some sort of convoluted way to write a sproc that calls a job that executes a VBScript to log into database 2 and update it, but why not just grant the necessary rights and update it directly using 3-part naming of your table: dbname.ownername.tablename?

Go to Top of Page
   

- Advertisement -