|
-
Jan 22nd, 2024, 04:11 AM
#1
Re: [dbo] vs [erp] tables
[erp] and [dbo] are different schemas. Think of this as namespace in .Net, a logical separation of db object that object names accross different schemas do not collide. Another possible use of db schemas is permission assignment -- a user can have read/write permissions on [erp] schema but read-only on [dbo] or no access at all.
When creating and accessing objects in your db (tables, views, sps, etc.) you can prefix object name with optional schema name like CREATE TABLE erp.MyTable or CREATE PROC dbo.usp_MyProc
When schema is omitted from object names query planner uses default schema for the current db user which is dbo for sa login (server administrators) and this default resolution might fail for non-admins and/or lead to permission problems.
cheers,
</wqw>
-
Jan 22nd, 2024, 06:32 AM
#2
Re: [dbo] vs [erp] tables
 Originally Posted by wqweto
[erp] and [dbo] are different schemas....
cheers,
</wqw>
Thank you for that.
For others who may stumble on this, if the schema does not exist, you cannot create a table in it. You can create schemas using this,
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers. A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________ Last edited by kebo : Now. Reason: superfluous typo's
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|