Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2009
    Posts
    62

    Unanswered: Generate Create Scripts for predefined procedures

    Hi,

    I have about 800 stored procedures in my sql 2000 database. I want to move about 350 of them over to a new SQL 2005 database.

    I know you can right click on the stored proc and say generate sql script, however i didn't want to have to sift through and manually pick out the 350 procs that i need.

    i have the 350 proc names stored in a table. I was wondering if there was a way using script to use that table with the proc names and generate the create scripts that way. i would also need to script out the permssions for each proc.

    Any ideas?

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    I wrote the attached procedure what feels like ions ago but it should do what you require. Maybe.
    Attached Files Attached Files
    George
    Home | Blog

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    "ions"??????
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by blindman View Post
    "ions"??????
    many electrons died in the creation of his procedure
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What? Is that not how you guys measure time?

    Time represented in scientific notation FTW.
    George
    Home | Blog

  6. #6
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by r937 View Post
    many electrons died in the creation of his procedure
    An Ion walks into a bar and says "I lost my electron in here yesterday."
    The bartender says "Are you sure you lost it here?"
    The Ion says "Yes, I'm positive."
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    omg, here come da science jokes...

    A neutron goes into a bar and asks the bartender, "How much for a beer?" The bartender replies, "For you, no charge."

    If H-two-O is the formula for water, what is the formula for ice? H-two-O-cubed

    Heisenberg is out for a drive when he's stopped by a traffic cop. The cop says, "Do you know how fast you were going?" Heisenberg says, "No, but I know where I am."

    From way down in my cranium
    This prediction I will make:
    That if you eat uranium,
    You'll get atomic ache.
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  8. #8
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    philosophy joke...

    Descartes walks into a bar. starts drinking heavily. Bartender asks if wants another. Descartes says I am so drunk I can't think. Descartes disappears.
    “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.

Posting Permissions

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