Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2006

    Unanswered: Get Stored Procedure

    I know you can alter and create stored procedures, but is there a way to select a stored procedure? I rewrote some stored procedures for a database and now I want to go and update all the sites using that database(copies), but first I want to make sure that there were no other changes. So what I want to do is to write a page that will get the current stored procedure, compare it to what it should be, and if they are the same only them update it. Is this at all possible?

  2. #2
    Join Date
    Nov 2004
    on the wrong server
    Provided Answers: 6
    query on sysobjects and syscomments, and the answer to your question you shall find.
    [/YODA MODE]
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jun 2003
    Provided Answers: 1
    This code returns a checksum value on each database object:
    	sum(cast(checksum(syscomments.text) as bigint)) Object_Checksum
    from	sysobjects
    	inner join syscomments on =
    group by,,
    If the checksum value of the old object does not match the checksum value of the new object, then the object definition has changed.
    If it's not practically useful, then it's practically useless.

    blindman "sqlblindman"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts