dumping data from database

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

    dumping data from database

    Hi:)
    I need to dump data from database in to *.sql file. I try it using DUMP
    DATABASE but it not work that I need it.

    So, how can I dump data from database in to *.sql file and then run it
    using: osql -E -i nameOfDumpedDat abase.sql


    Thanks for help, greetings, gregory :)
  • Simon Hayes

    #2
    Re: dumping data from database


    "rozrabiak" <brak@maila.p l> wrote in message
    news:c6r83b$5ra $1@news.onet.pl ...[color=blue]
    > Hi:)
    > I need to dump data from database in to *.sql file. I try it using DUMP
    > DATABASE but it not work that I need it.
    >
    > So, how can I dump data from database in to *.sql file and then run it
    > using: osql -E -i nameOfDumpedDat abase.sql
    >
    >
    > Thanks for help, greetings, gregory :)[/color]

    You can use bcp.exe or DTS to export data to a file and load it again, or if
    you prefer INSERT statements then see here:



    If you want everything (objects and data), then BACKUP and RESTORE is often
    the easiest way.

    Simon


    Comment

    • Erland Sommarskog

      #3
      Re: dumping data from database

      rozrabiak (brak@maila.pl) writes:[color=blue]
      > I need to dump data from database in to *.sql file. I try it using DUMP
      > DATABASE but it not work that I need it.
      >
      > So, how can I dump data from database in to *.sql file and then run it
      > using: osql -E -i nameOfDumpedDat abase.sql[/color]

      In Enterprise Manager, find the database, right-click, select All Tasks,
      and in that submenu you find scripting options.

      --
      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

      • jdbcguy

        #4
        Re: dumping data from database

        Erland Sommarskog <sommar@algonet .se> wrote in message news:<Xns94DAF1 247AB58Yazorman @127.0.0.1>...[color=blue]
        > rozrabiak (brak@maila.pl) writes:[color=green]
        > > I need to dump data from database in to *.sql file. I try it using DUMP
        > > DATABASE but it not work that I need it.
        > >
        > > So, how can I dump data from database in to *.sql file and then run it
        > > using: osql -E -i nameOfDumpedDat abase.sql[/color]
        >
        > In Enterprise Manager, find the database, right-click, select All Tasks,
        > and in that submenu you find scripting options.[/color]

        There is a Java program called Super*SQL which will unload any tables
        you have into an ASCII file that you can then run or load into a
        different database. For more information visit www.sqlmagic.com.

        Comment

        Working...