I have a web app, designed using VWD Express and using SQL 2005 Express. It has a mdf database called "client". It was created using security of windows authentication. I have already changed my instance of sql server express to accept mixed windows and sql authentication.
How do I change my "client" database's permissions to the sql authentication? I need to add a user name and password as a requirement for my web host to be able to attach the mdf to their instance of sql 2005. It has to be the same user and password as I use with my web host's sql server 2005.
Thank you in advance.
Hi mlg74,
Not very sure what you mean. Do you mena that, since you are going to upload your database to web hoster, you want to create a sql user name and password for your database?
If my understanding is correct, based on my understanding,you have no need to do that. Database authentication is managed by database administration tools, not your database file itself(the mdf file).So, you can just upload your mdf file to the web host and ask for a sql user name & password.
BTW, since you were using windows authentication before, you need to modify your connection string after authentication mode changed to "sql authentication". You can do that by simply remove "Intergrated Security=True" and add "User ID=username;Password=psw".
Sample: <add name="constr_name" connectionString="Data Source=Server IP;Initial Catalog="DatabaseName";User ID=User Name;Password=PSW"
providerName="System.Data.SqlClient" />
If you also want to use sql authentication mode on your local machine, make sure you have sql management studio express downloaded https://www.microsoft.com/downloads/details.aspx?familyid=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796&displaylang=en. You can create a new sql authentication name/password through Security-->logins-->New logins in Management Studio Express.
Hope my suggestion helps
|||I know you are right, but my webhoster obviously doesn't know what they are doing. They told me I had to have the same usr name and password on my local machine as I do on the sqlserver 2005 on their server. But I am using windows authentication on my local express edition, but they said I had to make the passwords match anyway. The first time I uploaded the database files to the server for them to attach, I could no longer access my database on their server. So that's when I changed my authentication to mixed mode and had them re-attach it. But your saying it makes no difference, becasue those values are not stored in the .mdf, or .ldf files at all.
What I did to finally make it work, was after they attached it, again I could not access it on their server. So out of frustration, I deleted it off their server and was going to start over. But when I created a new db on the server, I used the same password and username, and when it created, it was my attached db files, so I was happy! That was weird, and it's odd, how some webhosters dont know how to handle sql server 2005.
No comments:
Post a Comment