Backup SQL Server to script file in code?

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

    Backup SQL Server to script file in code?



    Is there anyway to backup a SQL server database to a .sql script file
    through code? My provider charges me 5.00 to perform backups. I'd
    like to do it on my own through code. I don't have access to the
    database server machine however.

    Thank you.

    --
    Warm Regards,
    Lee

    "Upon further investigation it appears that your software is missing
    just one thing. It definitely needs more cow bell..."
  • Terry Burns

    #2
    Re: Backup SQL Server to script file in code?

    Well not exactly. However, you could query each table and return the data to
    a local storage, either xml or sql.


    --
    Terry Burns

    "Lee" <luv2program200 0@yahoo.com> wrote in message
    news:OfxDSCCMGH A.2472@TK2MSFTN GP11.phx.gbl...[color=blue]
    >
    >
    > Is there anyway to backup a SQL server database to a .sql script file
    > through code? My provider charges me 5.00 to perform backups. I'd
    > like to do it on my own through code. I don't have access to the
    > database server machine however.
    >
    > Thank you.
    >
    > --
    > Warm Regards,
    > Lee
    >
    > "Upon further investigation it appears that your software is missing
    > just one thing. It definitely needs more cow bell..."[/color]


    Comment

    • Lee

      #3
      Re: Backup SQL Server to script file in code?

      Terry Burns enlightened me by writing:
      [color=blue]
      > Well not exactly. However, you could query each table and return the
      > data to a local storage, either xml or sql.[/color]

      That's what I figured. I need to also backup the database schema as
      well. I guess I could manually iterate over all the objects and create
      scripts for all that as well...

      Thanks for the response.

      --
      Warm Regards,
      Lee

      "Upon further investigation it appears that your software is missing
      just one thing. It definitely needs more cow bell..."

      Comment

      • Peter Bromberg [C# MVP]

        #4
        RE: Backup SQL Server to script file in code?

        The Microsoft Sql Web Data Administrator Web app has an Export function that
        does this very nicely.
        Peter

        --
        Co-founder, Eggheadcafe.com developer portal:

        UnBlog:





        "Lee" wrote:
        [color=blue]
        >
        >
        > Is there anyway to backup a SQL server database to a .sql script file
        > through code? My provider charges me 5.00 to perform backups. I'd
        > like to do it on my own through code. I don't have access to the
        > database server machine however.
        >
        > Thank you.
        >
        > --
        > Warm Regards,
        > Lee
        >
        > "Upon further investigation it appears that your software is missing
        > just one thing. It definitely needs more cow bell..."
        >[/color]

        Comment

        • Lee

          #5
          Re: Backup SQL Server to script file in code?

          Peter Bromberg [C# MVP] enlightened me by writing:
          [color=blue]
          > Microsoft Sql Web Data Administrator Web app[/color]

          I've tried this by installing it locally and trying to connect to the
          sql server over the net: no go.

          I've also tried uploading the web app to my server but only get
          "Required permissions cannot be acquired"

          I've tried setting up the web config, but I'm not that familiar with
          everything yet and am just blundering around.

          Thanks anyway.

          --
          Warm Regards,
          Lee

          "Upon further investigation it appears that your software is missing
          just one thing. It definitely needs more cow bell..."

          Comment

          • Terry Burns

            #6
            Re: Backup SQL Server to script file in code?

            You need to contact your service provider for details of what you need to do
            in order to get access to the server.

            --
            Terry Burns

            "Lee" <luv2program200 0@yahoo.com> wrote in message
            news:e81t5%23OM GHA.1760@TK2MSF TNGP10.phx.gbl. ..[color=blue]
            > Peter Bromberg [C# MVP] enlightened me by writing:
            >[color=green]
            >> Microsoft Sql Web Data Administrator Web app[/color]
            >
            > I've tried this by installing it locally and trying to connect to the
            > sql server over the net: no go.
            >
            > I've also tried uploading the web app to my server but only get
            > "Required permissions cannot be acquired"
            >
            > I've tried setting up the web config, but I'm not that familiar with
            > everything yet and am just blundering around.
            >
            > Thanks anyway.
            >
            > --
            > Warm Regards,
            > Lee
            >
            > "Upon further investigation it appears that your software is missing
            > just one thing. It definitely needs more cow bell..."[/color]


            Comment

            Working...