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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-03-03 : 08:19:00
|
| Nick Duckstein writes "SQL Server 2000, SP3Windows 2000, SP4I'm working on a project where upgraded SQL Server from one box to the next. We didn't want to retore master to the new box because we were suspect of problems in master.We were able to script out all the logins and reattach databases. We also scripted out all the linked servers and added those as well.The problem comes when attempting to run the scripts to restore the linked server logins. Everything works great except for the passwords.The sp_addlinkedsrvlogin doesn't allow for an encrypted password. I can probably dig the passwords up and enter them in manually but I wanted to script the whole thing out. I also tried exporting sysxlogins data to a text file using the following query in a DTS package from the old server:select l.srvid, l.sid, l.xstatus, l.xdate1, l.xdate2, l.name, l.password, l.dbid, l.languagefrom sysxlogins l inner join sysservers s on l.srvid = s.srvidwhere l.srvid is not null and l.sid is not null and s.srvname != @@SERVERNAMEThen I reimported them into the new server using the following code.create table #tsysxlogins ( [srvid] [smallint] NULL , [sid] [varbinary] (85) NULL , [xstatus] [smallint] NOT NULL , [xdate1] [datetime] NOT NULL , [xdate2] [datetime] NOT NULL , [name] [sysname] NULL , [password] [varbinary] (256) NULL , [dbid] [smallint] NOT NULL , [language] [sysname] NULL ) --Look at options for BULK INSERTBULK INSERT #tsysxlogins FROM '\\devts061\e$\nicduc\RemoteLogins.txt' WITH ( FIELDTERMINATOR = '|', ROWTERMINATOR = '\n' )--(I made sure the srvid matched in both server first)EXEC sp_configure 'allow updates', '1'goRECONFIGURE WITH OVERRIDEgoinsert into sysxloginsselect * from #tsysxloginsgoEXEC sp_configure 'allow updates', '0'goRECONFIGURE WITH OVERRIDEThe remote logins get added to the correct linked servers but the access fails. I know it a password issue because if I change the password manually it works fine.Any help would be much appreciated." |
|
|
|
|
|
|
|