cancel
Showing results for 
Search instead for 
Did you mean: 

MS-SQL backup without using SQL agent

gregb
Not applicable

Hi all

 

I have a UNIX master/media server running 6.5.1. I'm running a backup of a Windows client (6.5.1) which is running MS-SQL. I get the error "The process cannot access the file because it is being used by another process" error for some mdf and ldf files. 

 

Is there a way to backup an MS-SQL database without using the NetBackup SQL agent? Can I stop and/or backup the database as part of some pre-backup scripts?

 

Has anyone done this?

 

Cheers


Greg

3 REPLIES 3

Andy_Welburn
Level 6

Our DBAs have arranged 'alternative' backup methods for our SQL d/b's (not a DBA myself so can't comment!).

 

Consequently, we use NB to save the 'backup' area that they have created and exclude all mdf/ldf files within the backup policy.

J_H_Is_gone
Level 6

I have lots of sql db's but don't use the NB agent.

 

the dba's create a "backup" dir.

and set up a job that does an sql db backup to the backup dir.

( I make sure I know what time the backup to disk finishes)

 

I set up an SQL policy (name only) that just does a backup of those servers AFTER I know the backup to disk has finished.

 

if they need a restore - they have last nights still on disk.

if they need something older, I just restore to a restore dir and let the dba's take it from there.

 

(FYI - I do almost the same thing for  oracle and informix - where we have a cron job that starts the bacukp to disk, then the script kicks off a user backup of just that dir to tape.  You could do the same thing with SQL - just work with the dba's on the script and set up a policy for user backups.)

 

Just be sure to exclued the contents of the SQL Data dir - where you get all the errors from open files.

Omar_Villa
Level 6
Employee

1. run a SQL dump backup (if your DB is not too big)

2. backup the folder where the dump is stored

 

this can work for some small or medium size DB's if your DB is going to be big I will not recommend this method because during the dump you can get several issues, has performance or even get corrupeted dumped files which you will not notice until you need them, been to late.

 

regards.