SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL Scripts - How to run and get results


SQL Scripts - How to run and get results

Author
Message
glee777
glee777
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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.
PaulB-TheOneAndOnly
PaulB-TheOneAndOnly
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13301 Visits: 4639
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.
GregoryF
GregoryF
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1724 Visits: 885
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!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search