Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

invoke stored procedure of another database

Status
Not open for further replies.

ykfc

Programmer
Mar 6, 2004
66
0
0
AU
My stored procedure, say sp_aa is a sysobject of Database a.
Can I code in sp_aa to invoke another stored procedure sp_bb that is a sysobject of database b? If yes, what is the syntax?

 
If DatabaseB is on the same server as DatabaseA) ...

exec DatabaseB.dbo.sp_bb

If DatabaseB is on another server

exec ServerB.DatabaseB.dbo.sp_bb

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top