Showing posts with label analyzer. Show all posts
Showing posts with label analyzer. Show all posts

Friday, March 9, 2012

Is there any way to 'undo' an update query?

I guess I am in big trouble now.

I have updated a table by querying in SQL Query Analyzer and one of table columns was all set to wrong data (of course it was because of my mistake in query sentence). I am wondering if there is any way to recover this table?

Unfortunately my database was not backuped after this table was created. I am wondering what the log file is for. Maybe can there any way to retrieve a table's old status by using the log table?
Any help?

without a database backup there's no way to restore data from a previous point in time. A log file can be used to store incremental changes from the last database/log backup.

in the future you may want to start your TSQL statement with a BEGIN TRAN, and allow yourself the ability to roll it back should you find yourself in a similar situation.

|||OK. I guess I gotta do all annoying import job again to make the table.
Anyway, thanks a lot, Greg. I appreciate your advice.

Monday, February 20, 2012

Is there any BPA for procedures ?

Hi all,

Is there any best practice analyzer for analysing the SQL objects like stored procedure, functions and views ?

Thanks in advance,

DBLearner

Unfortunately, there is not.

Coding Standards and Peer review IS the 'best practice analyzer'.

|||

You could use the SQL Server 2000 Best Practices Analyzer:

http://www.microsoft.com/downloads/details.aspx?FamilyID=B352EB1F-D3CA-44EE-893E-9E07339C1F22&displaylang=en

...or the February CTP version for SQL Server 2005:

http://www.microsoft.com/downloads/details.aspx?FamilyId=DA0531E4-E94C-4991-82FA-F0E3FBD05E63&displaylang=en

Chris

|||They are planning to move something like this in one of the next versions of VSDB.

Jens K. Suessmeyer.

http://www.sqlserver2005.de