?
Solved

SQL scripts log

Posted on 2014-04-14
4
Medium Priority
?
150 Views
Last Modified: 2014-05-06
Is it possible to check if scripts have been run against a 2008 SQL database.
0
Comment
Question by:Sid_F
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 16

Expert Comment

by:Wasim Akram Shaik
ID: 39998485
If an audit is created and enabled, you can read it though.

You can read the Windows event logs by using the Event Viewer utility in Windows. For file targets, you can use either the Log File Viewer in SQL Server Management Studio or the fn_get_audit_file function to read the target file.

read this to find out more


http://technet.microsoft.com/en-us/library/dd392015%28v=sql.100%29.aspx

http://technet.microsoft.com/en-us/library/cc280386.aspx
0
 
LVL 6

Author Comment

by:Sid_F
ID: 39998585
Event viewer is vague. Can I specifically view if a script has been run against a database if the database has been setup with default options. I'm not sure if audit is default?
0
 
LVL 35

Accepted Solution

by:
ste5an earned 1000 total points
ID: 39998792
Please define 'script'..

But I would guess that you should take a look at server-side traces: Introducing SQL Trace.

Or a slightliy better overview (SQL Server 2005, but applies also to 2008): Server-Side Tracing and Collection.
0
 
LVL 70

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 1000 total points
ID: 39999626
No.  There is a default trace (unless you explicitly disabled it) but it is pretty lightweight.

When you think of the enormous overhead to create a record of all scripts run(!), you can see why SQL doesn't do that.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question