Additional logins to SQL 2008 database

Discussion in 'Databases' started by Polybius, Jan 21, 2009.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I've just opened a new websiteaccount at DASP with SQL Server 2008 database, and I need to create an additional login. Why would a developer/customer at DASP want to create an additional login?

    Of course the main reason is because the main login (for example SQL2008_000321_myDB_user) is too powerful to risk using it formy web application.

    Instead most of us developersdesire to create an additional login that hassimply "db_datareader" and "db_datawriter" abilities, but no ability to do more dangerous things like alter table structure etc.

    To create a new login, DASP has a very nice tool at its SQL 2008 Database Manager, called Login Manager. I used this to create a new login named, let's say, "WebApp123".

    Then, I followed the directions atthe Knowledge Base article conveniently available at that Login Manager page:

    KB ID:189 How do I assign additional SQL logins to my SQL 2008 database?

    So far so good.

    But when I use my SQL 2008 Management Studio to inspect my database at DASP, and I try, following the instructions of said KB article,to create a new User, I fail. Instead I get error msg:

    User, group or role 'WebApp123' already exists in the current database. (Microsoft SQL Server, Error: 15023)</BLOCKQUOTE>
    On closer inspection I notice that the Login Manager tool at DASP automaticallycreated not only a new Login "WebApp123", but also created a new Role "WebApp123". Andhaving that Role presentis what is preventing me from creating a User "WebApp123".

    It seems to me that the DASP Login Manager tool should not create a Role at all.

    Either that, or the KB article is certainly out of date. Or, I've done something wrong.

    Can anybody help me on this?

    Thanks in advance.






    Polybius
     
  2. JorgeR

    JorgeR DiscountASP.NET Staff

    I believe that you may have done something different. The login Manager will not create a Role when you create a login in the Control Panel. We recommend that you create a ticket in the support portal and advise with images on the error that you experience so that we are able to see the problem. It is possible that if you restored the database and the the user that you added in the control panel is a orphaned user in the database, you will not be able to add the user.


    junior

    DiscountASP.NET

    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page