Daniel Fisher (lennybacon.com)

SOA, DATA & THE WEB

SQL Sever 2005 (YUKON) Review in short, #2

Ok, here is another one:

1. I add a login to my database server:

    EXEC sp_addlogin @Username, @Password, @Database;

This works fine!

2. I add a user, to a database by using the stored prcedure sp_adduser:

    Use [MyDB];
    EXEC sp_adduser @Username;

This also works fine!

3. I want to remove the user from the database. Therefor i use the stored prcedure sp_dropuser:

    EXEC sp_dropuser @Username;

This removes the user BUT what you'll see while digging deeper is that sp_adduser has created an SCHEMA and sp_dropuser don't cares a s%#t about that - it's still there after calling sp_dropuser :-(

Comments

Write a comment