Help with Stored Procedures needed -- URGENT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peanut044

    Help with Stored Procedures needed -- URGENT

    Hi all!
    I am in need of writing a few stored procedures.

    The first one is to create a stored procedure to recover a database
    from backup and the second one is to create a stored procedure to
    execute a transaction log backup (even though I know this can be done
    through a maintainence plan). Any help would be greatly appreciated.

    I know the commands to recover and backup -- but I dont know how to
    formulate them into a stored procedure

    Thanks in advance!
  • Erland Sommarskog

    #2
    Re: Help with Stored Procedures needed -- URGENT

    Peanut044 (mbelli01@hotma il.com) writes:[color=blue]
    > The first one is to create a stored procedure to recover a database
    > from backup and the second one is to create a stored procedure to
    > execute a transaction log backup (even though I know this can be done
    > through a maintainence plan). Any help would be greatly appreciated.
    >
    > I know the commands to recover and backup -- but I dont know how to
    > formulate them into a stored procedure[/color]

    That should not be much different. Look up the syntax for the commands
    in Books Online, to find out where you can use variables and where you
    cannot not. If you need to use variables where the syntax does not
    permit this, then use dynamic SQL.


    --
    Erland Sommarskog, SQL Server MVP, sommar@algonet. se

    Books Online for SQL Server SP3 at
    SQL Server 2025 redefines what's possible for enterprise data. With developer-first features and integration with analytics and AI models, SQL Server 2025 accelerates AI innovation using the data you already have.

    Comment

    Working...