Link to home
Start Free TrialLog in
Avatar of drigovt
drigovtFlag for Israel

asked on

when trying to do sp_addserver 'HOST', local - I'm getting an error.

We are running Altiris Deployment server (HP), and I had some query problems.
The error was the the server is unknown and that I need to run "sp_addlinkedserver" in order the query to work. But it didn't. So then I read that I should check the name in the SQL by doing "select @@servername" if the name is different to do this:

sp_dropserver <whatever was returned by @@servername>
go
sp_addserver '<the correct name>', local
then restart the server.

But now I'm getting this error:
Msg 15028, Level 16, State 1, Procedure sp_MSaddserver_internal, Line 89
The server 'SERVER'' already exists.

I think it has something to do with the "sp_addlinkedserver".

Now when I run "select @@servername" I get "NULL".

What should I do ?

Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

please show the results of

select * from master.sys.databases
Avatar of drigovt

ASKER

master,1,NULL,0x01,2003-04-08 09:13:36.390,90,SQL_Latin1_General_CP1_CI_AS,0,MULTI_USER,0,0,0,0,ONLINE,0,0,0,1,ON,0,3,SIMPLE,2,CHECKSUM,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,00000000-0000-0000-0000-000000000000,0,0,NOTHING,0
tempdb,2,NULL,0x01,2007-10-28 20:42:00.190,90,SQL_Latin1_General_CP1_CI_AS,0,MULTI_USER,0,0,0,0,ONLINE,0,0,0,0,OFF,0,3,SIMPLE,0,NONE,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,557BCE35-0A81-4895-AA53-CC96C16A1DF1,1,4,ACTIVE_TRANSACTION,0
model,3,NULL,0x01,2003-04-08 09:13:36.390,90,SQL_Latin1_General_CP1_CI_AS,0,MULTI_USER,0,0,0,0,ONLINE,0,0,0,0,OFF,0,1,FULL,2,CHECKSUM,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,00000000-0000-0000-0000-000000000000,0,2,LOG_BACKUP,0
msdb,4,NULL,0x01,2005-10-14 01:54:05.240,90,SQL_Latin1_General_CP1_CI_AS,0,MULTI_USER,0,0,0,0,ONLINE,0,0,0,1,ON,0,3,SIMPLE,2,CHECKSUM,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,B9E465C7-E4BF-45DA-8889-B7FFF8EA57B6,1,0,NOTHING,0
eXpress,5,NULL,0x010500000000000515000000F85CC67B1A2D2E5FB32B37024B320000,2007-05-16 14:36:10.177,90,SQL_Latin1_General_CP1_CI_AS,0,MULTI_USER,0,0,0,0,ONLINE,0,0,0,0,OFF,0,2,BULK_LOGGED,2,CHECKSUM,1,1,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,A4ECBF2A-134C-4B1E-829E-ABD8433D6360,1,2,LOG_BACKUP,0
Avatar of drigovt

ASKER

a shorter version:

master      1      NULL
tempdb      2      NULL
model      3      NULL
msdb      4      NULL
eXpress      5      NULL
sorry :( wrong table/view

select * from master.sys.servers
Avatar of drigovt

ASKER

0      ALTIRIS1      SQL Server      SQLNCLI      ALTIRIS1      NULL      NULL      NULL      0      0      0      1      1      0      0      1      NULL      0      0      0      0      0      0      2007-10-28 20:41:31.077
1      ALTIRIS      SQL Server      SQLNCLI      ALTIRIS      NULL      NULL      NULL      0      0      0      1      1      1      0      1      NULL      0      0      0      0      0      0      2007-10-28 20:46:00.773

Shorter Version:
---------------------

0      ALTIRIS1      SQL Server      SQLNCLI      ALTIRIS1      NULL      NULL
1      ALTIRIS      SQL Server      SQLNCLI      ALTIRIS      NULL      NULL
Avatar of drigovt

ASKER

I don't know why I have two names, But I can just assume that the old name was ALTIRIS1 and now the hostname is ALTIRIS.
sp_dropserver 'ALTIRIS1', local
sp_dropserver 'ALTIRIS', local

and then:
sp_addserver 'ALTIRIS', local

gives me the message that the name is already there....
Avatar of drigovt

ASKER

Also,

Now I have this error when I try to do any action in the Altiris Dep. Server:

"the cursor does not include the table being modified or the table is not updatable through the cursor"
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of drigovt

ASKER

ok.
Now the table is this:

0      ALTIRIS      SQL Server      SQLNCLI      ALTIRIS      NULL      NULL

I need to restart the server before trying to run anything in the altiris Dep. server ?
Avatar of drigovt

ASKER

Now I get, "Server 'ALTIRIS' is not configured for DATA ACCESS"
yes, restarting is a good idea.
Avatar of drigovt

ASKER

Thank You very much!!!
Everything is working!!!