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-01-12 : 08:35:56
|
| Mark writes "The server on which we have SQL Server 7 has crashed but we managed to copy out all of the D: drive which contains the SQL Server installation, database files, etc.Without having taken database backups before the crash, is there any way to rebuild the SQL Server installation on a different machine using only those directories and files which we copied? We're hoping to rebuild not only the databases but (more importantly) the DTS packages as well.Any help would be appreciated!Thanks & regards,Mark" |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-01-12 : 13:19:28
|
| You could try sp_attach_db using the MDFs and LDFs but it doesn't always work. It does when you copy these files once the MSSQLSERVER service is stopped OR you ran sp_detach_db prior to the copy.Tara |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-01-13 : 19:29:31
|
1. Install SQL 7 on the new server drive D with the same directory structure as the old server and apply the SQL Server service packs to get to the same level as the old server.2. Shutdown SQL Server, and rename the directory with the databases, probably D:\MSSQL7\Data to D:\MSSQL7\DataOld3. Create a new directory with the same name, D:\MSSQL7\Data, and copy all of the database files to the new directory. Copy any other database files to directories with the exact same Drive\directory name as the old server.4. Start SQL Server. If it starts OK you are good.5. You might want to update the server name in master.dbo.sysservers to reflect the new server name, and to get the value of @@servername to match the new server name. I forget the exact procedure for that, but it's the row with srvid = 0. You have to restart SQL Server after you do this.quote: Originally posted by AskSQLTeam Mark writes "The server on which we have SQL Server 7 has crashed but we managed to copy out all of the D: drive which contains the SQL Server installation, database files, etc.Without having taken database backups before the crash, is there any way to rebuild the SQL Server installation on a different machine using only those directories and files which we copied? We're hoping to rebuild not only the databases but (more importantly) the DTS packages as well.Any help would be appreciated!Thanks & regards,Mark"
Codo Ergo Sum |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2005-01-14 : 16:43:15
|
Code to update the server name in sysserversuse mastergo-- Allow updates to system tablesexec sp_configure @configname = 'allow updates' , @configvalue = '1'goreconfigure with override goexec sp_configurego--exec sp_help sysservers-- Display the current valuse from sysserversselect * from sysserversselect srvname from sysservers where srvid = 0select datasource from sysservers where srvid = 0select srvnetname from sysservers where srvid = 0select [@@servername] = @@servernamedeclare @newname sysname-- Enter new server nameselect @newname = 'NEWSERVERNAME'update sysserversset srvname = @newname ,datasource = @newnamewhere srvid = 0go-- Turn off updates to system tablesexec sp_configure @configname = 'allow updates' , @configvalue = '0'goreconfigure with override goexec sp_configurego-- Shutdown SQL Server and restart it after changing the server name to update quote: Originally posted by Michael Valentine Jones 5. You might want to update the server name in master.dbo.sysservers to reflect the new server name, and to get the value of @@servername to match the new server name. I forget the exact procedure for that, but it's the row with srvid = 0. You have to restart SQL Server after you do this.
Codo Ergo Sum |
 |
|
|
|
|
|
|
|