Popular recipes tagged "sqlsmo" but not "threading"http://code.activestate.com/recipes/tags/sqlsmo-threading/2015-03-28T16:58:11-07:00ActiveState Code RecipesPython SQLSMO (Python)
2015-03-28T16:58:11-07:00Jorge Besadahttp://code.activestate.com/recipes/users/100038/http://code.activestate.com/recipes/578977-python-sqlsmo/
<p style="color: grey">
Python
recipe 578977
by <a href="/recipes/users/100038/">Jorge Besada</a>
(<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/smo/">smo</a>, <a href="/recipes/tags/sql/">sql</a>, <a href="/recipes/tags/sqlsmo/">sqlsmo</a>).
Revision 15.
</p>
<p>I needed a Python library equivalent to the SQL Server Management Objects (SMO) and did not find it, so I created my own version. It does not follow the standard SMO objects names. So far it has a set of basic functionality: to make backups, restores with move, sync logins for restored databases, check disk space. I included a good sized testing harness to get you going. This version uses sqlcmd for connectivity. I use this SQLSMO library as an imported module in several of my Python applications.
It has been tested with SQL 2012 and SQL 2014, it should function with versions down to 2005.</p>