Thursday, March 22, 2012

Calling procs on other databases

Hi. I am currently working between sql server 2000 and 2005. I have written procs in 2005 using some new native features. I wish to remain using 2000 and just call and get return values from procs on 2005 Database. Procs on 2005 DB only access tables on that DB and vice versa.

Is there a way to call stored procedures across Servers?

Cheers,

Ewen

Yes.

Use the four part object name: server.database.schema.object

Of course, security will have to be set up properly.

|||Look up linked servers in books online. Setting it up is not terribly hard. Then use the four part names where you put the linked server name before the database name: server.database.schema/owner.procedureName

No comments:

Post a Comment