0

I want to create a connection from my local SQL Server to the production enviroment SQL Server so that I can perform certain tasks.

is that possible ?

2
  • 1
    yes. you can. You have problem creating a linked server ? Commented Sep 13, 2018 at 12:42
  • Hi, you'll need to be a bit more specific about what you're trying to do, and where you're having problems. What are the "certain tasks" you want to perform? Have you done any research about "linked servers" already? Have you attempted to set anything up? If so, what problems have you encountered? Commented Sep 13, 2018 at 14:19

1 Answer 1

1

Yes it is possible. What you need to do is to setup a linked server environment. Assuming the prod environment you are referring to uses uses SQL Server, you can set it up as follows:

USE [master]  
GO  
EXEC master.dbo.sp_addlinkedserver   
    @server = N'YourServerName\InstanceNameIfAny',   
    @srvproduct=N'SQL Server' ;  
GO

To test the linked server you just setup, run this:

SELECT name FROM [YourServerName\InstanceNameIfAny].master.sys.databases 

This will return the names of the databases on the linked server.

If you are more comfortable with GUI, here is what you can do instead:

In SSMS, Expand Server Objects -> Linked Servers -> (Right click on the Linked Server Folder and select “New Linked Server”)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.