SQL 2005 Grant Connection

I'm trying to grant connection privileges to a new database I have created on my server to and existing domain group.
I am a Domain Admin.

No matter what I try in get these error messages;

Msg 15151, Level 16, State 1, Line 1
Cannot find the object 'DatabaseName', because it does not exist or you do not have permission.

Obviously I am know SQL security Expert.

grant insert, delete, update on [Database] to [Domain\Group]

Cannot find the object [Database], because it does not exist or you do not have permission.
LVL 4
Greg RowlandSoftware Designer, SysDBA, WebMaster OwnerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

ste5anSenior DeveloperCommented:
You cannot grant DML permissions on database level.

What permission do you want to grant to your group?

When its connect, then it's for server level:
GRANT CONNECT SQL TO [Domain\Group

Open in new window

Vitor MontalvãoMSSQL Senior EngineerCommented:
You may want to read my article about accounts in SQL Server before you going further.
Deepak ChauhanSQL Server DBACommented:
You have to add your domain ID in sql server login and map this login with the desired database.
A login who has sysadmin\securityadmin permissions in sql server can create a login.

here is the script to acheive this.

Create login <domain\loginID> from windows
go
use <database name>
go
Create user <domain\loginID> for login <domain\loginID>
go

Grant select , insert , update, delete on schema::dbo to <domain\loginID>

If you assign sysadmin role to your login  in sql server , you do not need to any thing at database level. You will have full access on this server.

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
SolarWinds® Network Configuration Manager (NCM)

SolarWinds® Network Configuration Manager brings structure and peace of mind to configuration management. Bulk config deployment, automatic backups, change detection, vulnerability assessments, and config change templates reduce the time needed for repetitive tasks.

Greg RowlandSoftware Designer, SysDBA, WebMaster OwnerAuthor Commented:
My SQL Server has been in service for a long time.

There are many existing Databases that have been in use for a long time.
All the connections and grants work fine.

Created a new Database and my application users cant connect.
Vitor MontalvãoMSSQL Senior EngineerCommented:
There are many existing Databases that have been in use for a long time
(...)
Created a new Database and my application users cant connect.
Your problem is not the existing ones but with new ones. Creating a database won't give existing users permissions to access it. You'll need to give them the correct permissions. Above it's explained how you can do it.
Greg RowlandSoftware Designer, SysDBA, WebMaster OwnerAuthor Commented:
Can't remember what I did, you'll were a big help though
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.