January 16, 2014 at 12:00 pm
We use naming conventions for our SQL Servers and I'm having an issue getting the serverproperty(servername) match the @@servername.
I know that SQL controls the @@servername and I have that the way I need it, but how does one go about modifying the serverproperty(servername) to match the @@servername?
Example
@@servername = abcdevres01\devresinst1
serverproperty(servername) = abcdevres01\abcdevres01
I need the serverproperty(servername) to be the same as @@servername
Thanks in advance
Susan
January 16, 2014 at 12:22 pm
Here is a thread that discusses this.
http://www.sqlservercentral.com/Forums/Topic556439-146-1.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
January 16, 2014 at 1:06 pm
I did read that article and it's just about the sp_addserver which changes the @@servername.
I didn't see a solution in there to change the serverproperty(servername).
I'm thinking I may have to reinstall and try again
January 16, 2014 at 1:19 pm
These are actually different things. Why do they have to match? If you are using a named instance you will never get these to be the same. What is the end goal you are trying achieve?
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
January 16, 2014 at 2:25 pm
I have to follow a naming convention -
If I was able to connect to the SQL Server using the @@servername, it wouldn't be a problem.
But it only lets me connect using the serverproperty(servername).
January 16, 2014 at 3:29 pm
Susan-322874 (1/16/2014)
We use naming conventions for our SQL Servers and I'm having an issue getting the serverproperty(servername) match the @@servername.I know that SQL controls the @@servername and I have that the way I need it, but how does one go about modifying the serverproperty(servername) to match the @@servername?
Example
@@servername = abcdevres01\devresinst1
serverproperty(servername) = abcdevres01\abcdevres01
I need the serverproperty(servername) to be the same as @@servername
Thanks in advance
Susan
Use the following
exec sp_dropserver 'abcdevres01\abcdevres01'
exec sp_addserver 'abcdevres01\devresinst1', 'local'
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
January 16, 2014 at 3:50 pm
Thanks, but that just changes the value of the @@servername.
I uninstalled and installed SQL put in the correct instance name and am now good.
Thanks for your help
Susan
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply