This is a discussion on How to unload the schema from database ? within the Sybase forums, part of the Database Server Software category; --> Hi, I want to unload the schema off all the procedures that are there in the syabase database, can ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Daily download has to be cronned; LOGDAY=`date "+%j"` LOGDIR=`date "+%Y%m%d"` LOGID=`date "+%H%M"` mkdir $LOGDAY >/dev/null 2>/dev/null cd $LOGDAY mkdir UAT >/dev/null 2>/dev/null fileName=ProcedureCS.$LOGID fileTar=$fileName.tar isql -U... -P... -S... >$fileName <<%EOF% select name from sysobjects where type ='P' order by name go %EOF% for i in `cat $fileName ` do echo $i defncopy -U... -P... -S... out $i.sql DBNAME dbo.$i done |
| |||
| Hey, Write a script isql -Usa -S<Server> -PPASSWORD -osql.out<<! Use DB go select+"defncopy -Usa -S<server_name> out "+name+".sql <database_name> dbo."+name from sysobjects where type in ("P","TR") go ! Run the above script which wiull give you defncopy command lines for all your existing SP and Triggers. Then just run the sql.out file which will have all the defncopy statements for all the procs and trigs and this file sql.out will generate multiple files with the proc name.sql. Hope this helps. Regards Subhas j_v_dsilva@www.com (joseph v d'silva) wrote in message news:<25bda1a5.0310152006.7fc87c4d@posting.google. com>... > Hi, > > I want to unload the schema off all the procedures that are there in > the syabase database, can anyone tell me how to do this ? > > Thankx > > joe, |
| |||
| You can use DBPowerSuite's psListProcedures to do this, you can use psCopyProcedures to write a SQL script which reloads them. www.dbpowersuite.com "joseph v d'silva" <j_v_dsilva@www.com> wrote in message news:25bda1a5.0310152006.7fc87c4d@posting.google.c om... > Hi, > > I want to unload the schema off all the procedures that are there in > the syabase database, can anyone tell me how to do this ? > > Thankx > > joe, |
| ||||
| joseph v d'silva wrote: > Hi, > > I want to unload the schema off all the procedures that are there in > the syabase database, can anyone tell me how to do this ? Yet another alternative is to use dbschema.pl (grab a copy from ftp://ftp.midsomer.org/pub/dbschema.tgz), which uses the fantastic Sybperl libraries. dowen -- David Owen Midsomer Consultants Inc. dowen@midsomer.org Maintainer of the Sybase FAQ: http://www.isug.com/Sybase_FAQ |