0

I want to write a shell script wherein I have to find out the name of the tables begining with ad (I have written a query for that) and then I have to take backup of each such table present in database. I am using sybase database. How can I process each and every table? Which variables do I need to take to store the result of the above query?

glenn jackman
  • 238,783
  • 38
  • 220
  • 352
Aditya
  • 549
  • 1
  • 6
  • 11

1 Answers1

0

Look at dbschema.pl

http://www.peppler.org/downloads/dbschema-2_4_2.zip

I've used this script in production with success many times.

kolchanov
  • 2,018
  • 2
  • 14
  • 32
  • can you please highlight the sample snippet as i am new to both linux and sybase? I would really appreciate your help.. Thanx – Aditya Oct 10 '11 at 10:03
  • Something like (can't check myself) perl [folder path]dbschema.pl –S[server] –U[user] –P[password] –D[database] -O2 This script will create ddl bcp-out scripts for database objects. – kolchanov Oct 10 '11 at 10:53