Table creation with schema owner of current login windows ID.

  • Hi,

    I have a problem...when i create any table or Stored Procedure it is going to create with my windows login like citi\ruslan.Employees

    instead of

    dbo.Employees

    I know how to change it after creation but i want to know how i can fix it when i should create any object it should have dbo owner instead of my windows id.

    Please help.

  • Try to create the objects using dbo i.e, dbo.objectname

    Regards,

    VRR

  • I have tried and it get created like windowid.dbo.tablename 🙂

  • This was happened because your NT login created with default schema with your login other than dbo.

    Try to varify what's in default_schema_name:

    SELECT * FROM

    sys.database_principals

    where name like '%<your login>%'

    See what the default_schema_name is.

    I believe the default_schema_name is your login.

    Then ask your administrator to change your default schema in the database that you are trying to use, as you do not have permission to change the default schema.

    He might have to use the following command.

    USE <your database>

    ALTER USER [<your nt login>] WITH DEFAULT_SCHEMA = dbo

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

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