anushahanna
asked on
SERVERPROPERTY('SERVERNAME') & @@SERVERNAME
Even though both these come from the SQL installation, they are different. How could that have happened?
Are they looking at 2 diff source, even though they are derived from the installation?
Thanks
Are they looking at 2 diff source, even though they are derived from the installation?
Thanks
you're getting 2 different values? what are you getting?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
select SERVERPROPERTY('SERVERNAME ') is JMRW185422
select @@SERVERNAME is CO6849B546
select @@SERVERNAME is CO6849B546
ASKER
select SERVERPROPERTY('SERVERNAME ') corresponds correctly to the machine name and the default instance also.
renamed the server recently?
ASKER
renamed the server recently?
no.. just seen it lately.. so no workable issues with it...
no.. just seen it lately.. so no workable issues with it...
Have you changed computer name after the install
ASKER
I had not; at least after SQL install, computer name was not changed.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
just to change @@SERVERNAME?
*confused* Sorry, didn't realize this was still under discussion:
What happens if you execute:
sp_addserver 'local'
and then compare?
What happens if you execute:
sp_addserver 'local'
and then compare?
ASKER
Thanks Razmus,
just to confirm
with the current state being:
select SERVERPROPERTY('SERVERNAME ') is JMRW185422
select @@SERVERNAME is CO6849B546
you recommend the foll:
sp_addserver 'local'
to see if the 2 results will sync up?
just to confirm
with the current state being:
select SERVERPROPERTY('SERVERNAME
select @@SERVERNAME is CO6849B546
you recommend the foll:
sp_addserver 'local'
to see if the 2 results will sync up?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I ran sp_addserver 'local'
still
select SERVERPROPERTY('SERVERNAME ') is JMRW185422
select @@SERVERNAME is CO6849B546
should i restart the services?
still
select SERVERPROPERTY('SERVERNAME
select @@SERVERNAME is CO6849B546
should i restart the services?