Under SQL Server 2000.
I have a DTS Package which runs a query in an Execute SQL Task which references @@servername. This works fine.
However, when I did a "save as" to copy the package to another server, and execute the package on the new server, @@servername strangely appears to return the name of the original server rather than the new one, in the query inside the package.
But if I run SELECT @@servername from Query Analyser on the new server it returns the name of the new server as expected.
Does anyone know what is wrong?
I have a DTS Package which runs a query in an Execute SQL Task which references @@servername. This works fine.
However, when I did a "save as" to copy the package to another server, and execute the package on the new server, @@servername strangely appears to return the name of the original server rather than the new one, in the query inside the package.
But if I run SELECT @@servername from Query Analyser on the new server it returns the name of the new server as expected.
Does anyone know what is wrong?