Wednesday, March 21, 2012

Drop table , procedure Problems

Hi,
I'm creating table, procedure from my c# codings in sql server.
I'm having database owner rights.
My problem is sometimes the table, procedure is created with
username.tablename instead of dbo.tablename. so i'm unable to drop that
table or procedure while my c# program is run by some other user.Kindly
suggest me a way to create table, procedure as dbo.tablename,
dbo.procedurename.how to drop the tables and procedures created by an
another user.What are the rights i required to create table,procedure
as dbo.tablename, dbo.procedurename in sql server 2000
Thanks & Regards,
ManiBOL says
The dbo is a user that has implied permissions to perform all activities in
the database. Any member of the sysadmin fixed server role who uses a
database is mapped to the special user inside each database called dbo.
Also, any object created by any member of the sysadmin fixed server role
belongs to dbo automatically.
For example, if user Andrew is a member of the sysadmin fixed server role
and creates a table T1, T1 belongs to dbo and is qualified as dbo.T1, not as
Andrew.T1. Conversely, if Andrew is not a member of the sysadmin fixed
server role but is a member only of the db_owner fixed database role and
creates a table T1, T1 belongs to Andrew and is qualified as Andrew.T1. The
table belongs to Andrew because he did not qualify the table as dbo.T1.
The dbo user cannot be deleted and is always present in every database.
Only objects created by members of the sysadmin fixed server role (or by the
dbo user) belong to dbo. Objects created by any other user who is not also a
member of the sysadmin fixed server role (including members of the db_owner
fixed database role):
a.. Belong to the user creating the object, not dbo.
b.. Are qualified with the name of the user who created the object
<plmanikandan@.gmail.com> wrote in message
news:1163675950.788703.71100@.i42g2000cwa.googlegroups.com...
> Hi,
> I'm creating table, procedure from my c# codings in sql server.
> I'm having database owner rights.
> My problem is sometimes the table, procedure is created with
> username.tablename instead of dbo.tablename. so i'm unable to drop that
> table or procedure while my c# program is run by some other user.Kindly
> suggest me a way to create table, procedure as dbo.tablename,
> dbo.procedurename.how to drop the tables and procedures created by an
> another user.What are the rights i required to create table,procedure
> as dbo.tablename, dbo.procedurename in sql server 2000
> Thanks & Regards,
> Mani
>|||> Kindly
> suggest me a way to create table, procedure as dbo.tablename,
> dbo.procedurename.
CREATE TABLE dbo.tblname(...)
CREATE PROC dbo.procname ... AS ...
> to drop the tables and procedures created by an
> another user.
DROP TABLE username.tblname
DROP PROC username.procname
> What are the rights i required to create table,procedure
> as dbo.tablename, dbo.procedurename in sql server 2000
db_ddladmin, db_owner or higher.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<plmanikandan@.gmail.com> wrote in message
news:1163675950.788703.71100@.i42g2000cwa.googlegroups.com...
> Hi,
> I'm creating table, procedure from my c# codings in sql server.
> I'm having database owner rights.
> My problem is sometimes the table, procedure is created with
> username.tablename instead of dbo.tablename. so i'm unable to drop that
> table or procedure while my c# program is run by some other user.Kindly
> suggest me a way to create table, procedure as dbo.tablename,
> dbo.procedurename.how to drop the tables and procedures created by an
> another user.What are the rights i required to create table,procedure
> as dbo.tablename, dbo.procedurename in sql server 2000
> Thanks & Regards,
> Mani
>sql

No comments:

Post a Comment