Run script sql on ansible

675 views
Skip to first unread message

Ryad karkar

unread,
May 13, 2019, 4:05:06 AM5/13/19
to Ansible Project
Hey all,

I have a database SQL Server and i must run some script .sql on this database with ansible.

I would like know if possible to run script .sql with ansible on database SQL Server ?

Thanks for your help !! :)

Thank you guy !! ;)

Regards,

Ryad karkar

unread,
May 13, 2019, 11:16:44 AM5/13/19
to Ansible Project
Hey,

Someone can help me please !! :)

thanks community ansible !! ^^

Regards,

Игорь Туровский

unread,
May 15, 2019, 6:28:18 PM5/15/19
to ansible...@googlegroups.com
Generally, you can do with Ansible everything you can do with CLI on your platform. 
If you mean MS SQL server on Windows, you can:
  1. use win_copy to copy script.sql from Ansible host to Windows machine
  2. use win_shell: Invoke-SQLCmd -InputFile script.sql. 
Thank you,
- Igor


пн, 13 мая 2019 г. в 18:16, Ryad karkar <ryad9...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ea0e02fc-721e-4b23-9d13-2ad03bc47fc6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ryad karkar

unread,
May 20, 2019, 3:35:19 AM5/20/19
to Ansible Project
Hey Igor,

Thanks very much for your answer !! ;)

Thank you very much for your help !! ^^

Regards,


Le jeudi 16 mai 2019 00:28:18 UTC+2, Igor Turovsky a écrit :
Generally, you can do with Ansible everything you can do with CLI on your platform. 
If you mean MS SQL server on Windows, you can:
  1. use win_copy to copy script.sql from Ansible host to Windows machine
  2. use win_shell: Invoke-SQLCmd -InputFile script.sql. 
Thank you,
- Igor


пн, 13 мая 2019 г. в 18:16, Ryad karkar <ryad9...@gmail.com>:
Hey,

Someone can help me please !! :)

thanks community ansible !! ^^

Regards,


Le lundi 13 mai 2019 10:05:06 UTC+2, Ryad karkar a écrit :
Hey all,

I have a database SQL Server and i must run some script .sql on this database with ansible.

I would like know if possible to run script .sql with ansible on database SQL Server ?

Thanks for your help !! :)

Thank you guy !! ;)

Regards,

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages