Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SQL Scripts - How to run and get results Expand / Collapse
Author
Message
Posted Friday, January 22, 2010 9:14 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 20, 2010 12:14 PM
Points: 4, Visits: 10
Good Morning,

I am very new to SQL. I am trying to run a SQL on a table to see what changes were made to the system.

Can I use one that's on my system in a folder entitled SQL Scripts? or do I need to create one.

I am using MSSQL Server 2000 and I Query Analyzer and received error message, table already created.

I am trying to find if any changes were made to the table. In this instance a Table was deleted and need to know who deleted it.

There is an SQL Files in a Scripts Folder where looks like a query is written that asks it to create a table, but what I am wanting to do is create a log of any changes on that particular table.

Hope this makes sense.

Again, thank you for your help and patience with helping me to understand

How do I get results of the query?


Thank you for your help.
Post #852127
Posted Monday, April 5, 2010 12:15 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, January 28, 2014 8:15 AM
Points: 3,068, Visits: 4,639
Are you trying to query a table that got dropped?

By the way, SQL Server does not keeps track of who drops and object but you can be certain was either the owner of the object or somebody with dbo or higher privileges on it.


_____________________________________
Pablo (Paul) Berzukov

Author of Understanding Database Administration available at Amazon and other bookstores.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Post #896935
Posted Monday, April 5, 2010 12:26 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, April 17, 2014 4:56 AM
Points: 1,002, Visits: 884
In short, no, on SQL 2000 you will not be able to tell if/when/who dropped a table. Your only option is to restore the table from a backup...if such a backup exists.

On the very off chance you had C2 auditing enabled, or are running a constant trace for auditing pruposes, you may be able to find out. But it's highly unlikely that either is the case.


/* ----------------------------- */
Tochter aus Elysium, Wir betreten feuertrunken, Himmlische, dein Heiligtum!

Post #896942
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse