473,385 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Backup a database table

I need to be able to add a button on my site that will backup an SQL
table (not the whole database) - does anyone know how to do that?

Thanks in advance
Lisa

Mar 26 '07 #1
7 3753

do a table dump

http://www.databasejournal.com/featu...le.php/2206571

"peashoe" <pe*****@yahoo.comwrote in message news:11**********************@b75g2000hsg.googlegr oups.com...
>I need to be able to add a button on my site that will backup an SQL
table (not the whole database) - does anyone know how to do that?

Thanks in advance
Lisa

Mar 26 '07 #2

"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot comwrote in message
news:13*************@corp.supernews.com...
>
do a table dump

http://www.databasejournal.com/featu...le.php/2206571

"peashoe" <pe*****@yahoo.comwrote in message
news:11**********************@b75g2000hsg.googlegr oups.com...
>>I need to be able to add a button on my site that will backup an SQL
table (not the whole database) - does anyone know how to do that?

Thanks in advance
Lisa

can you make a page called backup.asp

and have a script like.

strSQL = "select [field names] into [backup table name] from [table name]"
conn.execute (strSQL)

then you can just have a link or a form button that goes to that page??

if you plan on making a regular backup, you would have to have

strSQL = "drop table [backup name]"
conn.execute (strSQL)

before the copy script.
is this the wrong way to do this??
Mar 27 '07 #3
You should respond to "peashoe"
>
is this the wrong way to do this??

Mar 27 '07 #4
Jon Paal [MSMD] wrote on 28 mrt 2007 in
microsoft.public.inetserver.asp.general:
>is this the wrong way to do this??

You should respond to "peashoe"
[Please do not toppost on usenet]

This is usenet, so one responds to the group, Jon. ;-)
>strSQL = "select [field names] into [backup table name] from [table
name]" conn.execute (strSQL)

then you can just have a link or a form button that goes to that
page??

if you plan on making a regular backup, you would have to have

strSQL = "drop table [backup name]"
conn.execute (strSQL)
I think, though I did not test, this is a very nice way to do it.

Perhaps having a small pile of backups could be even safer:
strSQL = "drop table [backup3]"
conn.execute strSQL
strSQL = "select * into [backup3] from [backup2]"
conn.execute strSQL
strSQL = "drop table [backup2]"
conn.execute strSQL
strSQL = "select * into [backup2] from [backup1]"
conn.execute strSQL
strSQL = "drop table [backup1]"
conn.execute strSQL
strSQL = "select * into [backup1] from [table]"
conn.execute strSQL

or perhaps more efficient, work with a ring of backup tables and a
'mostRecentBackup' pointer in a seperate small table that could also
accomodate the datetime of each backup.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 28 '07 #5
This group has been top posting since I can remember (many years). I prefer top posting.

Top posting prevents having to scroll down through a hundred lines of history to see a final closing comment and since this is a
threaded discussion it makes good since to top post.


Mar 28 '07 #6
Jon Paal [MSMD] wrote on 28 mrt 2007 in
microsoft.public.inetserver.asp.general:
This group has been top posting since I can remember (many years). I
prefer top posting.
Are you responding to something, Jon? Quoting is there for a reason.

And this group has not been topposting in a majority of the posts for as
far as I can remember.
Top posting prevents having to scroll down through a hundred lines of
history
No it does not. It only would if senseless topposting would be the only
alternative senseless bottomposting, but the sensible alternative pointed
to in Netiquette is sparce interposting, not senseless bottomposting.
to see a final closing comment and since this is a
threaded discussion it makes good since to top post.
I hope you mean sense?

No it does not on usenet, Jon, since the nature of usenet prevents the
certainty that the post you are replying on is already on the local news
server, or is stil on the same. Netiquette is there for a reason also in
this case.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 28 '07 #7
please top post, it makes it easier for everyone to read...
Mar 28 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: James | last post by:
HI, I'm looking for a script that will allow users/admins to have a one click backup solution for a MYSQL Database.. 'BACK DATABASE' button, click and its done... The a restore option, that...
2
by: acko bogicevic | last post by:
Hi everyone I have the folowing situations with my backups. With Database Maintenance Plan is created backup strategy. Full Backup is performing every day at 1.00 am. And Romove files older than:...
2
by: Matt | last post by:
I run SQL Server 2000 and use thier database maintenance plans to backup my databases. My questions is what happens if a change is being made to a database table while a backup is running? Should I...
1
by: rcamarda | last post by:
I wish to create a user that can backup any or all databases in our SQL Server 2000 Instance. I thought there would be a server role for this function, however I can only find that after I grant...
1
by: alex | last post by:
Hi ! I couldn't make backups with our new system using db2 8.2. Every time I trigger a backup I get this error message: BACKUP DATABASE EBUERO2 ONLINE TO "/raid/backup/ebuero2/part1",...
2
by: Trent | last post by:
Hello, all. I have the following production DB2 environment. DB2 8.1.4 (fp4) WG edition with 2 production databases on Windows 2003 standard edition. My first question is regard with...
4
by: uthuras | last post by:
Hi all, I have DB2ESE version 8.1 with FP 4 on AIX 5.2. My database used to be 1.1TB. When the DB size is 1.1TB, it takes approximately 7 hours to backup the entire database (online backup). The...
4
by: Kittikun | last post by:
I am currently using the BACKUP DATABASE method to backup my database. Everything works fine, except for users. I created various users with sp_addlogin to access this database and they are located...
2
by: m19peters | last post by:
We have a script that I had to rework a little bit for 2005 that does a full backup for every database on the server... For some reason on some nights the script does not backup all databases......
3
by: Robertf987 | last post by:
Well, I think I've described what I want to do in the title here. In the database, I have two main tables that contain the main data for the database. One for group expenditures, another for...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.