Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2004
    Posts
    1

    Question Unanswered: Global Stored Proc Find and Replace

    Hello all,
    Being a relative newbie to large scale MSSQL development, I'd like to try and find out if there is some sort of utility, command or stored proc that I can use to globally change all text within my database's stored procedures.

    For example... I would like to change a table name from dbo.xtable... to dbo.ytable... Is this possible?

    Actually, I'd be happy with some way to search through all my stored procs to find a specific string (i.e. xtable in the example above).

    Any help provided will be greatly appreciated!

    Jordan Stradtman

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Do you know how to scipt a database?

    First off, all sprocs syhould be stored individually in .sql files, preferably in a version control app, or at least on a server....

    To do them all script the db and do a search in notepad....
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Aug 2003
    Location
    Andover, MA
    Posts
    256
    Notepad?!

    What a lame-ass app that is.

    PFE32 dude.
    -bpd

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    What's a PFE32?

  5. #5
    Join Date
    Aug 2003
    Location
    Andover, MA
    Posts
    256
    Programmer's File Editor. Search Google. It's freeware.

    Lots and lots of goodies, such as templates, macros, etc. It's basic, small, love it.

    Once you use it, you can never go back...
    -bpd

  6. #6
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Here they shoved down our throught this SlickEdit piece of s%$&, and deinstalled my TextPad. Well, thanks for the link, I'll go check it out.

  7. #7
    Join Date
    Aug 2003
    Location
    Andover, MA
    Posts
    256
    I should also mention that I have been using PFE for about 6+ years, which might be why I am so attached to it.
    -bpd

  8. #8
    Join Date
    Jan 2004
    Location
    Minnesota, USA
    Posts
    1

    Re: Global Stored Proc Find and Replace

    Jordy,

    In Enterprise Manager, right-click the database you wish to script, pick "All Tasks", then "Generate SQL Scripts". Click the button "Show All" to list the database objects, the move the objects you wish to script to the right window. There are some check boxes to assist in selecting various groups of object types.

    After selecting what you want scripted, click the "Preview" button. When it appears with the scripts for the objects, click the "Copy" button, close up the windows, and paste the scripts into the text editor of your choice.

    Stay warm - hope things are going well for you.

    -- Greg H., Digital Marketing

Posting Permissions

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