|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, June 12, 2012 12:23 PM
Points: 86,
Visits: 225
|
|
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.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Wednesday, April 11, 2012 9:11 AM
Points: 48,
Visits: 303
|
|
Try to create the objects using dbo i.e, dbo.objectname
Regards, VRR
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, June 12, 2012 12:23 PM
Points: 86,
Visits: 225
|
|
| I have tried and it get created like windowid.dbo.tablename :)
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Tuesday, August 07, 2012 6:53 PM
Points: 75,
Visits: 173
|
|
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
|
|
|
|