vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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? Thanks, TGru *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
| |||
| 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 |
| ||||
| Erland is the man!! Thanks, I battle syntax on a daily basis... TGru *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |