From: Tibor Karaszi on
> Some of my mistakes was that I wanted to specify a user in the connection
> string (User Id) - instead I specified a login.

That is understandable. I sometimes wish for a simpler architecture and I
was slightly disappointed for this when MS released version 7.0 and didn't
re-architecture the login/users concept. (7.0 would have been the time to do
it, since that version broke backward compatibility in some many other
aspects.)


> However I get a 18456 error when trying to connect to my sqlserver
> database at my host, based on the connection details I provided with:
> server address, user id and password. I'm contacting my host to ask if
> they have any clue whats wrong

Tell them to look in the SQL Server errorlog file. This has the exact
reason. This isn't disclosed to the user (you) since it would give a
malicious user more information to narrow down the attack.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi



"Jeff" <it_consultant1(a)hotmail.com.NOSPAM> wrote in message
news:O$3G75bwKHA.812(a)TK2MSFTNGP06.phx.gbl...
> I finally managed to get it solved. I had to use the alter athorization
> command as Tibor suggested.
>
> Some of my mistakes was that I wanted to specify a user in the connection
> string (User Id) - instead I specified a login. Which it could be named
> Login Id instead of User Id in the connection string!
>
> However I get a 18456 error when trying to connect to my sqlserver
> database at my host, based on the connection details I provided with:
> server address, user id and password. I'm contacting my host to ask if
> they have any clue whats wrong
>
>
>
>
> "Tibor Karaszi" <tibor_please.no.email_karaszi(a)hotmail.nomail.com> wrote
> in message news:ODfIuT5vKHA.3408(a)TK2MSFTNGP06.phx.gbl...
>> Are you saying that you made ScriptLogin the owner of the database and
>> then try to add that login as a user to the database? That won't fly. The
>> owner of a database already *is* a user in the database: dbo. You can't
>> have a login as two different users in the same database.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>>
>>
>> "Jeff" <it_consultant1(a)hotmail.com.NOSPAM> wrote in message
>> news:#LL1CY4vKHA.5036(a)TK2MSFTNGP02.phx.gbl...
>>> I successfully ran this script:
>>> alter authorization on database :: myDb to ScriptLogin
>>>
>>> Then I try to create a new user in the database and associate it with
>>> the new login, then I get this eror:
>>> "The login has already an account under a different user name (Microsoft
>>> Sql Server, Error: 15063)"
>>> I tryed this many times and each time I get error. I've also created
>>> totally new logins (which don't have user associated with). and I get
>>> the same error... The same happend above. ScriptLogin is a new login I
>>> created, when creating I specified that default database should be myDb.
>>> After creating login I ran the above script. Then I thought I needed to
>>> create the user in the database - bang there the error appeared again
>>>
>>> any suggestions?
>>>
>>>
>
>
From: Jeff on
>> However I get a 18456 error when trying to connect to my sqlserver
>> database at my host, based on the connection details I provided with:
>> server address, user id and password. I'm contacting my host to ask if
>> they have any clue whats wrong
>
> Tell them to look in the SQL Server errorlog file. This has the exact
> reason. This isn't disclosed to the user (you) since it would give a
> malicious user more information to narrow down the attack.

I'm unable to ping the database server from my computer, thinks that is the
problem.

Wonder also if I need to create some exceptions in my firewall so that sql
server managment studio can connect (doubt that is the problem)