Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server / September 2008

Tip: Looking for answers? Try searching our database.

Scripting Linked Servers

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tom Frost - 19 Sep 2008 20:44 GMT
Currently am in process of planning out a migration from SQL 2000 to SQL 2005
using the side by side approach.

What I'm curious to know is has anyone been able to script out SQL 2000
linked server objects complete witht their ID's and passwords for inclusion
into SQL 2005?

We have many servers and instances and this would be a time saver and
certainly more accurate if there's some script that i can take advantge of.

thanks
tom
Plamen Ratchev - 21 Sep 2008 04:58 GMT
Here is something that may be of help:
http://www.codeproject.com/KB/database/ScriptLinkedServers.aspx

Signature

Plamen Ratchev
http://www.SQLStudio.com

Tom Frost - 21 Sep 2008 15:24 GMT
thks for the link.

Tried out the process and seems to provide everything with the exception of
the password.
Was hoping that a way similar to sp_help_rev_login to SQL 2005 was available
to extract the password and insert into the script..

thks

> Here is something that may be of help:
> http://www.codeproject.com/KB/database/ScriptLinkedServers.aspx
Mark Han[MSFT] - 22 Sep 2008 08:38 GMT
Hi Frosty,

Thank you for contacting Microsoft Online Community Support. This is Mark.
I'm glad to assist you with the issue.

Since the password  is saved as hashed value in the sysxlogins table, it is
not allowed for us to retrieve it's original value; and in the stored
procedure sp_addlinkedsrvlogin, if we set the @rmtpassword as hashed value,
SQL Server will consider the hashed value as the remote password of the
linkedserver login; and then the remote password of the linkedserver login
will be changed.  For example:

the original  remote password of the linkedserver login is '123456'
the value '123456'  will be saved as hashed value in the sysxlogins table.
like
'0x1B654275B2AF870DFC056FF856075F19E353E34717DF11D2A3EBD1C0953C94F7096D4F651
8C7840DEEE5805484003ABD8418940D424DA647503FA416CA6A4A7608CBF06B88AD7DED'

If we run the following, SQL Server will consider the hashed value as the
remote password of the linkedserver login.
sp_addlinkedsrvlogin  @rmtsrvname = 'rmtsrvname' ,
    @useself = 'FALSE' ,
    @locallogin = 'locallogin',
    @rmtuser = 'rmtuser' ,
    @rmtpassword =
'0x1B654275B2AF870DFC056FF856075F19E353E34717DF11D2A3EBD1C0953C94F7096D4F651
8C7840DEEE5805484003ABD8418940D424DA647503FA416CA6A4A7608CBF06B88AD7DED'

Besides, the reason why we can use sp_help_rev_login to Transfer Logins and
Passwords Between SQL Servers is :
the statement of 'create login' allow the PASSWORD parameter be set as a
hashed value and SQL Server will translate the hashed value into a normal
vaule. There is an article to share with
you:http://msdn.microsoft.com/en-us/library/ms189751.aspx

Based on the above, I sum up the following methods for you to re-create the
linked server on SQL Server 2005
1. if you know every remote password, we can manually insert the value into
the script.

2. if the remote password is unavailable,  I suggest to re-set the password
of the login users on the linked server first and then manually insert the
new value of the password into the script.

Besides, I'm consulting the problem with our development team fro you.
However, based on my experience, they will not do changes regarding the
security consideration.

If you have any questions or concerns, please let me know.

I look forward to your update.

Thanks.

Best regards,
Mark Han
Microsoft Online Community Support
===========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
===========================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for
non-urgent issues where an initial response from the community
or a Microsoft Support Engineer within 1 business day is acceptable.
Please note that each follow up response may take approximately
2 business days as the support professional working with you may
need further investigation to reach the most efficient resolution.
The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by
contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
============================================================
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

=========================================================
Mark Han[MSFT] - 30 Sep 2008 12:17 GMT
Hi Frosty,

This is Mark. I'm writing to follow up the issue.

If anything I can assist you related to the technical issue, please let me
know.

I look forward to your update.

Best regards,
Mark Han
Microsoft Online Community Support
=========================================================
Delighting our customers is our #1 priority. We welcome your
comments and suggestions about how we can improve the
support we provide to you. Please feel free to let my manager
know what you think of the level of service provided. You can
send feedback directly to my manager at: msdnmg@microsoft.com.
=========================================================
Signature

This posting is provided "AS IS" with no warranties, and confers no rights.

=========================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.