Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help to create SQL backup jobs with becmd and scripts file

Status
Not open for further replies.

jojiang

IS-IT--Management
Feb 13, 2003
3
US
I need to create SQL database backup jobs using becmd and script file (not through UI, please) with selected user databases, such as pubs and Nwind (without selecting system databases, such as master, msdb amd model). Is there anyone knows how to do it?
Thanks.
 
Any expert can help me the original question?
---
I need to develop automation method to stage various WIN2K Server for our hundreds and thousands customers. Veritas is just one of the products need to be auto-installed and configured on the server.
Manual steps are not option.
How to create SQL database backup jobs, which include some selective user databases while exclude some other databases using BECMD and script input file?
Veritas's Administrator guide does not provide this kind of information (According to the steps in the guide, all databases are selected).
Without providing a whole package for supporting exterprise auto-staging, Veritas cannot be claimed as a complete product! Am I wrong?
Is any top expert here can help me to solve this issue?
Thank you, again.
 
I can't help you with what you are trying to do. I use SQL Server's BACKUP DATABASE command to backup the database(s) to my hard drive (.bak file) and then I have a Veritas BE job that is scheduled to copy that file to tape on a daily basis. But I set up BE through the GUI, which you don't want to use.

Also, BE WILL NOT backup SQL files, to my knowledge, without the BE SQL Agent.

-SQLBill
 
Thank you, SQLBill.
We have the SQL Agent installed. Since our databases' sizes are typically very big from -- 2 GB to 10+ GB, we can not afford to backup them to local hard disk first and, then, backup those database backup files to a tape drive later. This would double the backuping time, consume too much harddisk space and create a larger time gap between the time of backupping to harddisk and the time of putting them onto the tape, which results in a higher risk of losing user data in a server disaster case.
We backup our user databases directly onto the tape drive (not use Microsoft SQL Server native tool but the Backup Exec).
During the server staging, all pre-defined backup jobs will be applied onto the target server. Since this is an auto-staging process, to define backup jobs through GUI is not acceptable. I need a way to create database backup jobs with selected databases using Veritas tools (BECMD and script input file). So far, I haven't figured out a valid way to achieve this goal.
I really need help on this topic.

Thanks.

 
Those aren't very big databases. One of mine is 192+ GB and another is 40+ GB. When I had only the 192+GB one I was backing up using BE SQL Agent. Took seven hours. Then I started backing it up to disk and it took only 5 hours. Then copying the .bak file to tape took 4 hours. So, yes it did take longer, but if the tape backup didn't work or got stopped in the middle I had the .bak file on the hard drive.

BTW - my 40+ GB database backs up in 26 minutes to a .bak file and then 1 hour to tape via BE (no SQL Agent used or needed).

With all the problems I had trying to restore my original backup from tape I'm not doing that again. I'll stick with my method.

-SQLBill
 
This seems like a good thread to post my question...
We have several SQL databases that I have been backing up using BE (I have been backing up the actual databases and logs).

But I have just purchased BE SQL agent (I wanted to back the databases up using a program actually designed for it). I have some questions about how the BE SQL agent works.
1. When I create a backup job, I see the datebases under 'My SQL Server &quot;<name>&quot;'. Are these the databases that I should actually be backing up (incase I lose the drive or other problems)??
2. Are the logs getting backed up from step 1??
3. How are all of my DTS packages being backed up??

Is there a better way to backup my SQL databases (I have about 8 databases under one Server Registration)??

Thanks!!
 
First, your post doesn't answer the original one and it's really not related so you should create your own thread.

Now, that being said:

1. Yes
2. Possibly
In SQL Server, what type of recovery are your databases set to? They must be set to FULL if you want the logs to be backed up.
3. Possibly
I believe the DTS packages are saved in the MSDB database. If so and if you select to backup that database, then the answer is yes.

Hope that helps. Also, if you aren't aware of it there's a Microsoft SQL Server forum in TEK-TIPS for your SQL Server queries.

-SQLBill
 
jojiang:
So far, it sounds like you haven't opened the command line and viewed options. Unfortunately, the Admin manual doesn't document all the command line switches available (shame on Veritas).
bemcmd -o8 -j testbackup -ni:default -db:pubs
This command tells BE to backup the Pubs database in the 'default' named instance in a job callked 'testbackup'.

SQLBill has a good strategy. He backs his database up using SQL Ent Mngr, then backs up the .bak files with Backup Exec. That 2nd backup he is doing to tape will not task the SQL Databases. He is accomplishing two things.
1. His SQL Ent. Mngr. backup to disk is very fast, so it will not task the SQL databases for very long.
2. The backup to tape can afford to take a long time as it is only tasking the network if it is remote. If SQL and Backup Exec for SQLBill is local, then the network isn't being tasked at all.

Smart thinking!!

With Backup Exec 9.0; you can backup to disk first. Then run a Copy backupset job to copy the backup set data to tape.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top