An admin user with SQL authentication'


I've been asked to setup a new database called DB1 and

'set up an admin user with SQL authentication'

Any ideas how I do this in SQL Server 2005?

If I expand DB1
I see

What should I do next?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
go to the sql login, and add the server role server admin to that login
amoranAuthor Commented:
"go to the sql login"

Where is that?
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you should have a folder "security" (not on the database level, but on the server level), you can edit/create (SQL) logins there. on such a login, you can assign fixed server roles, among them a server admin role.
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

amoranAuthor Commented:
So I should create a new login?
With windows or SQL Server authentication?
And give them the server role 'server admin'?

amoranAuthor Commented:
Ok so I created a new login with sql server authentication and gave them the server role 'server admin'.

So this means that username can login to all databases I create?

>So this means that username can login to all databases I create?

You've only granted permissions at the server level. You also need to adminster security at the database level. Check out the user mapping dialog under Server Security and then also check out Security under each database.  
Guy Hengel [angelIII / a3]Billing EngineerCommented:
>>So this means that username can login to all databases I create?
if you grant server admin role, yes, it can login to all databases your have or will create on that server WITHOUT giving explicit database permissions!

if that is too much, to not assign that server admin role, but map the login to a user in the respective database(s), and grant the roles you want to give, for example the database owner  (db_owner) role.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AngelIII is right about server admins not requiring explicit grants for database permissions.  However, the question was about setting up an admin user, not an admin login (perhaps I'm interpreting to literally).  
amoranAuthor Commented:
Thanks guys ...
I'm trying to access the database from a SQLDataSource in an ASP.NET website.
When I configure the datasource the database shows up when I select the 'Use Windows Authentication' but not if I choose 'Use SQL Server Authentication' and enter the username and password that I created in SQL Server 2005.

Any ideas?

Like I said, check out the user mapping dialog under Server Security and then also check out Security under each database.  

Or try this:
Logon using SQL Server Management Studio using your SQL Server login. Then open a new query window and run:
"USE yourdatabase"
"SELECT USER".  Likely, whatever USER is reported back does not have the necessary permissions.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.