[chef] sqlcmd not recognised


Chronological Thread 
  • From: Indra k < >
  • To: " " < >
  • Subject: [chef] sqlcmd not recognised
  • Date: Fri, 1 Aug 2014 19:44:47 +0800

Hi,

I need to restore database in sql server2008 r2 after installation,it installs successfully and transfer a backup db to a target machine but it shows this error

"sql command not recognised as internal or external command,operable program or batch file"

Also i restart a service using resource :

my code is here:

cookbook_file node['sqlstd']['dbpath']  do
        puts "enters"
        source node['sqlstd']['dbsrc']
        action :create
end


service node['sqlstd']['targetservice'] do
        
      action :restart
end


batch "sql restore db" do
        code <<-EOH

          cd "#{node['sqlstd']['setdbpath']}"
          sqlcmd -E -S "#{node['sqlstd']['dbserver']}" -Q "#{node['sqlstd']['dbrestore']}"
      
     EOH
end


Thanks,
Indra


  • [chef] sqlcmd not recognised, Indra k, 08/01/2014

Archive powered by MHonArc 2.6.16.

§