tgru (tgru@devdex.com) writes:
> I am trying to script out the creation of database scripts. I am trying
> to use @@servername in the statement. I found out the select
> @@servername returns NULL. I used sp_dropserver to drop any servernames
> first, restarted SQL, ran sp_addserver 'servername' to add the
> servername, restarted SQL. select @@servername still returns NULL...
>
> Any ideas why this may be happening?
Did you specify 'local' as the second parameter to sp_addserver?
--
Erland Sommarskog, SQL Server MVP,
esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp