As I mentioned (I have managed using "cvpysdk" to get a sql database restore happening from one server to another sql instance.) so yes I can do an out of place restore to sql server.
My need is to set up automation. To do this I need to
1. Identify if this server is part of an availability group setup and if so use that aoag setup if not use the server instance
2. As I am unable to do a restore with a new name, I require to restore to a flat file structure so I can then do the restore
My issues so far have been
- I have tried to return all properties at server and SQL server instance level but am unable to retrieve the information on "Availability Replica Clients".
- I have not been able to figure out how to save it to a folder location
Has someone done anything similar or can point me in the right direction.