How to setup DB Backup to network device for Active-Active SQL Cluster

  • We are in the process of configuring an active-active sql cluster in Windows Server 2003. SQL Enterprise Manager can see the R: and S: drives which are the sql data and log drives. Is it possible to do a disk backup the DB into a network drive. We have tried specifying \\servername\path but that does not seem to work. We also tried map the network drive to M: but SQL can still not see it. We looked at the options for adding a resource drive in the cluster adm but it does not have an option to add a network drive as a resource.

    The other option is for us to do dump the DB backup to the data drive and then transfer the file over to the network drive which seems to work. I am trying to reduce it to a 1 step process and also reduce the I/O on the data drive especially for transaction log dumps. 

    Your recommendation and timely response is greatly appreciated

     

    Subha 

  • SQL2005 ? or wrong forumgroup ?

    SQL2000 : make sure your sqlserver / sqlagent serviceaccout has got the needed authority for your network-shares.

    This job works fine overhere :

    BEGIN TRANSACTION           

      DECLARE @JobID BINARY(16) 

      DECLARE @ReturnCode INT   

      SELECT @ReturnCode = 0    

    IF (SELECT COUNT(*) FROM msdb.dbo.syscategories WHERE name = N'[Uncategorized (Local)]') < 1

      EXECUTE msdb.dbo.sp_add_category @name = N'[Uncategorized (Local)]'

    IF (SELECT COUNT(*) FROM msdb.dbo.sysjobs WHERE name = N'backup model UNC') > 0

      PRINT N'The job "backup model UNC" already exists so will not be replaced.'

    ELSE

    BEGIN

      -- Add the job

      EXECUTE @ReturnCode = msdb.dbo.sp_add_job @job_id = @JobID OUTPUT , @job_name = N'backup model UNC', @owner_login_name = N'sa', @description = N'No description available.', @category_name = N'[Uncategorized (Local)]', @enabled = 1, @notify_level_email = 0, @notify_level_page = 0, @notify_level_netsend = 0, @notify_level_eventlog = 2, @delete_level= 0

      IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback

      -- Add the job steps

      EXECUTE @ReturnCode = msdb.dbo.sp_add_jobstep @job_id = @JobID, @step_id = 1, @step_name = N'Backup Model unc', @command = N'BACKUP DATABASE [model] TO disk=''\\myBUserver\backups\myDBserver\Database\modelFull.bak'' WITH  INIT ,

           NOUNLOAD ,  NAME = ''model_Full'',

           SKIP ,  STATS = 10,  DESCRIPTION = ''Full Database Backup'' ,  NOFORMAT', @database_name = N'master', @server = N'', @database_user_name = N'', @subsystem = N'TSQL', @cmdexec_success_code = 0, @flags = 0, @retry_attempts = 0, @retry_interval = 1, @output_file_name = N'', @on_success_step_id = 0, @on_success_action = 1, @on_fail_step_id = 0, @on_fail_action = 2

      IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback

      EXECUTE @ReturnCode = msdb.dbo.sp_update_job @job_id = @JobID, @start_step_id = 1

      IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback

      -- Add the Target Servers

      EXECUTE @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @JobID, @server_name = N'(local)'

      IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback

    END

    COMMIT TRANSACTION         

    GOTO   EndSave             

    QuitWithRollback:

      IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION

    EndSave:

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply