PowerShell script exchange
Post Reply
ekisner
Expert
Posts: 202
Liked: 34 times
Joined: Jul 26, 2012 8:04 pm
Full Name: Erik Kisner
Contact:

Remote Powershell - SQL Server Unavailable

Post by ekisner »

I have a powershell module in which I create and collect useful powershell commands. I have decided to make one which will give me, for each VM:
VMname, Replica (if any), latest snapshot of replica, Whether or not it has a B2D job, the most recent B2D restore point, and the number of B2D points that it has.

I have most of it working. Except for the fact that I have two B&R servers running, one for replication and one for B2D/tape. The one which does the replication also hosts the database via MS SQL express.

When I run my invoke-command on the one which locally houses the database, the command returns results no problem. When I run my invoke-command on the other, just a simple {asnp VeeamPSSnapIn; $result = get-vbrjob; $result} I get an error that the configuration database is inaccessible.

Code: Select all

Microsoft SQL server hosting the configuration database is currently unavailable. Possible reasons are heavy load,
networking issue, server reboot, or hot backup.
Please wait, and try again later.
Error information:
SQL server is not available
Having done some reading, the biggest issue looks like it is credentials. Both B&R server services use the same domain credentials, which are mapped to DBO. My local user exists within the local administrators group, and as well has explicitly defined permissions giving me owner and sysadmin on both of the B&R databases, which produced no change in the error message. The commands do work just fine when run locally on the server.

Anyone have any suggestions?
pizzim13
Enthusiast
Posts: 94
Liked: 6 times
Joined: Apr 21, 2011 7:37 pm
Contact:

Re: Remote Powershell - SQL Server Unavailable

Post by pizzim13 »

This is due to powershell not be able to pass your creds correctly. You need to enable CredSSP for second hop. http://blogs.msdn.com/b/powershell/arch ... count.aspx
veremin
Product Manager
Posts: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Remote Powershell - SQL Server Unavailable

Post by veremin »

And this topic might shed a light on the experienced behaviour. Thanks.
ekisner
Expert
Posts: 202
Liked: 34 times
Joined: Jul 26, 2012 8:04 pm
Full Name: Erik Kisner
Contact:

Re: Remote Powershell - SQL Server Unavailable

Post by ekisner »

Thank you for your replies, both of you.

I had indeed enabled CredSSP on both of the servers, however reading through it again I saw that I needed to enable it on my local workstation as well.

It's a bit annoying to have to throw up a credential prompt, but it's far less annoying than gathering all the data by hand :)
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests