IIS ASP - Backup a database table

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > March 2007 > Backup a database table





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Backup a database table
peashoe

2007-03-26, 1:19 pm

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

Jon Paal [MSMD]

2007-03-26, 1:19 pm


do a table dump

http://www.databasejournal.com/feat...cle.php/2206571



"peashoe" <peashoe@yahoo.com> wrote in message news:1174926235.893444.318790@b75g2000hsg.googlegroups.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
>



Jeff

2007-03-27, 7:25 pm


"Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot com> wrote in message
news:130fulbfe04b0aa@corp.supernews.com...
>
> do a table dump
>
> http://www.databasejournal.com/feat...cle.php/2206571
>
>
>
> "peashoe" <peashoe@yahoo.com> wrote in message
> news:1174926235.893444.318790@b75g2000hsg.googlegroups.com...
>
>


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


Jon Paal [MSMD]

2007-03-27, 7:25 pm

You should respond to "peashoe"



>
> is this the wrong way to do this??
>



Evertjan.

2007-03-28, 7:18 am

Jon Paal [MSMD] wrote on 28 mrt 2007 in
microsoft.public.inetserver.asp.general:

>
> You should respond to "peashoe"


[Please do not toppost on usenet]

This is usenet, so one responds to the group, Jon. ;-)
[vbcol=seagreen]

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)
Jon Paal [MSMD]

2007-03-28, 1:17 pm

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.




Evertjan.

2007-03-28, 7:16 pm

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)
Jon Paal [MSMD]

2007-03-28, 7:16 pm

please top post, it makes it easier for everyone to read...


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com