Please let me know if you have any thoughts on how to read a table that has all the oracle sql files or shell scripts at the job and step level to identify all the tables that does merge, update, delete, insert, create, truncate, alter table (ALTER TABLE XYZ RENAME TO ABC) and call them out separately to write to table and to a file as well. We have thousands of jobs and trying to write a script to gather all these details into a table and file.
Table Name:Steps Table Name:Schedule
Output
Column SCHEMA_XF Build means create table as select * from table a
Column SCHEMA_XF Swap means alter table a rename to b
Thank you
Moderator's Comments:
Please use code tags for output and code.
Thanks!
Last edited by Peasant; 02-14-2020 at 03:11 PM..
Reason: Added code tags.
Hi all,
Please see my requirement and post me asap.
Spool all the tables names into a file . Take each table name and check if it is present in any of the scripts in a directory using grep -il command. The script has to loop through the tables list and take each table and find it's presence... (7 Replies)
Hi
I need to write a shell script that will access tables available on webpages and update a table on my webpage on a periodic basis. It will access, say for example a website that periodically update a table with certain quantities and update my table accordingly.it should have the flexibility... (0 Replies)
Hi-
I am trying to achieve the following in a script so I can schedule it on a cron job. I am fairly new to the unix environment...
I have written a shell script that reads a flat file and loads the data into an Oracle table (Table1) via SQLLDR. This Works fine. Then, I run a nested insert... (5 Replies)
Hi ,
I have two tables with same length t1 and t2, I want to cretae a new third table where i put the difference between the elements of t2 and t1,
t3= t1 - t2
t3= t1 - t2
I am new to scripts, any help please? thanks (7 Replies)
I'm pretty new to the database world and I've run into a mental block of sorts. I've been unable to find the answer anywhere. Here's my problem: I have several tables and everything is as normalized as possible (as I've been lead to understand normalization.) Normalization has lead to some... (1 Reply)
Hi!
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
i.e
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Hi Experts:
I have a shell script that's kicked off by cron. Inside this shell script, I need to kick off two or more oracle sql scripts to process different groups of tables. And when both sql scripts are done, I will continue in the shell script to do other things like checking processing... (3 Replies)
dear all
please help me !
i need a script for exporting the selected tables of oracle database installed on CentOs.
i waiting your response.
thanks and regards (6 Replies)
Good evening
I nned your help pls, In an unix server i want to connect to a remote oracle databse server by sqlplus.
I tried to find out the user/passwd and service name by env variable and all Ive got is this:
ORACLE_SID_REPCOL=SCL_REPCOL
ORACLE_SID=xmeta
ORACLE_SID_TOL=SCL_PROTOLCOL... (2 Replies)
Discussion started by: alexcol
2 Replies
LEARN ABOUT DEBIAN
sqlt-diff
SQLT-DIFF(1p) User Contributed Perl Documentation SQLT-DIFF(1p)NAME
sqlt-diff - find the differences b/w two schemas
SYNOPSIS
For help:
sqlt-diff -h|--help
For a list of all valid parsers:
sqlt -l|--list
To diff two schemas:
sqlt-diff [options] file_name1=parser1 file_name2=parser2
Options:
-d|--debug Show debugging info
-t|--trace Turn on tracing for Parse::RecDescent
-c|--case-insensitive Compare tables/columns case-insensitively
--ignore-index-names Ignore index name differences
--ignore-constraint-names Ignore constraint name differences
--mysql_parser_version=<#####> Specify a target MySQL parser version
for dealing with /*! comments
--output-db=<Producer> This Producer will be used instead of one
corresponding to parser1 to format output
for new tables
--ignore-view-sql Ignore view SQL differences
--ignore-proc-sql Ignore procedure SQL differences
--no-batch-alters Do not clump multile alters to the same table into a
single ALTER TABLE statement where possible.
--quote=<character> Use <character> to quote all table and field
names in statements
DESCRIPTION
sqlt-diff is a utility for creating a file of SQL commands necessary to transform the first schema provided to the second. While not yet
exhaustive in its ability to mutate the entire schema, it will report the following
o New tables
Using the Producer class of the target (second) schema, any tables missing in the first schema will be generated in their entirety
(fields, constraints, indices).
o Missing/altered fields
Any fields missing or altered between the two schemas will be reported as:
ALTER TABLE <table_name>
[DROP <field_name>]
[CHANGE <field_name> <datatype> (<size>)] ;
o Missing/altered indices
Any indices missing or of a different type or on different fields will be indicated. Indices that should be dropped will be reported
as such:
DROP INDEX <index_name> ON <table_name> ;
An index of a different type or on different fields will be reported as a new index as such:
CREATE [<index_type>] INDEX [<index_name>] ON <table_name>
( <field_name>[,<field_name>] ) ;
ALTER, CREATE, DROP statements are created by SQL::Translator::Producer::*, see there for support/problems.
Currently (v0.0900), only MySQL is supported by this code.
AUTHOR
Ken Youens-Clark <kclark@cpan.org>.
SEE ALSO
SQL::Translator, <http://sqlfairy.sourceforge.net>.
perl v5.14.2 2012-01-18 SQLT-DIFF(1p)