Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sureshjevani
Starting Member
3 Posts |
Posted - 2015-04-28 : 17:09:54
|
Can someone help me with the syntax of scripting out the linked server. Thanksna |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-04-28 : 17:21:17
|
I would bet that you can't as the GUI tools weren't that great back then. You can easily write the code for them using Books Online as a guide.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-04-28 : 17:27:12
|
Did linked servers even exist in 7.0? My recollection is that they were added in 2000, but I could be wrong. It's been about 15 years since I've worked on 7.0.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
sureshjevani
Starting Member
3 Posts |
Posted - 2015-04-29 : 12:30:12
|
Yes they did exist in sql 7.0 but there is no option to script them out. Someone told me that there is a way to script them out in sql 7.0. Please help me with this issue. Thanksna |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2015-04-29 : 12:44:32
|
I don't have a way to help out. I don't have a 7.0 system to be able to even poke around.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
Kristen
Test
22859 Posts |
Posted - 2015-04-29 : 13:18:14
|
Dunno if any of this helps / worked back then, they are from snippets of code that I have lying around, which might have been "current" back then.EXEC sp_linkedserversLists the linked servers. Could probably take the resultset output from that into a table and then use that to generate a script to EXEC sp_addlinkedserver to add each one.Resultset (According to Books Online) was:Column name Data type Description =========== ========= ===========SRV_NAME sysname Name of the linked server. SRV_PROVIDERNAME nvarchar(128) Friendly name of the OLE DB provider managing access to the specified linked server. SRV_PRODUCT nvarchar(128) Product name of the linked server. SRV_DATASOURCE nvarchar(4000) OLE DB data source property corresponding to the specified linked server. SRV_PROVIDERSTRING nvarchar(4000) OLE DB provider string property corresponding to the linked server. SRV_LOCATION nvarchar(4000) OLE DB location property corresponding to the specified linked server. SRV_CAT sysname OLE DB catalog property corresponding to the specified linked server. My oldest copy of Books Online refers to a table [sysoledbusers] under "Linked Servers". Not sure why it links to that one, rather than something more obviously useful. I can't find anything in BoL for "System Tables" that includes the word "link" The [sysservers] table has a column [isremote] which indicates 1=Remote but 0=Linked |
|
|
|
|
|