-
Hi I'm new to using dbatools. my concern is if possible run from python I can setup on docker container for schedule, for example like sync job between primary and secondary instance thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The module only works in a PowerShell session. You can call PowerShell within Python and also dotnet libraries. Most that want to interact with SQL in Python I believe are just using PYODBC and T-SQL for one-off stuff. If you are wanting to do instance management through Python I would see if there are any dotnet published packages for Python with SMO. The last time I had looked there wasn't but that was years ago now. Thoughts and discussions have come up about creating a native package for Python of dbatools but it would be a huge undertaking at this point. I'd consider it, even though I'm not the strongest with Python, but I'd need some sponsorship or something to show it would be a worthwhile effort I think. |
Beta Was this translation helpful? Give feedback.
The module only works in a PowerShell session. You can call PowerShell within Python and also dotnet libraries.
Most that want to interact with SQL in Python I believe are just using PYODBC and T-SQL for one-off stuff.
If you are wanting to do instance management through Python I would see if there are any dotnet published packages for Python with SMO. The last time I had looked there wasn't but that was years ago now.
Thoughts and discussions have come up about creating a native package for Python of dbatools but it would be a huge undertaking at this point. I'd consider it, even though I'm not the strongest with Python, but I'd need some sponsorship or something to show it would be a wo…