Create table in a database with a test user

  • Hi All,

    I have created a new database in sql 2005, and created a test user. I want to create a table in the test user schema.

    Create table test(name varchar(3));

    It returns an error saying:

    Msg 2760, Level 16, State 1, Line 1

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

    I want to give only select, insert and delete privilege to this user. don't want this user to have dbo rights.

    Please help me in this regards.

    Thanks

  • Create schema for your teset user:

    CREATE SCHEMA [TESTUSER] AUTHORIZATION [TESTUSER]

    and then your table in that schema:

    CREATE TABLE testuser.test(name varchar(3))

  • Thanks for your help.

    It work

    Cheers

Viewing 3 posts - 1 through 2 (of 2 total)

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