copy - user defined procedure

  •  Hi All,

    Our Management studio for sql2005 is damaged and we only have way to copy through SQLCMD - command line.

    Please can any one provide me the script to copy all the user defined Procedure , Functions & Triggers code from database.

    When I ran this code in SQLCMD, it show me the procedure code but it does not show me the complete text it cut last couple of lines. Any idea why

    ==> SELECT definition FROM sys.sql_modules

    For example

    Create trigger "SLocationinsert" on "SLocation"

    for insert

       as

        BEGIN

        declare

        @rowsAffected int,

        @nullRows int,

        @validRows int,

        @errorNumber int,

         @errorMsg varchar(255)

    select @ rows

    So i have a hard time to know what are lines not showing.

    This DB has 85 procedure which I want to copy code.

    Thanks in advance

  • You can use Visual Studio 2003/2005 to connect to your database.

    And it's strange that you cannot find another computer that has undamaged SQLMS to connect your DBs. Did I get you wrong?

    Zubeyir

  • If you can connect and verify your databases on the instance via SQLCMD and everything is OK then just reinstall the Management Studio.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply