Modify a linked server using a T-SQL script
- Last UpdatedJan 04, 2023
- 1 minute read
- PI System
- PI SQL Client OLEDB 2021
- Developer
Once the linked server is created, you cannot modify its parameters. However, you can recreate it using a T-SQL script and modify the parameters that way. Use the following procedure to recreate a linked server with modified parameters.
-
Start SSMS and connect to the database engine.
-
Right-click the existing linked server and click Script Linked Server as > CREATE To > New Query Editor Window.
-
Right-click the existing linked server and click Delete.
The Delete Object window appears.
-
Confirm the selected linked server, click OK, and then click Yes.
The linked server is deleted.
-
In the query window, edit the script as needed to modify the parameters of the linked server.
For details on parameter settings, see Configure a linked server using a T-SQL command.
-
Click Execute.
The linked server is created. You may need to refresh the list of linked servers to see it.