January 27, 2011 at 1:01 am
How can i check in a database that a table is created by which user?
is their some query to know that which table was created by which user
NEVER NEVER EVER GIVE UP;-)
January 27, 2011 at 1:14 am
Hi!
I don't think you can find out without using triggers.
__________________________
Allzu viel ist ungesund...
January 27, 2011 at 3:06 am
It'll be in the default trace if it was recent enough, otherwise no way without having had a DDL trigger present at time of creation.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 1, 2011 at 12:03 pm
My question is somewhat related to the original question...
Whether the database owner is the database creator as well? I mean is there any way to find out who created a specific database? I've checked a few dbs of mine and the owner is ALPHA\USER1. Does this mean that that specific NT user created the DB? Thank you and I'm sorry if this is a dumb question. 😛
__________________________
Allzu viel ist ungesund...
February 1, 2011 at 12:44 pm
No creater and owner isn't the same thing. You can chose the owner of db when created them.
February 1, 2011 at 12:59 pm
Thanks for your time and response.
I came across this though it applies to 2K:
http://msdn.microsoft.com/en-us/library/aa258257%28v=sql.80%29.aspx
"Each database has an owner who has the ability to perform special activities in the database. The owner is the user who creates the database. The database owner can be changed with sp_changedbowner."
So basically the creator becomes the owner by default. Correct?
__________________________
Allzu viel ist ungesund...
February 1, 2011 at 1:01 pm
Yes. I prefer to set it to sa. If the account that owns the database goes away, funny things happen.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
February 1, 2011 at 1:04 pm
GilaMonster (2/1/2011)
Yes. I prefer to set it to sa. If the account that owns the database goes away, funny things happen.
sa need mixed mode ?
February 1, 2011 at 1:32 pm
No. The login exists even in windows authen. It just can't be used unless mixed mode enabled
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply