Data Backup and Recovery

SnapManager for SQL Server PowerShell problem

penningtonkr
5,406 Views

Hi,

Im trying to use the powershell scripts in order to interface with SMSQL on a 2 node cluster but have encountered the following problems when trying to use any of the commands:

PS C:\Program Files\NetApp\SnapManager for SQL Server> get-backup
Initializing [get-backup]
Connecting to server: [TMTESTSQLCLU01] [processing]


Failed to connect to the specified SQL Server.


Details: Error Code: 0xC0040804 Failed to connect to the specified SQL Server.


Failed to connect to Server: [TMTESTSQLCLU01]
get-backup : Failed to invoke the backup operation.
At line:1 char:10
+ get-backup <<<<

Scenario:

This is a two node active/passive SQL config as follows:

Cluster name: TMTESTCLUSRV

Instance name: TMTESTCLUSRV

Servername 1: TMTESTSQLCLU01

Servername 2: TMTESTSQLCLU02

Things I have checked:

  • I am running the commands via windows authentication and the account i am using has the sysadmin role in SQL and is a local administrator on the host
  • SnapManager backup and restore works throught the GUI using the same account so permissions look fine
  • I have used the command without -Server flag and get the same error
  • I have used the command with -Server and specified the nodes names and cluster name and all come back with the same error
  • The firewall is off for purposes of testing

Useful Information:

Windows Server 2003 SP2 Enterprise Edtion

SQL Server 2005 V9.0

SnapDrive 6.3 x64

SnapManager for SQL Server Version 5.1.0.676

PowerShell version 1.0.0.0

Can anyone see where I am going wrong with this?

1 ACCEPTED SOLUTION

draj
5,406 Views

Here is the example given for get-backup cmdlet;

PS C:\Program Files\NetApp\SnapManager for SQL Server> get-help get-backup -exam
ples

NAME
    get-backup

SYNOPSIS
    This cmdlet enables you to list the backup sets of a particular database us
    ing the SnapManager SQL Server PowerShell command-line interface.

    EXAMPLE #1

    get-backup -svr 'VM-VS-1' -inst vm-vs-1 -d 'ds_test7'

      This example retrieves the backed up database list on a server instance o
    f the specified server.

You can probably try:

get-backup -svr 'TMTESTCLUSRV' -inst 'TMTESTCLUSRV'

View solution in original post

4 REPLIES 4

draj
5,406 Views

Hi,

Try giving the clustered instance name only (TMTESTCLUSRV) for -server and check if it works.

Thanks,

Deva

penningtonkr
5,406 Views

Deva,

This is the output from the command pointed at the server cluster name:

PS C:\Program Files\NetApp\SnapManager for SQL Server> get-backup -server TMTESTCLUSRV

Initializing [get-backup]
Connecting to server: [TMTESTCLUSRV] [processing]


Failed to connect to the specified SQL Server.


Details: Error Code: 0xC0040804 Failed to connect to the specified SQL Server.


Retrying to connect to SQL Server for validation [TMTESTSQLCLU01]


Failed to connect to the specified SQL Server.


Details: Error Code: 0xC0040804 Failed to connect to the specified SQL Server.


Failed to connect to Server: [TMTESTCLUSRV]
get-backup : Failed to invoke the backup operation.
At line:1 char:11
+ get-backup  <<<< -server TMTESTCLUSRV

Any ideas?

draj
5,407 Views

Here is the example given for get-backup cmdlet;

PS C:\Program Files\NetApp\SnapManager for SQL Server> get-help get-backup -exam
ples

NAME
    get-backup

SYNOPSIS
    This cmdlet enables you to list the backup sets of a particular database us
    ing the SnapManager SQL Server PowerShell command-line interface.

    EXAMPLE #1

    get-backup -svr 'VM-VS-1' -inst vm-vs-1 -d 'ds_test7'

      This example retrieves the backed up database list on a server instance o
    f the specified server.

You can probably try:

get-backup -svr 'TMTESTCLUSRV' -inst 'TMTESTCLUSRV'

penningtonkr
5,406 Views

Deva,

Sorted you were spot on , thanks for you help:

PS C:\Program Files\NetApp\SnapManager for SQL Server> get-backup -svr 'TMTESTCL
USRV' -inst 'TMTESTCLUSRV'
Initializing [get-backup]
Connecting to server: [TMTESTCLUSRV] [processing]
Connecting to server: [TMTESTCLUSRV] [completed]

Public