My PC is Window XP Pro and I'm using Microsoft SQL Server 2005 Express and Microsoft SQL Server Management Studio Express.
My question is how to create a login userid and password under "SQL Server Authentication"? (as shown inhttp://www.findingsteve.net/print_screen.jpg)
Any tutorial about this I can read?
by using
Aspnet_regsql.exe
and here how to use ithttp://msdn2.microsoft.com/en-us/library/ms229862(VS.80).aspx
hope this well help
Hi mobi88, thanks for the reply.
Just wondering is your way the only way to create a user account for "SQL Server Authentication"?
Can that be done in Microsoft SQL Server Management Studio Express? Sorry if I ask stupid question. I just have no idea how it works.
When I choose "Window Authentication", I don't need to key in any username and password. So, I press Connect. And I went to "Security" > "Logins" to create a user id. Then, I went to login using that user id but it doesn't work. It says,
Cannot connnect to ...
Additional information:
--> Login failed for user 'xxx'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452)
Any guide?
|||sorry for the misunderstanding. the aspnet_regsql is to create the membership tables in side you database; now i think you have a problem with making connection with the DB. here if you want to connect with the DB with a user that you defined you must add this user your DB security directory, and give that user the permissions to connect and write to DB ( you might give the user DBOWNER permission, as you like) and after that you can connect your db with that user id as trusteed connection (for more information) when you use the windows authentication, you will be known as trusted user and the connection will be opened directly because your machine is a trusted user over the sql server!!.
to add a user to your db go to the security folder under the root of your sql server and add a new user there. and at the same screen from the user maping you can assign the new user to the DB's that you want and give the needed permissions
hope that will help.
|||I tried to do so but still can't. i even tried a user called "sa" but also received the same error mesg. Do I need to do anything with "Server type" and "Server name"?
Currently, my "Server type" is "Database engine" and my "Server name" is "ABC/SQLEXPRESS". ABC is my computer name.
Edited note: Thanks for the link. I already have my connection string in my web.config. Now, I just need to know how to create the userid I key in in web.config in SQL Server 2005.
|||the connection string must look like this
<connectionStrings>
<add name="PolKitap.Properties.Settings.mylibraryConnectionString"
connectionString="Server=.\SQLEXPRESS;Database=pollibDB;Uid=username;Pwd=password;"
providerName="System.Data.SqlClient" />
</connectionStrings>
but you must make sure that the user is assigned to the db as DBOWNER. and how to add new user to the db;
checkthis site
hope this will help this time :D
||| I think I still can't get it. But, thanks for all your help.
No comments:
Post a Comment