I created a login to connect to SQL SERVER.
create login bobLogin with password = 'bobpass' , default_database = bobDB
but when i am connecting sql server using this, it does not connects? because it needs a user.
so i created a user:
create user bobDB_USER for login bobLogin
then i connected to sql server using bobLogin & tried to create table:
create table bobDbTable(eid int)
which gives permission denied error;
so i granted permission:
GRANT CREATE TABLE TO bobDB_USER
then i again connected using bobLogin, & tried to create a table but it gave error:
The specified schema name “dbo” either does not exist or you do not have permission to use it.
why so? its creating the table in the dbo schema, thats why? so how do i grant him this permission ?
i dont want to create a new schema. is it necessary?
You would need to
GRANT ALTER ON SCHEMA::dbo TO bobDB_USERto allow objects to be created in the dbo schema.I would also use a Role too.
However, you could add
bobDB_USERintodb_ownerif it requires these rightsNote: end user permissions are quite different to admin type rights. If ‘bobDB_USER’ is an end user, then they should not be creating objects