Forum Replies Created

Viewing 15 posts - 61 through 75 (of 78 total)

  • RE: A Simple way of Automating Scripts

    Or maybe use a while loop like this to check for all transactions and then commit or rollback until finished and none are found. Have never tried it this...

  • RE: A Simple way of Automating Scripts

    actually I was trying to communicate that if there is a begin tran without any corresponding rollback or

    commit in the script to be executed...how this can be taken care of....

    Regards,

    Sqlfrenzy

    Then...

  • RE: A Simple way of Automating Scripts

    Since SQLCMD is a SQL Server 2005 tool you may want to instead use the TRY/CATCH that is available instead of the @@error. Maybe something like the following:

    BEGIN TRY

    ...

  • RE: checksums and unicode data

    Closer to being perfect is the LUN 10 checksum (sanity check on credit card numbers)... but even that can have a failure.

    Just in case anyone else is interested in finding...

  • RE: A Simple way of Automating Scripts

    Something important to be aware of mentioned in BOL:

    SQL Server Management Studio uses .NET SqlClient for execution in regular and SQLCMD mode. When run from the command line, SQLCMD uses...

  • RE: Be a Craftsman

    I know this takes the topic a bit off course but I couldn't resist since it is in regards to "professionals".

    Craftsman is a highly respected brand of tool, and perhaps...

  • RE: A Simple way of Automating Scripts

    Sqlfrenzy (7/30/2009)


    SanjayAttray (7/30/2009)


    Sqlfrenzy (7/30/2009)


    An easy way of executing scripts.....

    Create a batch file and place it in the folder containing the scripts...

    @for /r %%s in (.) do (echo ..............%%s /b >>...

  • RE: Dynamic creation of Insert, Update, Delete Stored procedure

    ddunn (7/23/2009)


    I use SQL Admin Studio as it has a customizable template engine (I used it to write Delphi code to access stored procedures). It adds the following code...

  • RE: An Example of Test-Driven Development, Part 2

    I know this is taking the discussion off-topic but I think there could be some mileage in a SQL Server Mythbusting article to debunk those things everybody 'knows' about SQL...

  • RE: Generating Insert Statements

    There is also an MS app. that some may be interested in to do importing/exporting: Microsoft SQL Server Database Publishing Wizard

    It can create scripts that are just data, just...

  • RE: Split string using XML

    For splitting delimited lists I really like Jeff Moden's approach.

    http://www.sqlservercentral.com/articles/T-SQL/63003/

    Depending on how you use XML as was previously mentioned can cause an issue with the special XML characters. You...

  • RE: SQL – Backup Methods, Some Cool Scripts

    philcart (11/16/2008)


    You really only need to check @@FETCH_STATUS = 0, that indicates that a row was successfully fetched.

    I would say this actually depends on the type of cursor you open....

  • RE: SQL – Backup Methods, Some Cool Scripts

    It appears that a row trying to be fetched is no longer "valid". Sounds like the logic needs to be something more along these lines for the cursor. ...

  • RE: Default trace - A Beginner's Guide

    For those of us working in "locked down" environments you will need to have 'ALTER TRACE' permission in order to execute fn_trace_getinfo.

    Most likely this is the permission you...

  • RE: SQL – Backup Methods, Some Cool Scripts

    I would be careful about using the stored proc - sp_MSforeachdb.

    1. it uses global cursors to do its work in sp_MSforeach_worker.

    2. it really has no error...

Viewing 15 posts - 61 through 75 (of 78 total)