473,387 Members | 1,535 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,387 software developers and data experts.

how to take database backup

hi
i am using vb.net2005
i want to take daily backup from application
and attach that daily backup if any data loss
Sep 7 '08 #1
2 2685
Abhijit Taur wrote:
i am using vb.net2005
i want to take daily backup from application
and attach that daily backup if any data loss
Read http://msdn.microsoft.com/en-us/libr...5(SQL.90).aspx
and http://msdn.microsoft.com/en-us/libr...2(SQL.90).aspx, if
it is not clear then ask more specific.

Arne
Sep 7 '08 #2

"Abhijit Taur" wrote:
hi
i am using vb.net2005
i want to take daily backup from application
and attach that daily backup if any data loss
You need to use Microsoft.SqlServer.Management objects

using System.Data.SqlClient;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;
....
using (SqlConnection conn = new SqlConnection(connString))
{
ServerConnection serverConnection = new ServerConnection(conn);
Server server = new Server(serverConnection);
Backup backup = new Backup();
backup.SqlBackup(server);
}

Translate to vb.net as necessary (PS you did as a C# group :P )

You will most likely have to set several properties on the Backup object
before calling SqlBackup, as well as subscribe to events.

--
Happy Coding!
Morten Wennevik [C# MVP]
Sep 8 '08 #3

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

Similar topics

1
by: Leader | last post by:
Hi, I want to take backup of database logfile periodically and automatically. What should i do then..... Thanks Hoque
2
by: Rajesh Garg | last post by:
I will make it simpler to look... I have DB1 - as backup for day 1 LOg1 as backup of logs T1 T2 T3 T4 T5 ...some transaction on day 2 Now i backup again DB2 Log2
6
by: Edwinah63 | last post by:
Hi Gurus, i am having problems with restoring a ms sql database. i have restored the database using veritas to a different location ('g:\datafiles') in no recover mode. when i view the...
5
by: HSP | last post by:
hi. i need to restore an old database. The db was backed up using a DLT drive, using 2 volumes. The content for the tapes was copied to file onto Solaris machine using rsh and dd (for backup...
3
by: yoyo | last post by:
So I get a call from my customer this morning, he tells me the database has hung during the TSM backup and nobody can connect. After tyring a few things, I resorted to db2_kill, and db2start. I...
0
by: sajijkumar | last post by:
How can I take backup of the database to flash drive. I used a Dir and Drive list box controls to select the perticular dir, and Wrote the code, Shell "command.com /c copy " & App.Path &...
2
by: barrathi | last post by:
hai all, i have 10 database in one server. i need to take a backup daily iam using this type of query ex: mysqldump -a -u root -p dbname > dbname.sql(for each db) but i need
5
by: Steve | last post by:
Hi; I thought I would rephrase a question I asked in another post to more quickly get to the heart of the matter. My apologies for anyone who is offended by what appears to be a repetition. ...
0
by: chinna | last post by:
Hi , Can anybody help me in taking up the database backup. I don't have any idea about db2 and know a bit in oracle. In oracle we can import and export data that may be in the same database...
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...

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.