Backup a database table
am 26.03.2007 18:23:55 von peashoeI 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
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
do a table dump
http://www.databasejournal.com/features/mssql/article.php/22 06571
"peashoe"
>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
>
You should respond to "peashoe"
>
> is this the wrong way to do this??
>
"Jon Paal [MSMD]"
news:130fulbfe04b0aa@corp.supernews.com...
>
> do a table dump
>
> http://www.databasejournal.com/features/mssql/article.php/22 06571
>
>
>
> "peashoe"
> 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
>>
>
>
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] 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)
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.
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)
please top post, it makes it easier for everyone to read...