Forum Replies Created

Viewing 15 posts - 2,551 through 2,565 (of 2,643 total)

  • RE: Is it possible to update two tables at the same time?

    You can't update two tables in one SQL statement but you can wrap them in an transaction so from the outside it looks like they are.

    BEGIN TRANSACTION

    UPDATE A

    SET Complete =...

  • RE: Version Control your Stored Procedures

    mike.renwick-894639 (5/7/2010)


    I've not come across DDL triggers before- they look quite interesting and a relatively sensible place to capture changes.

    I've written this trigger to record when DDL changes...

  • RE: Version Control your Stored Procedures

    Grant Fritchey (5/7/2010)


    Also, we make it a point of retaining the scripts that were generated for the final rollout to production, in case there's any question in the future what...

  • RE: Version Control your Stored Procedures

    bill page-320204 (5/6/2010)


    Am I missing something here?

    We use SourceSafe. We keep each proc separate. When I need to change one, I check it out, modify it, paste it...

  • RE: Version Control your Stored Procedures

    CirquedeSQLeil (5/6/2010)


    I would have like to see a more in-depth article on the facets of the scripts. I think this would have added more value to the article.

    I didn't...

  • RE: Version Control your Stored Procedures

    bphipps-931675 (5/6/2010)


    But you lose the benefits of a change log that manual management of your procedures provides.

    In the version of the procedure I have adds and additional call to another...

  • RE: Version Control your Stored Procedures

    bphipps-931675 (5/6/2010)


    True about the walking in late, for that issue but I would still want to logically arrange the various scripts into projects to make them easier to find and...

  • RE: Version Control your Stored Procedures

    bphipps-931675 (5/6/2010)


    I guess this is where having a plan in place of how you are going to manage your scripts before you create 600 scripts is important.

    It is...

  • RE: Version Control your Stored Procedures

    bphipps-931675 (5/6/2010)


    That's certainly one way you can get a script started if you didn't save it from the start. We have a stored procedure template (that we access via...

  • RE: Version Control your Stored Procedures

    bphipps-931675 (5/6/2010)


    But SSMS inherently gives you a save option. All you have to do is save them like any other file to your hard drive. I really don't...

  • RE: Version Control your Stored Procedures

    bphipps-931675 (5/6/2010)


    This just seems silly overall. Why wouldn't you just create a project in SSMS and then save your scripts into the solution/project. The solution can then be...

  • RE: Version Control your Stored Procedures

    Phil Factor (5/6/2010)


    anything that involves a table schema change for example kind of makes the whole approach a bit complex and prone to problems

    Right on the nail. If you can...

  • RE: Version Control your Stored Procedures

    mike.renwick-894639 (5/6/2010)


    I personally haven't found a great deal of info on how to script objects using SMO which is why I think people end up doing slightly scary things like...

  • RE: Version Control your Stored Procedures

    mike.renwick-894639 (5/6/2010)


    I also had similar issues with sp_helptext and eventually found a way of scripting objects using

    Microsoft.SqlServer.Management.Smo.Scripter in Powershell.. this has the advantage that it handles all types of objects...

  • RE: Version Control your Stored Procedures

    jcaradocdavies (5/6/2010)


    Just a small concern...

    As far as experience and memory serves, sp_helptext is not a reliable source for recreating SQL server objects. SQL management objects are the preferred source.

    Changes to...

Viewing 15 posts - 2,551 through 2,565 (of 2,643 total)