![]() ![]() #!/usr/bin/env python # -*- coding: utf8 -*- _version_ = '$Id: schema_ora.py 1754 08:57:52Z mn $' # export Oracle schema to text # usable to compare databases that should be the same # Oracle schema info: # author: Michal Niklas, Adam KopciĆski-Galik OPTIONS = """ Options: -tables_only raport only tables -separate-files save tables, views etc in separate files in db_schema directory, tables are defined as CREATE TABLE statement -sorted-info for CREATE TABLE add comment with columns sorted by name -zip with -separate-files enabled zip all created files -date-dir with -separate-files add date and time to db_schema_ directory with -o save file_name in db_schema_ directory -force-dir with -separate-files do not check if db_schema directory exists -o send results to file instead of stdout -version show version -add-ver-info add version information -ver-info-sql extend version information by results of this query """ USAGE = 'usage: \n\t schema_ora.py tnsentry username passwd %s ' % OPTIONS JUSAGE = """usage: jython schema_ora.py jdbcurl user passwd %s example: jython schema_ora.py usr pwd > db.sch """ % OPTIONS import codecs import sys import os import zipfile import os.path import time import re USE_JYTHON = 0 TABLES_ONLY = 0 SCHEMA_DIR = 'db_schema' if '-date-dir' in sys.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |