Unsolved

This post is more than 5 years old

1 Rookie

 • 

2 Posts

6217

March 31st, 2015 07:00

Script for automated backups in the SQL Server with DD boost

How can I use the command line ddbmsqlsv.exe with xp_cmdshell in SQL script for backup all databases in instance?

I try:

DECLARE @name VARCHAR(50)

DECLARE @path VARCHAR(1000)

DECLARE @server VARCHAR(1000)

SELECT  convert(varchar,SERVERPROPERTY('MachineName'))

DECLARE db_cursor CURSOR FOR 

SELECT name

FROM master.dbo.sysdatabases

WHERE name NOT IN ('master','model','msdb','tempdb')  -- exclude these databases

OPEN db_cursor  

FETCH NEXT FROM db_cursor INTO @name  

WHILE @@FETCH_STATUS = 0  

BEGIN  

  set @path='C:\Scripts\ddboost.bat  '+@name

  --print @path

  execute xp_cmdshell @path

        FETCH NEXT FROM db_cursor INTO @name  

END  

CLOSE db_cursor  

DEALLOCATE db_cursor

---

In ddboost.bat I have:

ddbmsqlsv.exe -c SERVER  -l full -a NSR_DFA_SI=TRUE -a NSR_DFA_SI_USE_DD=TRUE -a NSR_DFA_SI_DD_HOST=dddomain.com -a NSR_DFA_SI_DD_USER=user  -a NSR_DFA_SI_DEVICE_PATH=/SERVER MSSQL:%1

But when a execute the SQL, this error occurs:

ddbmsqlsv.exe -c SERVER  -l full -a NSR_DFA_SI=TRUE -a NSR_DFA_SI_USE_DD=TRUE -a NSR_DFA_SI_DD_HOST=ddboost.com -a NSR_DFA_SI_DD_USER=user  -a NSR_DFA_SI_DEVICE_PATH=/SERVER

MSSQL:db

43708:(pid 26324):Start time: Tue Mar 31 10:32:42 2015

43621:(pid 26324):Computer Name: SERVER     User Name: user

86745:(pid 26324):Version information for C:\Program Files\EMC DD Boost Modules\DDBMA\bin\ddbmsqlsv.exe:

Original file name: ddbmsqlsv.exe

Version: 1.0.0.208

Comments: Supporting SQL 2005, SQL 2008, SQL 2008 R2 and SQL 2012

43337:(pid 26324):Command line:

43338:(pid 26324):  ddbmsqlsv.exe -c SERVER -l full -a NSR_DFA_SI=TRUE -a NSR_DFA_SI_USE_DD=TRUE -a NSR_DFA_SI_DD_HOST=ddboost.com -a NSR_DFA_SI_DD_USER=user -a NSR_DFA_SI_DEVICE_PATH=/SERVER MS

SQL:db

            NSR_BACKUP_LEVEL: full;

                  NSR_CLIENT: NPOATJ71.tj.rs;

           NSR_DIRECT_ACCESS: Yes;

            NSR_SAVESET_NAME: "MSSQL:SGD";

                  NSR_SERVER: dd860.tjrs.gov.br;

37994:(pid 26324):Backing up SGD...

37827:(pid 26324):Can't configure VDI set (failed to recognize the SQL Server instance name).

37829:(pid 26324):bsVdiAbort: SignalAbort failed: protocol error.

53084:(pid 26324):Processing SGD failed, the item will be skipped.

ddbmsqlsv: MSSQL:SGD level=full, 0 KB 00:00:00,  1-file(s)-processed, 0-file(s)-succeeded

43709:(pid 26324):Stop time: Tue Mar 31 10:32:43 2015

In command line (cmd) I execute command without problems. It's works!

What's wrong with the combination xp_cmdshell and ddbmsqlsv.exe?

1 Rookie

 • 

2 Posts

March 31st, 2015 10:00

I just think that I need reboot server after install DD boost. Thats it?

17 Posts

April 14th, 2015 18:00

I have created a toolkit for SQL DDBoost which should help you with scripting this process.

Take a look at the below links.

SQL Server Data Domain Boost Scripting Toolkit

Data Domain Boost for SQL – Deployment Planning Considerations for DBA's - David Muegge's Blog

No Events found!

Top