Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQl Authentication

Author  Topic 

stevenchoon
Starting Member

8 Posts

Posted - 2006-05-28 : 21:28:11
Dear everyone,
Me agains,
i have a problems in my sql server 2005 Authentication
cant anyone tell me how to set the SQL authentication for server 2005?

i use the following coding for connection but it cant log to my sql server...

Conn.Open "Provider=SQLOLEDB;Data Source=WIN-40508040D1F\SQLEXPRESS;UID=sa;PWD=693087;DATABASE=Hotel"

the error said
Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.

how 2 set the proper UID and PWD?

thanks in advance..









steven

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-05-28 : 21:38:57
open ssms, right click the server name, then select properties
go to security and change to sql server and windows authentication mode for server authentication

also, create a proper sql login instead of using sa

--------------------
keeping it simple...
Go to Top of Page

stevenchoon
Starting Member

8 Posts

Posted - 2006-05-28 : 22:11:10
Dear jen,
Thanks for replying me,
i follow ur step
which i change to sql server and windows authentication mode for server authentication

for creating the proper sql login,
I go 2 security in the server which
security>login>sa
i try change the password at their but it dont work...
did i do that things right?
can you tell how to create the proper sql login.thank...


steven
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-05-28 : 22:24:08
go to security, logins, right click on the right pane, add new login

it also helps to check BOL for more information

--------------------
keeping it simple...
Go to Top of Page

stevenchoon
Starting Member

8 Posts

Posted - 2006-05-28 : 23:30:04
Even i create the new login i still cant login with SQL server.

i create the new login for "saaa" and put password as 693055 for example.(i click the enforce paasword policy)
but when i go 2 the saaa properties, the password is more than 6(lenght)
became(11lenght)-is that normal?

and when i try to login when open the ssms(their is one pop up login message)
i clcik the sql authentication..... d option is emty(or supose their is some login selection)


steven
Go to Top of Page

cmdr_skywalker
Posting Yak Master

159 Posts

Posted - 2006-05-29 : 00:23:13
the password is already encrypted, thus, don't expect to you can retrieve it using SSMS. When you say, you can't login, we assume from your code. Where do you exactly run your code, from local machine or from somewhere else? in your workstation, try this, open the the SMS, login as sa/693087 (or the username/password you will use in the app, assuming you have already created them and set the authentication to mixed) and type the WIN-40508040D1F\SQLEXPRESS as your server. Can you connect or does it generate the error?

May the Almighty God bless us all!
Go to Top of Page

stevenchoon
Starting Member

8 Posts

Posted - 2006-05-29 : 01:28:44
I run my code on my local mechine,
i try open sms before and login as sa/693087(yes, username and password that i use in my app)
with that server

it generate the error of
"the connection wass success fully create, but error occur during the lohin process
no process is in other end of the pipe
error 233.

for the "assuming you have already created them and set the authentication to mixed"
wuld u mind to teach me how to set the new loging account at the begining.
coz the account that i create cant not successfully login in server..
did i really miss something??


steven
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-05-29 : 02:15:53
when you login using sql authentication on ssms, did you supply the loginame and password?

how did that go?

--------------------
keeping it simple...
Go to Top of Page

stevenchoon
Starting Member

8 Posts

Posted - 2006-05-29 : 03:17:23
Dear everyone,
I slove my problems oready,
I just simply reinstall the sql server.......
i dont know why...
but however, thanks a lot for u all.....

Here is another question..
can we change the pc servics pack 1 to 2 without formating?
steven
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-05-29 : 03:59:12
"can we change the pc servics pack 1 to 2 without formating"
Yes. Definately


KH

Go to Top of Page
   

- Advertisement -