| Author |
Topic |
|
REDDY
Starting Member
43 Posts |
Posted - 2003-11-13 : 12:07:11
|
| Is there any way to find the date, when a perticular column is added to a table??Thanks in advanceReddy |
|
|
nic
Posting Yak Master
209 Posts |
Posted - 2003-11-13 : 12:21:44
|
| Do you mean a new row is added? If so you could create a trigger that adds a datatime stamp on an insert.If you really mean when a column is added.... sorry no idea, maybe someone else can helpNic |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-11-13 : 12:40:18
|
| Got Log Explorer? I don't think that there is a system table that would have this information. Syscolumns does not have a datetime stamp, sysobjects does but that would only help you if they ran DROP and CREATE on the table to get the column added somewhere other than at the end. Why do you need to find this out though? Don't you have control over your environment? If not, sounds like it is time to do that.Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-11-13 : 12:42:17
|
| I don't think so...You can for tables,,Check out:SELECT * FROM syscolumnsSELECT * FROM sysobjectsBrett8-) |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-11-13 : 12:51:34
|
| Isn't there a stored procedure that allows you to put comments associated with an object? Or is that only for tables...(Or was that Oracle?)Brett8-) |
 |
|
|
REDDY
Starting Member
43 Posts |
Posted - 2003-11-13 : 13:47:11
|
| Thanks a lot for all your replies.I need the date, perticular column is added to a tableUnfortunately We do not have any third party sql tools,all we depend on microsfot tools only. My boss posed this question to me this morning .He want's to track some other information based on this.Microsoft should have provided this basic information in system tables.I am backing up the scripts daily,so I can search the files and can find but looking for any other easy way.thanks for all your inputs. RegardsReddy |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-11-13 : 13:50:15
|
| Can't you just ask the DBA when a column was added? The DBA should have this information in VSS or something like that.Tara |
 |
|
|
REDDY
Starting Member
43 Posts |
Posted - 2003-11-13 : 14:04:17
|
TARA I am the DBA ...My Boss(product Manager) added that column without my notice and he forgot when exactly he added that column,but the question is in general is there a way to find the column added date to table using any system tables or stored procedures or undocumented stored procedures???thanksReddy |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-11-13 : 14:11:14
|
| Well, if you've got the transaction log then you could use DBCC LOGINFO to read the transaction log. This is not easy. I don't know how to use the command, but there have been some examples of it here so search the forums for DBCC LOGINFO. Why does a product manager have the ability to make schema changes? We limit the access to DBAs and developers (developers can only make these changes in development though). If your boss added the column by dropping the table and then recreating it, you can use the crdate column in sysobjects for that table to figure out when it was done. He probably used EM though and doesn't know what command was run.Tara |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-11-13 : 20:25:17
|
quote: I am the DBA ...My Boss(product Manager) added that column without my notice and he forgot when exactly he added that column
So your boss is asking YOU to find out when HE did something that HE forgot and YOU had NO knowledge of in the first place...Assuming you cannot run away from this job (seriously think about it), I urge you to revoke every last right he has to your database server. Next time he's gonna ask you to recover a database he accidentally dropped but can't remember when, but he's pretty sure he deleted all the backup files too, just to save disk space. |
 |
|
|
REDDY
Starting Member
43 Posts |
Posted - 2003-11-14 : 11:17:02
|
| Thanks a lot for all your suggestions and support,I guess the actual topic is diverted a bit ,Administrative issues are totally internal and sensitive which cannotbe solved by forums,so no point extending the topic on these issues.Comming to the acual point,based on your postings I came to a conclusion that there is no direct way to find the Date when a column is added to table.ThanksReddy |
 |
|
|
|