As part of an install procedure I needed to run an "exec" statement against our SQL Server database. The name of the actual Windows 2000 server is "sql-server2k" which causes the statement to come back in error.
We have tried using single as well as double quotation marks but still no luck.
We were going to simply change the server name but SQL Server 2000 is configured to this name and if we amend and therefore restart we won't be able to use SQL to run the statement ?
What I would like to know is,
1) Is there anyway we can amend the statement to run against the server, or can you not reference server names that include a hyphen.
2) A colleague mentioned to me that there is a table that stores what the server name is. Is this true and can you amend it to run this statement ?
Any help on this would be grateful, thanks.
We have tried using single as well as double quotation marks but still no luck.
We were going to simply change the server name but SQL Server 2000 is configured to this name and if we amend and therefore restart we won't be able to use SQL to run the statement ?
What I would like to know is,
1) Is there anyway we can amend the statement to run against the server, or can you not reference server names that include a hyphen.
2) A colleague mentioned to me that there is a table that stores what the server name is. Is this true and can you amend it to run this statement ?
Any help on this would be grateful, thanks.