Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Table creation with schema owner of current login windows ID.


Table creation with schema owner of current login windows ID.

Author
Message
Imran-Yasir
Imran-Yasir
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 245
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.
VRR
VRR
Valued Member
Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)Valued Member (50 reputation)

Group: General Forum Members
Points: 50 Visits: 303
Try to create the objects using dbo i.e, dbo.objectname

Regards,
VRR
Imran-Yasir
Imran-Yasir
SSC-Enthusiastic
SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)SSC-Enthusiastic (110 reputation)

Group: General Forum Members
Points: 110 Visits: 245
I have tried and it get created like windowid.dbo.tablename Smile
Terry-239890
Terry-239890
SSC Journeyman
SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)SSC Journeyman (75 reputation)

Group: General Forum Members
Points: 75 Visits: 189
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search