Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sathishmangunuri
Starting Member
32 Posts |
Posted - 2011-04-12 : 05:01:43
|
Hi ,I have logged into server with particular user credentials and created some table.Now I need get the details of those tables which are created by this user.Help me please....Thanks in advance......sathish |
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-12 : 05:38:21
|
Hey sorry I don't know whether you can get user idIf you know what time you created tables then you can filter that time in sys.objects table Note: Assuming that no one is created any other tables at that time. Or YOuu can do one thing if its not production server and you don't need that all tables you created then you need to restore that database with your latest backup.Raghu' S |
 |
|
sathishmangunuri
Starting Member
32 Posts |
Posted - 2011-04-12 : 05:43:48
|
If i pass the object name ,i should get the user name? how?sathish |
 |
|
raghuveer125
Constraint Violating Yak Guru
285 Posts |
Posted - 2011-04-12 : 05:53:48
|
Ok I think there is no table which keep track of objects created by user. Until you created Trigger to store this information in other tableRaghu' S |
 |
|
sathishmangunuri
Starting Member
32 Posts |
Posted - 2011-04-12 : 06:42:04
|
I found principal_id column in both sys.server_principals table and sys.tables,but sys.tables table has null values....where as sys.server_principals table holds unique value for one user.....Is there any way to resolve this?sathish |
 |
|
|
|
|