create username and password in sqlserver 2008

  • Hello everyOne

    I want add username and password to my DataBase and use it in my connection string in Asp.Net WebApp, But I don't know how I can do it.

    for example: datasource=(local);initialcatalog=.;uid=username;password=password;

    That connection string is just an example and may be incorrect!:-D

    I have Sqlserver 2008, Vs2008.

  • Databases don't have logins and passwords, servers do. You need to add a SQL login to the SQL instance. If you're sysadmin or security admin you can do it yourself, otherwise ask your DBA.

    Management studio, open object explorer and connect to the server. Expand out security, right-click logins -> new login

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • For connection string try this link

    http://www.connectionstrings.com/[/url]

    for creating users please read BOL

    http://msdn.microsoft.com/en-us/library/ms173463.aspx

    Nag
    ------------------------------------------------
    How to get the best help on a forum

    http://www.sqlservercentral.com/articles/Best+Practices/61537

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply