Showing posts with label tables. Show all posts
Showing posts with label tables. Show all posts

Thursday, March 22, 2012

Backup devices (named pipes)

I hope someone can at least point me in the right direction on this one.
I've written some procs and created appropriate tables to replicate logshipping without incurring the added expense of Enterprise, just for the GUI.
I'm now looking for ways to extend/enhance this functionality. Currently I use a commandline compression app (bzip2) to compress the tran log backup after it's been written to disk, and although it works, I was thinking it would be nice if I could capture the backup stream on the fly (before it get's written to disk) and compress it before writing to disk. I've found several products that do this, but almost no documentation on the actual process of capturing the backup output.
Through a little sleuthing, I was able to create a device with sp_addumpdevice using a named pipe, and a small .Net app that was to read from that pipe, but I'm running into a problem. For some reason, all I get is the header information, then SQL server seems to expect a response from me and if I don't respond within a certain timeframe (let alone that I have no idea what to send it) it closes the pipe and the backup operation fails with a device write error, listing OS error 232(pipe being closed) in the logs.
Any assistance that someone could provide would be greatly appreciated.
Thanks in advance for taking the time to read this gobbledy-gook!

You can write a VDI (Virtual Device Interface) application to get access to the backup data.

Named pipe backups have been deprecated since sql7, and are removed in sql2005.

You can download doc and samples for VDI here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=416f8a51-65a3-4e8e-a4c8-adfe15e850fc&DisplayLang=en

|||Thanks very much for the quick reply Steve. Unfortunately, I won't be able to utilize sql2005 in a production environment for at least another year. We have many legacy systems that interface with SQL2000 via batch loads, DTS and a vagary of third party interfaces (Liant Relativity for example) and until testing is complete company wide, policy is that SQL2005 not be used.
That being the case, are there any resources relevant to this situation in SQL2000?
Also, I apologize if this is posted in the wrong forum, but as I wasn't able to find any SQL2000 forums, this seemed the most appropriate place to pose my question.
Thanks again for your help!
|||

You can use VDI since sql7, so that should do the trick for you.

The VDI has not changed since sql2000, so our newer 2005 spec is mostly just clarifications. Any VDI app written for sql2000 (or sql7) should work without changes on sql2000 or sql2005.

I strongly advise you against writing a named pipe backup application. The reason is that such an app will not be compatible with sql2005.

Of course you are free to pass the VDI stream on via your own named pipes if you really want to.

This forum is good for any sql questions.

Cheers,

Monday, March 19, 2012

Backup database to CSV files

Hi

What is the easiest option for Exporting ALL of my SQL Server tables into a CSV file (either separate CSV files for each table or one big file with all the table columns and data) ?

I just want to Backup my SQL Server database like we backup MySQL database using phpMyAdmin. Unfortunately, my SQL hosting company does not allow backups for free.

Thanks for help

Do you have a remote access via the SQL Management Studio?

Also, FREE backup can be provided by any hosting company nowadays.

Regards

Saturday, February 25, 2012

backup and restore

On a production server, I do a full backup monthly and then delete data
from the tables that is older than the current date. On a separate
non-production server I restored the initial full backup. My question
is how can I add/restore the subsequent backups to the non-production
server with out stepping on the data that was initially restored?
Thanks,
Daniel<danielsmith611@.gmail.com> wrote in message
news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> On a production server, I do a full backup monthly and then delete data
> from the tables that is older than the current date. On a separate
> non-production server I restored the initial full backup. My question
> is how can I add/restore the subsequent backups to the non-production
> server with out stepping on the data that was initially restored?
>
RESTORE WITH MOVE, followed perhaps by merging the data.
EG
BACKUP DATABASE AdventureWorks
TO AdventureWorksBackups ;
RESTORE DATABASE AdventureWorks_200608
FROM AdventureWorksBackups
WITH MOVE 'AdventureWorks_Data' TO
'C:\MySQLServer\AdventureWorks_200608.mdf',
MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
David|||Do you have an example of the merge?
David Browne wrote:
> <danielsmith611@.gmail.com> wrote in message
> news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
>
> RESTORE WITH MOVE, followed perhaps by merging the data.
>
> EG
> BACKUP DATABASE AdventureWorks
> TO AdventureWorksBackups ;
>
> RESTORE DATABASE AdventureWorks_200608
> FROM AdventureWorksBackups
> WITH MOVE 'AdventureWorks_Data' TO
> 'C:\MySQLServer\AdventureWorks_200608.mdf',
> MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf'
;
>
> David|||Or would log shipping work?
danielp wrote:[vbcol=seagreen]
> Do you have an example of the merge?
> David Browne wrote:|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155158638.423828.3310@.h48g2000cwc.googlegroups.com...
> Or would log shipping work?
No. Your deletes would get shipped.
David|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155149678.373420.184490@.i3g2000cwc.googlegroups.com...
> Do you have an example of the merge?
It's just SQL, or perhaps an SSIS package. What do the tables look like?
David

backup and restore

On a production server, I do a full backup monthly and then delete data
from the tables that is older than the current date. On a separate
non-production server I restored the initial full backup. My question
is how can I add/restore the subsequent backups to the non-production
server with out stepping on the data that was initially restored?
Thanks,
Daniel<danielsmith611@.gmail.com> wrote in message
news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> On a production server, I do a full backup monthly and then delete data
> from the tables that is older than the current date. On a separate
> non-production server I restored the initial full backup. My question
> is how can I add/restore the subsequent backups to the non-production
> server with out stepping on the data that was initially restored?
>
RESTORE WITH MOVE, followed perhaps by merging the data.
EG
BACKUP DATABASE AdventureWorks
TO AdventureWorksBackups ;
RESTORE DATABASE AdventureWorks_200608
FROM AdventureWorksBackups
WITH MOVE 'AdventureWorks_Data' TO
'C:\MySQLServer\AdventureWorks_200608.mdf',
MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
David|||Do you have an example of the merge?
David Browne wrote:
> <danielsmith611@.gmail.com> wrote in message
> news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> > On a production server, I do a full backup monthly and then delete data
> > from the tables that is older than the current date. On a separate
> > non-production server I restored the initial full backup. My question
> > is how can I add/restore the subsequent backups to the non-production
> > server with out stepping on the data that was initially restored?
> >
>
> RESTORE WITH MOVE, followed perhaps by merging the data.
>
> EG
> BACKUP DATABASE AdventureWorks
> TO AdventureWorksBackups ;
>
> RESTORE DATABASE AdventureWorks_200608
> FROM AdventureWorksBackups
> WITH MOVE 'AdventureWorks_Data' TO
> 'C:\MySQLServer\AdventureWorks_200608.mdf',
> MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
>
> David|||Or would log shipping work?
danielp wrote:
> Do you have an example of the merge?
> David Browne wrote:
> > <danielsmith611@.gmail.com> wrote in message
> > news:1155141011.175566.161350@.m73g2000cwd.googlegroups.com...
> > > On a production server, I do a full backup monthly and then delete data
> > > from the tables that is older than the current date. On a separate
> > > non-production server I restored the initial full backup. My question
> > > is how can I add/restore the subsequent backups to the non-production
> > > server with out stepping on the data that was initially restored?
> > >
> >
> >
> > RESTORE WITH MOVE, followed perhaps by merging the data.
> >
> >
> > EG
> >
> > BACKUP DATABASE AdventureWorks
> > TO AdventureWorksBackups ;
> >
> >
> > RESTORE DATABASE AdventureWorks_200608
> > FROM AdventureWorksBackups
> > WITH MOVE 'AdventureWorks_Data' TO
> > 'C:\MySQLServer\AdventureWorks_200608.mdf',
> > MOVE 'AdventureWorks_Log' TO 'C:\MySQLServer\AdventureWorks_200608.ldf';
> >
> >
> > David|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155158638.423828.3310@.h48g2000cwc.googlegroups.com...
> Or would log shipping work?
No. Your deletes would get shipped.
David|||"danielp" <danielsmith611@.gmail.com> wrote in message
news:1155149678.373420.184490@.i3g2000cwc.googlegroups.com...
> Do you have an example of the merge?
It's just SQL, or perhaps an SSIS package. What do the tables look like?
David

Friday, February 24, 2012

Backup and DTS....@ the same time....

I am launching full backup of user database and at the same time loading the
data to the tables using a DTS package. Will this be a performance issue?
I am using SQL2K.
Thanks,
CarlWell, it will potentially slow down both the load and the backup a little,
mostly simply because of the disc io involved. But is it an issue? - depends
on manythings - how biug the db is, how long the backup takes, how many rows
DTS is loading etc.
You will need to consider things like how long do the 2 steps take
seperately, how long together?, when is it happening? - will anyone else
know - ie is the db idle anyway when you do this?
Mike John
"Carl San" <Carl_San@.hotmail.com> wrote in message
news:un0FX8aMFHA.244@.TK2MSFTNGP12.phx.gbl...
>I am launching full backup of user database and at the same time loading
>the
> data to the tables using a DTS package. Will this be a performance issue?
> I am using SQL2K.
> Thanks,
> Carl
>

Backup and DTS....@ the same time....

I am launching full backup of user database and at the same time loading the
data to the tables using a DTS package. Will this be a performance issue?
I am using SQL2K.
Thanks,
CarlWell, it will potentially slow down both the load and the backup a little,
mostly simply because of the disc io involved. But is it an issue? - depends
on manythings - how biug the db is, how long the backup takes, how many rows
DTS is loading etc.
You will need to consider things like how long do the 2 steps take
seperately, how long together?, when is it happening? - will anyone else
know - ie is the db idle anyway when you do this?
Mike John
"Carl San" <Carl_San@.hotmail.com> wrote in message
news:un0FX8aMFHA.244@.TK2MSFTNGP12.phx.gbl...
>I am launching full backup of user database and at the same time loading
>the
> data to the tables using a DTS package. Will this be a performance issue?
> I am using SQL2K.
> Thanks,
> Carl
>

Backup and DTS....@ the same time....

I am launching full backup of user database and at the same time loading the
data to the tables using a DTS package. Will this be a performance issue?
I am using SQL2K.
Thanks,
Carl
Well, it will potentially slow down both the load and the backup a little,
mostly simply because of the disc io involved. But is it an issue? - depends
on manythings - how biug the db is, how long the backup takes, how many rows
DTS is loading etc.
You will need to consider things like how long do the 2 steps take
seperately, how long together?, when is it happening? - will anyone else
know - ie is the db idle anyway when you do this?
Mike John
"Carl San" <Carl_San@.hotmail.com> wrote in message
news:un0FX8aMFHA.244@.TK2MSFTNGP12.phx.gbl...
>I am launching full backup of user database and at the same time loading
>the
> data to the tables using a DTS package. Will this be a performance issue?
> I am using SQL2K.
> Thanks,
> Carl
>

Tuesday, February 14, 2012

backup

I'm using ms access 2000 .adp file, and tables on sql server / msde. On the
menu there's a backup option. It creates a file with a .Dat extension. How
do I take the Dat file and restore data? This news group has been real
helpful-- thanks."JIMMIE WHITAKER" <kpsklab@.worldnet.att.net> wrote in message news:<UXgNc.139258$OB3.8907@.bgtnsc05-news.ops.worldnet.att.net>...
> I'm using ms access 2000 .adp file, and tables on sql server / msde. On the
> menu there's a backup option. It creates a file with a .Dat extension. How
> do I take the Dat file and restore data? This news group has been real
> helpful-- thanks.

It's not clear which menu in which application you're talking about -
is this Enterprise Manager, or some third-party tool? You can test if
it's a valid MSSQL backup like this (from Query Analyzer or osql.exe):

restore headeronly from disk = 'c:\temp\myfile.dat'

This should give you the details of the backup - if you get an error
instead, it's probably not an MSSQL backup.

In general, to backup and restore MSSQL databases, you use the BACKUP
and RESTORE commands, or you can create maintenance plans from
Enterprise Manager which will do this for you. If you're new to this,
I would suggest you spend some time reviewing the "Backing Up and
Restoring Databases" section in Books Online.

Simon|||I'm in ms access 2000, and backup is on a dropdown menu.
"Simon Hayes" <sql@.hayes.ch> wrote in message
news:60cd0137.0407262346.7e3552b2@.posting.google.c om...
> "JIMMIE WHITAKER" <kpsklab@.worldnet.att.net> wrote in message
news:<UXgNc.139258$OB3.8907@.bgtnsc05-news.ops.worldnet.att.net>...
> > I'm using ms access 2000 .adp file, and tables on sql server / msde. On
the
> > menu there's a backup option. It creates a file with a .Dat extension.
How
> > do I take the Dat file and restore data? This news group has been real
> > helpful-- thanks.
> It's not clear which menu in which application you're talking about -
> is this Enterprise Manager, or some third-party tool? You can test if
> it's a valid MSSQL backup like this (from Query Analyzer or osql.exe):
> restore headeronly from disk = 'c:\temp\myfile.dat'
> This should give you the details of the backup - if you get an error
> instead, it's probably not an MSSQL backup.
> In general, to backup and restore MSSQL databases, you use the BACKUP
> and RESTORE commands, or you can create maintenance plans from
> Enterprise Manager which will do this for you. If you're new to this,
> I would suggest you spend some time reviewing the "Backing Up and
> Restoring Databases" section in Books Online.
> Simon|||"JIMMIE WHITAKER" <kpsklab@.worldnet.att.net> wrote in message news:<hlXNc.145886$OB3.71566@.bgtnsc05-news.ops.worldnet.att.net>...
> I'm in ms access 2000, and backup is on a dropdown menu.

<snip
Well, I know nothing about Access, so I don't know if it's a generic
backup function, or if it's something specific in your Access
application. If it's a standard Access function, you might get more
help in an Access newsgroup.

Simon

Friday, February 10, 2012

backing up tables

Can anyone tell me how I can backup / restore individual tables?
At the moment I have been backing up the msde database on the development
machine and restoring it onto the web server in order to transfer data.
But I have now reached the point where the data on the web server no longer
matches the data on the development machine. The data on the web server is
good but I have some structural changes to some tables on the development
machine.
Is there a method by which I can update only some of the tables on my web
server?
To date I have been using DBAMGR2K for all data manipulation.
Suggestions would be most appreciated.
Neme
If you want to make schema changes to the tables, you can create a script to
alter the table and add columns etc. You can either do this manually (see
ALTER TABLE in Books Online) or use a tool to generate the scripts for you,
for example SQLCompare from www.red-gate.com.
Jacco Schalkwijk
SQL Server MVP
"June Macleod" <junework@.hotmail.com> wrote in message
news:e7UZhiXzEHA.2600@.TK2MSFTNGP09.phx.gbl...
> Can anyone tell me how I can backup / restore individual tables?
> At the moment I have been backing up the msde database on the development
> machine and restoring it onto the web server in order to transfer data.
> But I have now reached the point where the data on the web server no
> longer
> matches the data on the development machine. The data on the web server
> is
> good but I have some structural changes to some tables on the development
> machine.
> Is there a method by which I can update only some of the tables on my web
> server?
> To date I have been using DBAMGR2K for all data manipulation.
> Suggestions would be most appreciated.
> Neme
>

Backing up Tables

Hi
Is there a way to backup many tables in a SQL Server database to a text
file all at once? I know this can be done individually using the
import/export wizard, but I have many tables that need to be backed up
often and still have the ability to restore them all at once as well.
Basically we use 1 database for many tests and after each test we want
to backup the data in certain tables, not backup the entire database.
Thanks
LauraYou could move all of the tables that you wish to back up, including their
indexes, into a secondary file, in a secondary filegroup. You could then
backup only that filegroup.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
<Laura.X.Kennedy@.JPMorgan.com> wrote in message
news:1166478797.830720.145090@.79g2000cws.googlegroups.com...
> Hi
> Is there a way to backup many tables in a SQL Server database to a text
> file all at once? I know this can be done individually using the
> import/export wizard, but I have many tables that need to be backed up
> often and still have the ability to restore them all at once as well.
> Basically we use 1 database for many tests and after each test we want
> to backup the data in certain tables, not backup the entire database.
> Thanks
> Laura
>|||DTS?
<Laura.X.Kennedy@.JPMorgan.com> wrote in message
news:1166478797.830720.145090@.79g2000cws.googlegroups.com...
> Hi
> Is there a way to backup many tables in a SQL Server database to a text
> file all at once? I know this can be done individually using the
> import/export wizard, but I have many tables that need to be backed up
> often and still have the ability to restore them all at once as well.
> Basically we use 1 database for many tests and after each test we want
> to backup the data in certain tables, not backup the entire database.
> Thanks
> Laura
>|||Just be aware that restore is a bit tricky to restore in this scenario. You can't just restore into
the production database without rolling forward all transaction logs up to current date and time.
You can restore into a new database assuming that you backuped up the primary filegroup as well (in
fact, possibly the backup need to be of the whole database - you need to test), using the partial
option. You can then export the needed data into the production database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Arnie Rowland" <arnie@.1568.com> wrote in message news:OvFNuAvIHHA.1248@.TK2MSFTNGP03.phx.gbl...
> You could move all of the tables that you wish to back up, including their indexes, into a
> secondary file, in a secondary filegroup. You could then backup only that filegroup.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to the top yourself.
> - H. Norman Schwarzkopf
>
> <Laura.X.Kennedy@.JPMorgan.com> wrote in message
> news:1166478797.830720.145090@.79g2000cws.googlegroups.com...
>> Hi
>> Is there a way to backup many tables in a SQL Server database to a text
>> file all at once? I know this can be done individually using the
>> import/export wizard, but I have many tables that need to be backed up
>> often and still have the ability to restore them all at once as well.
>> Basically we use 1 database for many tests and after each test we want
>> to backup the data in certain tables, not backup the entire database.
>> Thanks
>> Laura
>

Backing up tables

I use SQL Server 2000 and I create scripts on a daily basis to do the following

1. Rename a table
2. Create table with original name and add new field
3. Copy data from renamed table to new table
4. Build indexes
-------------
execute sp_rename ORIGINAL, OLD
GO

CREATE TABLE [dbo].[ORIGINAL] (
[A] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[B] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[C] [int] NOT NULL ,
[Notes] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

INSERT INTO ORIGINAL (A, B, NOTES)
SELECT A, B, NOTES
FROM OLD

CREATE CLUSTERED INDEX [ORIGINAL_A_B] ON [dbo].[ORIGINAL]([A], [B] DESC ) WITH FILLFACTOR = 90 ON [PRIMARY]
GO
-------------

ON A TABLE WITH 100,000 RECORDS THIS KIND OF SCRIPT TAKES A LONG TIME TO DO THE INSERT/SELECT PART

I WOULD USE ALTER/ADD TO UPDATE THE TABLES, BUT MY SUPERIOR INSISTS THAT NOT HAVING TEXT FIELDS AS THE LAST FIELD IN THE TABLE WILL CAUSE QUERKY PROBLEMS WITH HIS SQL STATEMENTS
DOES ANYONE HAVE ANY KNOWLEDGE THAT THIS COULD BE TRUE?

IF SO,
DOES ANYONE HAVE ANY IDEAS FOR DOING THIS SAME PROCESS TO ADD A NEW FIELD (C) BEFORE THE FINAL FIELD (NOTES - TEXT FIELD), AND BACKUP THE TABLE BUT WITHOUT IT TAKING SUCH A LONG TIME ON THE INSERT/SELECT PART?

Forgive me if I'm asking a lot, but I'm lost and these scripts take way too long for what seems like such a simple task.

Thanks,
MitchWow sounds like he has a DB2 OS/390 v2.3 background

Look up the datatype in BOL...

They store pointer values, not the data...it's stored separatley...

If you don't mind being fired, call him a scrub...

The order of columns in a table should have very little impact...

But being anal goes with the job...

Try a bcp out and in with a format file...

The reason it's slow is because it's all being logged...the bcp will log only the pages...not every row....|||EDIT:

Oh, and btw, I use ALTER

Backing up Tables

Hi
Is there a way to backup many tables in a SQL Server database to a text
file all at once? I know this can be done individually using the
import/export wizard, but I have many tables that need to be backed up
often and still have the ability to restore them all at once as well.
Basically we use 1 database for many tests and after each test we want
to backup the data in certain tables, not backup the entire database.
Thanks
Laura
You could move all of the tables that you wish to back up, including their
indexes, into a secondary file, in a secondary filegroup. You could then
backup only that filegroup.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
<Laura.X.Kennedy@.JPMorgan.com> wrote in message
news:1166478797.830720.145090@.79g2000cws.googlegro ups.com...
> Hi
> Is there a way to backup many tables in a SQL Server database to a text
> file all at once? I know this can be done individually using the
> import/export wizard, but I have many tables that need to be backed up
> often and still have the ability to restore them all at once as well.
> Basically we use 1 database for many tests and after each test we want
> to backup the data in certain tables, not backup the entire database.
> Thanks
> Laura
>
|||DTS?
<Laura.X.Kennedy@.JPMorgan.com> wrote in message
news:1166478797.830720.145090@.79g2000cws.googlegro ups.com...
> Hi
> Is there a way to backup many tables in a SQL Server database to a text
> file all at once? I know this can be done individually using the
> import/export wizard, but I have many tables that need to be backed up
> often and still have the ability to restore them all at once as well.
> Basically we use 1 database for many tests and after each test we want
> to backup the data in certain tables, not backup the entire database.
> Thanks
> Laura
>

Backing up Tables

Hi
Is there a way to backup many tables in a SQL Server database to a text
file all at once? I know this can be done individually using the
import/export wizard, but I have many tables that need to be backed up
often and still have the ability to restore them all at once as well.
Basically we use 1 database for many tests and after each test we want
to backup the data in certain tables, not backup the entire database.
Thanks
LauraYou could move all of the tables that you wish to back up, including their
indexes, into a secondary file, in a secondary filegroup. You could then
backup only that filegroup.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
<Laura.X.Kennedy@.JPMorgan.com> wrote in message
news:1166478797.830720.145090@.79g2000cws.googlegroups.com...
> Hi
> Is there a way to backup many tables in a SQL Server database to a text
> file all at once? I know this can be done individually using the
> import/export wizard, but I have many tables that need to be backed up
> often and still have the ability to restore them all at once as well.
> Basically we use 1 database for many tests and after each test we want
> to backup the data in certain tables, not backup the entire database.
> Thanks
> Laura
>|||DTS?
<Laura.X.Kennedy@.JPMorgan.com> wrote in message
news:1166478797.830720.145090@.79g2000cws.googlegroups.com...
> Hi
> Is there a way to backup many tables in a SQL Server database to a text
> file all at once? I know this can be done individually using the
> import/export wizard, but I have many tables that need to be backed up
> often and still have the ability to restore them all at once as well.
> Basically we use 1 database for many tests and after each test we want
> to backup the data in certain tables, not backup the entire database.
> Thanks
> Laura
>|||Just be aware that restore is a bit tricky to restore in this scenario. You
can't just restore into
the production database without rolling forward all transaction logs up to c
urrent date and time.
You can restore into a new database assuming that you backuped up the primar
y filegroup as well (in
fact, possibly the backup need to be of the whole database - you need to tes
t), using the partial
option. You can then export the needed data into the production database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Arnie Rowland" <arnie@.1568.com> wrote in message news:OvFNuAvIHHA.1248@.TK2MSFTNGP03.phx.gbl
..
> You could move all of the tables that you wish to back up, including their
indexes, into a
> secondary file, in a secondary filegroup. You could then backup only that
filegroup.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to th
e top yourself.
> - H. Norman Schwarzkopf
>
> <Laura.X.Kennedy@.JPMorgan.com> wrote in message
> news:1166478797.830720.145090@.79g2000cws.googlegroups.com...
>