Jump to content

Stored Procedure


maelstorm

Recommended Posts

I am working on sql server.I need to write a stored procedure in one server to access data from a database in different server. is that possible???i tried,SELECT SNo, [Last Name], [First Name], MI, FROM servername.dbname.dbo.tablenamebut this seems to be not working.Thank you

Link to comment
Share on other sites

One thing I forgot to mention, you will need to add the server you want to connect to using the sp_addlinkedserver.Well, after further research on it, what you are wanting is linked servers. Here is a MSDN link that describes how to set it all up. You can even set it up so that you can access Access, Excel, or even a text file. Here is the link:http://msdn.microsoft.com/library/default....server_4uuq.aspHopefully that will be more informative than I could be.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...