Popular Python recipes tagged "meta:requires=cx_oracle"http://code.activestate.com/recipes/langs/python/tags/meta:requires=cx_oracle/2014-02-21T09:18:55-08:00ActiveState Code Recipessql+ the SQL*Plus killer (Python)
2013-03-14T09:13:01-07:00johttp://code.activestate.com/recipes/users/4185610/http://code.activestate.com/recipes/578490-sql-the-sqlplus-killer/
<p style="color: grey">
Python
recipe 578490
by <a href="/recipes/users/4185610/">jo</a>
(<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/db/">db</a>, <a href="/recipes/tags/db_client/">db_client</a>, <a href="/recipes/tags/sql/">sql</a>, <a href="/recipes/tags/sql_client/">sql_client</a>).
Revision 3.
</p>
<p>This recipe is an emulator of the Oracle SQL*Plus, but it does things in a more friendly way ;).</p>
<p>If you need a client to access your Oracle but you don't like SQL*Plus, try this one.</p>
<p>This recipe was inspired by James Thiele's Console built with Cmd object recipe.</p>
<p>It provides a 'help' facility and supplies command completion when you hit the 'tab' key.</p>
<p>In addition you can use command line editing and history keys.</p>
<p>Here are the commands that you can use:</p>
<pre class="prettyprint"><code>========================================
Documented commands (type help <topic>):
========================================
constraints edit help input sequences shell
db exit history output set tables
desc foreigns index quit settings triggers
</code></pre>
<p>You can edit the queries using 'vim' or any other editor.</p>
<p>The command 'output' can redirect output to a file and command 'input' can input commands from a file.</p>
<p>There's paginated output.</p>
<p>The command 'shell' or '!' allow you to perform operating system commands.</p>
<p>You can add commands by defining methods with names of the form 'do_xxx()' where 'xxx' is
the name of the command you wish to add.</p>
<p>There is a configuration file (.sql+) where you need to enter the dburi, editor name and other
settings.</p>
Export Oracle Database to CSV using cx_Oracle (Python)
2010-07-11T19:49:42-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577304-export-oracle-database-to-csv-using-cx_oracle/
<p style="color: grey">
Python
recipe 577304
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/csv/">csv</a>, <a href="/recipes/tags/database/">database</a>).
</p>
<p>Creates a CSV file for each table in the target Oracle database.</p>
Oracle Database String Search using cx_Oracle (Python)
2013-07-26T21:58:30-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577302-oracle-database-string-search-using-cx_oracle/
<p style="color: grey">
Python
recipe 577302
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/csv/">csv</a>, <a href="/recipes/tags/database/">database</a>).
Revision 2.
</p>
<p>Finds all database rows in all tables that contain a given search string and outputs a CSV file for each table that has any match.</p>
Oracle Database Regex Search using cx_Oracle (Python)
2010-07-11T19:39:21-07:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577303-oracle-database-regex-search-using-cx_oracle/
<p style="color: grey">
Python
recipe 577303
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/csv/">csv</a>, <a href="/recipes/tags/database/">database</a>).
</p>
<p>Finds all database rows in all tables that contain any column which matches to given regex and outputs a CSV file for each table containing matches.</p>
Dump Oracle db schema to text (Python)
2014-02-21T09:18:55-08:00Michal Niklashttp://code.activestate.com/recipes/users/186902/http://code.activestate.com/recipes/576534-dump-oracle-db-schema-to-text/
<p style="color: grey">
Python
recipe 576534
by <a href="/recipes/users/186902/">Michal Niklas</a>
(<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/oracle/">oracle</a>, <a href="/recipes/tags/schema/">schema</a>).
Revision 19.
</p>
<p>Export Oracle schema to text.
Usable to compare databases that should be the same</p>
<p>Oracle schema info:
<a href="http://www.eveandersson.com/writing/data-model-reverse-engineering" rel="nofollow">http://www.eveandersson.com/writing/data-model-reverse-engineering</a></p>
<p>With <code>--separate-files</code> can save table information as <code>CREATE TABLE</code> statements and all view/function art objects are in separate files (sometime it is easier to compare directories with files than compare two big files)</p>