Create a user with db owner access level in SQL server

I have a database in SQL server 2000 I want to migrate this database to SQL server 2005. I have created the database login in SQL server 2005 that the user in DB SQL 2000 uses. I then want to be sure if the user has the DB_OWNER role on the database. I can check this using the SP_HELPLOGINS sotored procudure, if there is not a entry for my loginname on the restored sql2005 db and a memeberOf the db_owner role, how do I create that user or update it so it does have db_owner access. I can do this through the studio but dont know the SQL syntax for it.
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.

to give it access to the role:

exec sp_addrolemember 'db_owner', 'yourusername'

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
m3housingAuthor Commented:
cheers dude your a legend, I thought I might be able to do it when I created a user so was searching the web for that syntax.
Well...Im certainly not a legend, but I appreciate the complement....glad to help.
Robert SilverSr. Software EngineerCommented:
or you can type in the sql and click on execute within sql Management studio:

create login xyz with password='pwd',check_policy=off, check_expiration=off,default_database=xyzdb;
create user xyz for login xyz;

You may have to run the sp_srvrolemember 'currentuser', 'sysadmin';   first to have ample
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
Oracle Database

From novice to tech pro — start learning today.