If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > Quickest way to extract procedures

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-03-03, 11:47
Wale Wale is offline
Registered User
 
Join Date: Mar 2002
Posts: 162
Quickest way to extract procedures

I am trying to figure out a way to spool or extract all my procedures DDL
without having to copy and paste each one,into an editor file.

Thanks in advance for the help.

I am using ASE 11.5

'W
Reply With Quote
  #2 (permalink)  
Old 02-03-03, 18:48
mpeppler mpeppler is offline
Registered User
 
Join Date: Jan 2003
Location: Geneva, Switzerland
Posts: 353
If you have perl then I suggest using dbschema.pl (http://www.midsomer.org).

Michael
Reply With Quote
  #3 (permalink)  
Old 03-11-03, 05:44
db_mate db_mate is offline
Registered User
 
Join Date: Mar 2003
Posts: 15
Re: Quickest way to extract procedures

Quote:
Originally posted by Wale
I am trying to figure out a way to spool or extract all my procedures DDL
without having to copy and paste each one,into an editor file.

Thanks in advance for the help.

I am using ASE 11.5

'W

use sybase utility defncopy...

you can write a select statement to create defncopy commands or get all object names and then write a awk

HTH
__________________
db_mate
Reply With Quote
  #4 (permalink)  
Old 03-13-03, 09:36
svelasco svelasco is offline
Registered User
 
Join Date: Jun 2002
Location: Argentina
Posts: 78
This is the dirty way !!
You can try to make a select to "syscomments", but the trouble is that the code is split in rows.
So I use this select into SQL Advantage :

SELECT "#", text
FROM syscomments,
sysobjects
WHERE sysobjects.id = syscomments.id
AND type = "P"
AND uid = user_id()
ORDER by syscomments.id,
syscomments.colid2,
syscomments.colid


and then replace with regexp like this " \n# " all the split lines (I use Textpad).

Be carefull !!
You must know that may be there is some store that need extra code to create temp tables before create the store.
Reply With Quote
  #5 (permalink)  
Old 03-13-03, 11:00
Wale Wale is offline
Registered User
 
Join Date: Mar 2002
Posts: 162
Quote:
Originally posted by svelasco
This is the dirty way !!
You can try to make a select to "syscomments", but the trouble is that the code is split in rows.
So I use this select into SQL Advantage :

SELECT "#", text
FROM syscomments,
sysobjects
WHERE sysobjects.id = syscomments.id
AND type = "P"
AND uid = user_id()
ORDER by syscomments.id,
syscomments.colid2,
syscomments.colid


and then replace with regexp like this " \n# " all the split lines (I use Textpad).

Be carefull !!
You must know that may be there is some store that need extra code to create temp tables before create the store.

hehe thanks a lot man!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On