Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 5th, 2004, 04:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default sql server database backup by script

how can backup the sql database by the script ?

Please give example how can make the script that it
backup the databases (two database) ?
I want to use script in the job scheduling by run the script
weekly bases.

By the enterprise manager easily can take backup. but we want
backup perform automatically weekly.

regards.

Mateen



Reply With Quote
  #2 (permalink)  
Old July 5th, 2004, 04:58 AM
Registered User
 
Join Date: Nov 2003
Location: Bangalore, Karnataka, India.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Ramanuj Send a message via Yahoo to Ramanuj
Default

BACKUP DATABASE { database_name | @database_name_var }
TO < backup_device > [ ,...n ]


Reply With Quote
  #3 (permalink)  
Old July 5th, 2004, 11:17 PM
Authorized User
 
Join Date: Jun 2004
Location: Aurangabad, Maharashtra, India.
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

hi Mateen,

If you want backup operation to be happened automatically then you can have one more option provided by sql server itself. "Scheduler". By using Schedule backup task whatever span you want to specify you can for backup operation.

Provided you SQL Server Agent running all the time. When you schedule something. it gets added as a Job in "Management > Sql Server Agent > Jobs" in Enterprise Manager. You can even change the job from there also.



Vinod Pawar
Software Developer
India
Reply With Quote
  #4 (permalink)  
Old July 6th, 2004, 05:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: abu dbabi, , United Arab Emirates.
Posts: 518
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks for response.

backup by schedule is good, but for this, you have to Access (enter) the
enterprise menager with rights. I want that I write script and run it make
backup the database. just like in Oracle. In Oracle write script in text file
ie.
database startup nomount
start backup
path etc...........
.....

database mount
end backup

just like this. without accessing Enterprise Manager,
script run and make backup at defind path of hard disk.
it is possible in sql server 2000 ?

regards.

Mateen



Reply With Quote
  #5 (permalink)  
Old July 6th, 2004, 12:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Mateen,

Then you will have to look for BACKUP DATABASE command on BOL and use it accordingly, as Ramanuj suggested.

Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How i can Backup and Restore Sql Server Database hamor ASP.NET 2.0 Professional 1 April 24th, 2007 07:03 AM
How to Backup database - SQL Server 2000 cancer10 SQL Language 2 March 1st, 2007 07:21 AM
How to take SQL Server Database Backup via .NET?? savan_thakkar ASP.NET 1.0 and 1.1 Professional 9 February 22nd, 2006 08:01 AM
SQL Server 2000 backup from command line vmaruv SQL Server 2000 3 February 3rd, 2005 07:54 PM
SQL Server Backup Restore zaeem Classic ASP Databases 0 December 4th, 2003 09:02 AM



All times are GMT -4. The time now is 04:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.