Sunday, February 12, 2012

Can't connect to database due to Windows authentication

I am using SQLServer 2000 and for reasons unknown the name of the server got
changed so that it did not match the name of the machine. I discovered this
when our application could not connect to the database.
I changed the servername using:
exec sp_dropserver 'SSM_6000_A', 'droplogins'
exec sp_addserver 'SSM_6000_C', 'local'
I stopped and started the server and when I checked the name of the server
using
SELECT @.@.SERVERNAME
I got the correct name, SSM_6000_C
I still could not connect to the database but I thought I had to recreate
the logins.
I deleted one of the users and logins and tried to recreate it and I get the
error:
"ERROR15401: WindowsNT user or group 'user-name' not found. Check
the name again."
The server is on our network. I can go to folders, etc. on the network once
I log in using my network account.
What is wrong?
Is there someplace within SQLServer that did not get the server name change?
Where can I check?
I went to a DTS package and was configuring a query in an Execute SQL Task
and the server name was the old name.
Thanks for your help!!
GloriaTo create new logins you can use EM, but login are only existing windows
user names, so if you use windows only authentication, you can add only
existing windows user names for new logins.
Regards,
Daniel
"Gloria" <Gloria@.discussions.microsoft.com> wrote in message
news:B17D383B-15DC-40C7-92EB-8A2F5B3CEB60@.microsoft.com...
> I am using SQLServer 2000 and for reasons unknown the name of the server
got
> changed so that it did not match the name of the machine. I discovered
this
> when our application could not connect to the database.
> I changed the servername using:
> exec sp_dropserver 'SSM_6000_A', 'droplogins'
> exec sp_addserver 'SSM_6000_C', 'local'
> I stopped and started the server and when I checked the name of the server
> using
> SELECT @.@.SERVERNAME
> I got the correct name, SSM_6000_C
> I still could not connect to the database but I thought I had to recreate
> the logins.
> I deleted one of the users and logins and tried to recreate it and I get
the
> error:
> "ERROR15401: WindowsNT user or group 'user-name' not found. Check
> the name again."
> The server is on our network. I can go to folders, etc. on the network
once
> I log in using my network account.
> What is wrong?
> Is there someplace within SQLServer that did not get the server name
change?
> Where can I check?
> I went to a DTS package and was configuring a query in an Execute SQL Task
> and the server name was the old name.
> Thanks for your help!!
> Gloria
>|||Hi Daniel,
I only want to create user names from Windows logins. The problem is EM
won't let me create Windows logins.
When I try to create a new login by picking a name from the domain list, I
get the error message:
"Error15401:WindowsNT user or group 'domain\user_name' not found.
Check the name again."
I checked the servername to make sure after I changed it that if matches the
machine name and it does. Is it possible that somewhere in the bowels of
SQLServer the servername did not get changed and this mismatch is causing th
e
problem?
If so, how can I check this?
Does it check in the registry somewhere the name of the server?
Thanks again,
Gloria
"Daniel Joskovski" wrote:

> To create new logins you can use EM, but login are only existing windows
> user names, so if you use windows only authentication, you can add only
> existing windows user names for new logins.
> Regards,
> Daniel
> "Gloria" <Gloria@.discussions.microsoft.com> wrote in message
> news:B17D383B-15DC-40C7-92EB-8A2F5B3CEB60@.microsoft.com...
> got
> this
> the
> once
> change?
>
>|||Hi
You could also try to take the server out of your domain, and then join it
to the domain again. Sometimes you have to take a server out of the domain
before it's properly "connected" to the AD again - especially when you mess
around with servernames.
Regards
Steen
Gloria wrote:[vbcol=seagreen]
> Hi Daniel,
> I only want to create user names from Windows logins. The problem is
> EM won't let me create Windows logins.
> When I try to create a new login by picking a name from the domain
> list, I get the error message:
> "Error15401:WindowsNT user or group 'domain\user_name' not found.
> Check the name again."
> I checked the servername to make sure after I changed it that if
> matches the machine name and it does. Is it possible that somewhere
> in the bowels of SQLServer the servername did not get changed and
> this mismatch is causing the problem?
> If so, how can I check this?
> Does it check in the registry somewhere the name of the server?
> Thanks again,
> Gloria
> "Daniel Joskovski" wrote:
>|||Hi
What do you mean by "taking the server out of the domain"? Does our Network
Adminstrator have to take it off of the network and then add it again?
I can connect to our company network using the computer the SQL Server is on
but the SQL Server does not recognize it. Is there a way I can disconnect
then reconnect just the SQL Server?
Is this what typically happens when you change the servername?
What is the correct procedure?
Thanks,
Gloria
"Steen Persson" wrote:

> Hi
> You could also try to take the server out of your domain, and then join it
> to the domain again. Sometimes you have to take a server out of the domain
> before it's properly "connected" to the AD again - especially when you mes
s
> around with servernames.
> Regards
> Steen
> Gloria wrote:
>
>|||Hi Gloria
You might have to have your network administrator to do this. It will
require an account that has admin priveledges on your domain.
I don't know if there is a "correct procedure" for changing a servername,
but generally I'd take the server out of the domain - change the name and
then join the server to the domain again. This is not only relevant for
SQLServer, but for every kind of servers. In some cases you can get away
with just renaming the server while it's still a member of the domain, but
in some cases you see weird things and problems afterwards. Therefore I
prefer to do the steps above.
IMHO you shouldn't change a servername without knowing the consequences it
can have on the network. If you don't know about how to remove and join a
server to/from a Domain, I think you should leave the name change to
somebody else...:-).
Regards
Steen
Gloria wrote:[vbcol=seagreen]
> Hi
> What do you mean by "taking the server out of the domain"? Does our
> Network Adminstrator have to take it off of the network and then add
> it again?
> I can connect to our company network using the computer the SQL
> Server is on but the SQL Server does not recognize it. Is there a
> way I can disconnect then reconnect just the SQL Server?
> Is this what typically happens when you change the servername?
> What is the correct procedure?
> Thanks,
> Gloria
> "Steen Persson" wrote:
>|||Hi,
I agree that you should not change things without knowing the consequences
but when you are trying to fix a problem and the documentation is inadequate
,
you do the best you can.
The original problem was that our application could not connect to the
database. I discovered that the machine name and the SQLServer name did not
match. Now the computer that has SQLServer is connected to the network and
works fine. The domain is recognized by the computer. Changing the server
name to match the machine name should allow the network domain to be
recognized by SQLServer, shouldn't it?
When you select Windows authentication and the network domain and user names
are shown, where is this coming from?
Doesn't SQLServer use the same information when connecting to the network as
the computer does?
Thanks,
Gloria
"Steen Persson" wrote:

> Hi Gloria
> You might have to have your network administrator to do this. It will
> require an account that has admin priveledges on your domain.
> I don't know if there is a "correct procedure" for changing a servername,
> but generally I'd take the server out of the domain - change the name and
> then join the server to the domain again. This is not only relevant for
> SQLServer, but for every kind of servers. In some cases you can get away
> with just renaming the server while it's still a member of the domain, but
> in some cases you see weird things and problems afterwards. Therefore I
> prefer to do the steps above.
> IMHO you shouldn't change a servername without knowing the consequences it
> can have on the network. If you don't know about how to remove and join a
> server to/from a Domain, I think you should leave the name change to
> somebody else...:-).
> Regards
> Steen
>
> Gloria wrote:
>
>|||Hi
Since your problem is with the NTAuthentication and Domain name, it could
very well be that the server and/or Domain Controller isn't in "sync". Since
there has been messed with the servernames, the first thing I'd try would be
to re-join the server to the domain. In the AD you have a lot of pointers
and settings (DNS, SPN, WINS etc.) that holds a servername. If you just
change a servername when the server are in the Domain, some of these might
not be correctly updated where others will. This can very well cause a
number of weird issues that isn't explainable. When you take the server out
of the domain, the AD will remove all the references to the "old"
servername. When you then join the server back into the domain with the new
name, it will be correctly updated throughout the entire domain and all
pointers and references will be refreshed to reflect the new name.
It might not be the reason or solution in your case, but it's quite easy to
do so it would definately do one the first thing I'd try.
Regards
Steen
Gloria wrote:[vbcol=seagreen]
> Hi,
> I agree that you should not change things without knowing the
> consequences but when you are trying to fix a problem and the
> documentation is inadequate, you do the best you can.
> The original problem was that our application could not connect to the
> database. I discovered that the machine name and the SQLServer name
> did not match. Now the computer that has SQLServer is connected to
> the network and works fine. The domain is recognized by the
> computer. Changing the server name to match the machine name should
> allow the network domain to be recognized by SQLServer, shouldn't it?
> When you select Windows authentication and the network domain and
> user names are shown, where is this coming from?
> Doesn't SQLServer use the same information when connecting to the
> network as the computer does?
> Thanks,
> Gloria
> "Steen Persson" wrote:
>|||Hi Steen,
Many, many thanks. Worked like a charm!!
Gloria
"Steen Persson" wrote:

> Hi
> Since your problem is with the NTAuthentication and Domain name, it could
> very well be that the server and/or Domain Controller isn't in "sync". Sin
ce
> there has been messed with the servernames, the first thing I'd try would
be
> to re-join the server to the domain. In the AD you have a lot of pointers
> and settings (DNS, SPN, WINS etc.) that holds a servername. If you just
> change a servername when the server are in the Domain, some of these might
> not be correctly updated where others will. This can very well cause a
> number of weird issues that isn't explainable. When you take the server ou
t
> of the domain, the AD will remove all the references to the "old"
> servername. When you then join the server back into the domain with the ne
w
> name, it will be correctly updated throughout the entire domain and all
> pointers and references will be refreshed to reflect the new name.
> It might not be the reason or solution in your case, but it's quite easy t
o
> do so it would definately do one the first thing I'd try.
> Regards
> Steen
> Gloria wrote:
>
>

No comments:

Post a Comment