creating database user SQL 2005

Posted on 2012-08-16
Last Modified: 2012-08-16
I'm trying to create a new database user so that I can use connection from my visual studio. there seems to be something I'm missing when I created the user in SQL management Studio. what I did was ;

Right click Security in SQL Management Studio, then 'New Login'
Under General,
Type user name, password, select SQL authentication.
Select default database which I want to give access.

Under ServerRoles,
Select all roles
Select the database I want to access with the login under User Mapping, then give all role memberships for the db.

Under Securable,

Under status,
Grant and Enable

Now, when I try to connect from my Visual Studio, it times out. But from SQL Management studio, I was able to login and open any table under the mapped database.

connections string in web.config

<add name="aConn" connectionString="Data Source=SQL_SERV\SQL2005;Initial Catalog=db1;Uid=db1user;Pwd=xxxxx;Connect Timeout=120" providerName="System.Data.SqlClient"/>
Question by:crcsupport
    LVL 39

    Accepted Solution

    is your SQL Server running as an instance? If yes only then is should be aclled as "SQL_SERV\SQL2005" (computer_name\instance_name)otherwise just by its name which I presume is "SQL2005"
    LVL 1

    Author Comment

    Thank you.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
    Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now