[chef] RE: Re: Questions on executing *.sql files in Windows


Chronological Thread 
  • From: "Fouts, Chris" < >
  • To: " " < >
  • Subject: [chef] RE: Re: Questions on executing *.sql files in Windows
  • Date: Wed, 15 Jul 2015 15:10:51 +0000
  • Accept-language: en-US

Thank you!

 

Chris

 

From: Steven Murawski [mailto:
Sent: Wednesday, July 15, 2015 11:05 AM
To:
Subject: [chef] Re: Questions on executing *.sql files in Windows

 

It won't just find your script.  

 

To reference the file_cache_path, you can use Chef::Config[:file_cache_path]



Steve

 

Steven Murawski

Community Software Development Engineer @ Chef

Microsoft MVP - PowerShell
http://stevenmurawski.com

On 7/15/2015 9:38:17 AM, Fouts, Chris < "> > wrote:

I want to run the following inside a windows_batch resource

 

windows_batch “Drop DB” do

  sqlcmd –S -db or -U user –P passwork –i DropDB.sql

end

 

Do I put the DropDB.sql file in my cookbook’s files/default directory? If so the file will end up in c:\chef\cache\cookbooks\mycookbook\files\default directory. Will windows_batch resource know to find it there? If not I may have to do this?

 

windows_batch “Drop DB” do

  sqlcmd –S -db or -U user –P passwork –i c:\chef\cache\cookbooks\mycookbook\files\default DropDB.sql

end

 

Is there a path known to Chef that I can use to replace c:\chef\cache at least?

 

Chris

 

 

 

 




Archive powered by MHonArc 2.6.16.

§