473,574 Members | 2,341 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

backup/restore from Program

How can I backup and restore a SQLServer DB from a .net VB program?
Nov 18 '05 #1
1 1520
You can do pretty much anything with T-SQL script. See SQL books online for more info.

I copied this examples right out from BO:

USE master
EXEC sp_addumpdevice 'disk', 'MyNwind_2',
'c:\Program Files\Microsoft SQL Server\MSSQL\BA CKUP\MyNwind_2. dat'

--Create the log backup device.
USE master
EXEC sp_addumpdevice 'disk', 'MyNwindLog1',
'c:\Program Files\Microsoft SQL Server\MSSQL\BA CKUP\MyNwindLog 1.dat'

-- Back up the full MyNwind database.

-- Update activity has occurred since the full database backup.

-- Back up the log of the MyNwind database.
TO MyNwindLog1

FILE = 'MyNwind_data_1 ',
FILE = 'MyNwind_data_2 ',
FILEGROUP = 'new_customers'
FROM MyNwind_1
-- Restore the log backup.
FROM MyNwindLog1

"G. Dean Blake" wrote:
How can I backup and restore a SQLServer DB from a .net VB program?

Nov 18 '05 #2

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

Similar topics

by: Spieg | last post by:
I've a program with VB6 working with SQLServer 2000. I have a Central Station with the program runnin with full prvileges and that can perform all the actions on the DB. There are also some clients that cannot be connected via LAN or internet that need to use the same DB. The way I solved this with Aces was to copy the Access file from the...
by: gcetti | last post by:
Can anyone recommend backup procedures for a SQL Server/MSDE product? We have upgraded our program from Access to SQL & before we could just tell our customers what .mdb files to include on their backup script. Now with SQL, the BACKUP/RESTORE SQL commands work as backups, but would involve a separate process for our customers to execute,...
by: anton.aleksandrov | last post by:
Hello, First of all - sorry for may be stupid question, but as I am not a Win* administrator and my field is *nix, I am a little bit stuck with a problem, presented to me by one of the customers. He has few windows boxes with some webfile and (most important) - mssql database. And he asks for a backup. I found some company, which offers us...
by: Eric Herber | last post by:
I've a question regarding db2 (V8.1) and database backups going to a storage manager like TSM for example. As I can see in the storage manager if I backup the complete database over the TSM API (no tablespace backups) the backup images is stored as a single backup object. Later I will be able to restore the complete database from this...
by: Hardy | last post by:
hi gurus, now I have to backup and restore a 8 T size db2 database. from two s85 to two 670. the partitions,tablespaces of the db should be redesigned then I plan to use redirected restore. but my concern is, such big size db, I'm afraid something unexpected will destory all the effort. Who have related experience? Can you give some advice?...
by: UnixSlaxer | last post by:
Hello, - I have a database, which i want to backup, not only the data, but also the indexes and views/procedures associated with it. Is the backup/restore operations (Through the DB2 Control Center) sufficient ? - And what happens if I later on add an index, and then restore the old database, will this new index/view be removed ? Any...
by: wolphie | last post by:
The IT shop I work in installed MS-SQL Server last week for the sole purpose of converting a large MS-SQL Server database to a format that Informix (our main database engine) can read. MSSQL Server installed perfectly, I can view/manipulate the little "Northwind" sample database, back it up to a file, restore it (Microsoft Tape Format) just...
by: Steve F | last post by:
i have a copy of a SQL Server 2000 database on an external hardrive. I have SQL Enterprise Manager 2005 on my laptop and was wondering if it is possible to view the backup on my laptop when external hard drive is plugged in. What other software/tools/procedures do i need to do to make the backup "viewable" Regards
by: Bootstrap Bill | last post by:
I'm looking for a PHP program to backup and restore a mysql database. I'm using Godaddy to host a forum. Their mysql control panel will only restore a database of two megabytes or less. My database is over 13 megabytes in size.
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.