The Multifunctioning DBA

Sep 20 2012   8:00AM GMT

Powershell and Unix

Colin Smith Colin Smith Profile: Colin Smith

I had a need to write some scripts that interface with a unix environment for some of the new Database Virtulization beta testing that I am doing. I found plink.exe. This is a great little command line ssh tool. I am able to create input files on the fly in my script and then call plink, pass it the file, and get the results into my variable. Then I am able to parse the results and act on the results that I get out.

For instance.

This virtualization product applies log backup files to the database as they are created on my source. I can plink into the box find the backupuuid of the last applied log, then I can query msdb on my source database to find all the logs that have been applied based on that uuid that I am getting from unix. Once I get that I can use powershell to go out to the windows filesystem and remove the log backup files that have already been applied to the VDB.

 

Good stuff. More to come on Virtulization. Should be getting an updated set of bits to test late this week.

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: