Output
Posted by: Rob Gudipudi
Date: July 12, 2012 11:00AM

Hello,

Can someone give me the output to this

#!/bin/ksh
#Stolen from John Doe 08-Dec-2011
#syntax ./run_show_create_tables.ksh username password
#Socket is hard coded, might have to change it

connections=$(mysql -u$1 -p$2 --socket=/tmp/mysql.sock -e "use
information_schema;select TABLE_SCHEMA,TABLE_NAME from TABLES where
TABLE_SCHEMA not in ('mysql','information_schema') order by 1,2;" |grep -v
TABLE_NAME |awk '{print $1 "." $2}')
for table_name in $connections
do
mysql -u$1 -p$2 -v -e "show create table $table_name\G" >> RPTSERVER3_CREATE_TABLE.tx
done

Thanks!

Options: ReplyQuote


Subject
Views
Written By
Posted
Output
5602
July 12, 2012 11:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.