grant permission help need - Error Msg 2760,

  • Hi,

    Please give me suggestion, how to resolve this issue?

    --create Login script

    --use master

    CREATE LOGIN test1

    WITH PASSWORD = 'SMTStest_1';

    --use database name

    --create user script

    CREATE USER test1 FOR LOGIN test1

    WITH DEFAULT_SCHEMA = dbo;

    GO

    --alter script to change which is assgin database this user.

    ALTER LOGIN [test1] WITH DEFAULT_DATABASE=[test]

    --Grant permission

    GRANT CREATE TABLE TO [test1];

    create table test3 (id_clo int)

    Msg 2760, Level 16, State 1, Line 1

    The specified schema name "dbo" either does not exist or you do not have permission to use it.

  • Have you run down the obvious, like do you have the appropreate rights? Or You need to run under correct database and correct schema.

    :cool:

    "There are no problems! Only solutions that have yet to be discovered!"

  • Yes, I have correct schema (dbo) and user name.

    1. Login - test1 with pw ( default db is test)

    2. query editor - USE database name

    3. create table - but till facing same error.

    rgds

    ananda

  • But do you have the permissions to use it?

    :cool:

    "There are no problems! Only solutions that have yet to be discovered!"

  • It seems like you are not authorized to create login using deault schema. check the permissions you have on the server.

    Abhijit - http://abhijitmore.wordpress.com

  • yes, I have full permission to use this server.

    I login with sa user.. after that create one database name is test,

    then create login, user etc.. and give command

    grant create table to test1 ( user).

    thanks

    ananda

  • I suggest that you check both logins sys.database_permissions: http://msdn.microsoft.com/en-us/library/ms188367.aspx

    :cool:

    "There are no problems! Only solutions that have yet to be discovered!"

  • Hi,

    As per you suggest this URL, I am not getting clearly,

    so can you explain default schema(dbo) not able to give grant permission to particular user for create table, view, function, procedure, execute, insert, update, alter table column to developer

    these permission how to assign to developer(SQL user) with default schema (DBO).

    Thanks

    ananda

  • Please refer the link on CREATE TABLE :- http://msdn.microsoft.com/en-us/library/ms174979.aspx

    --------------------------------------------------------------------

    Copying the permissions section from the link for easy reference

    Permissions:-

    Requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created.

    ----------------------------------

    Means you should grant the following too

    GRANT ALTER ON SCHEMA::dbo TO test1.

  • you need to have dbowner privileges to create table. Thanks

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply