Following problems with our network we have re-installed SQL Server 7.0 on our server (called COMPANY_SERVER). For the previous couple of weeks we have been using a stand-in server with SQL Server installed (called COMPANY-MAIL-SERVER).
On restoring the SQL Server on COMPANY_SERVER our network team copied the 'Data' folder from the 'MSSQL7' directory on COMPANY-MAIL-SERVER to COMPANY_SERVER (including the 'master' database files. This was unknown to myself until recently. This came to light yesterday when two of the databases started to report errors leading us to the finding that the 'master' database had been copied from one server to another and that the attached databases file-names were pointing to our stand-in server with paths like 'COMPANY-MAIL-SERVER\\MSSQL7\Data\DatabaseName.mdf'. Some of the databases were OK as they had been attached using a file path like 'C:\MSSQL\Data\DatabaseName.mdf' which was valid on both servers. This problem was rectified by detaching databases and attaching the correct ones again.
We have now seen a further problem - the SQL Server on COMPANY_SERVER thinks that it is still called COMPANY-MAIL-SERVER (due to the copying of the 'master' database from server to server). When we issue the command 'SELECT @@SERVERNAME' on our install of SQL Server on our recovered COMPANY_SERVER we get the answer 'COMPANY-MAIL-SERVER' - I'm guessing this is due to an entry in the 'master' database ??
What is the best way to rectify this (setting the server-name to be 'COMPANY_SERVER' as was previously the case) ?
Is this achievable or is the best option to detach all databases, uninstall SQL Server, re-install and then re-attach the databases ?
Thanks in advance.
Steve
On restoring the SQL Server on COMPANY_SERVER our network team copied the 'Data' folder from the 'MSSQL7' directory on COMPANY-MAIL-SERVER to COMPANY_SERVER (including the 'master' database files. This was unknown to myself until recently. This came to light yesterday when two of the databases started to report errors leading us to the finding that the 'master' database had been copied from one server to another and that the attached databases file-names were pointing to our stand-in server with paths like 'COMPANY-MAIL-SERVER\\MSSQL7\Data\DatabaseName.mdf'. Some of the databases were OK as they had been attached using a file path like 'C:\MSSQL\Data\DatabaseName.mdf' which was valid on both servers. This problem was rectified by detaching databases and attaching the correct ones again.
We have now seen a further problem - the SQL Server on COMPANY_SERVER thinks that it is still called COMPANY-MAIL-SERVER (due to the copying of the 'master' database from server to server). When we issue the command 'SELECT @@SERVERNAME' on our install of SQL Server on our recovered COMPANY_SERVER we get the answer 'COMPANY-MAIL-SERVER' - I'm guessing this is due to an entry in the 'master' database ??
What is the best way to rectify this (setting the server-name to be 'COMPANY_SERVER' as was previously the case) ?
Is this achievable or is the best option to detach all databases, uninstall SQL Server, re-install and then re-attach the databases ?
Thanks in advance.
Steve