PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Steve Coleman - SEWP <scoleman at sewp dot nasa dot gov>
Subject: Re: Re-Creating Sybase Indexes
Date: Mar 7 1996 5:25PM

A while back I started to develop a program in Sybperl to dump a database
definition (create table,indexes,forignkeys,rules,defaults,etc..) creating
a set of ISQL scripts that could be used in case the database had to be
rebuilt the hard way.  I never completed it (notably constraints are missing)
and it probably needs more work.  This seems to be a good time to let someone
else have a chance since I have not had the time to invest in it.  If some
kind soul would like to take a stab at it I would be happy to get any feedback
or patches that would make this a good public domain utility.

It uses an OOP extention 'SybObj.pm' to the sybase DBlib object which may also 
serve as an example of inheritance in Perl5.

Hope this helps.

Excerpts from what Tony Byorick said:

 |
 |I'm considering writing a function in sybperl which will accept the 
 |name of a database table and return a transact-SQL statement which
 |could then be used to re-create all the indexes on that table.   Does anyone
 |know if such a function already exists and if so, where I might find it?
 |I running Perl 4.035 and sybperl is 1.31.
 |
 |Thanks
 |Tony Byorick
 |
 |Tony Byorick
 |NationsBank
 |Baltimore, Md.
 |
 |

begin 644 DumpDef.tar.Z
M'YV01.JT@4.DC!D "!,J7,BPH<.'$"-*G(@P!@P8-RZ"  "BXPP9-39VC'&C
M!@R1'5/*L,'R) @;,4C"I &#YL@8-&UPA$&QI\^?0(,"J#.'3A@Y'0',&?.&
M39DV8=P(53BGS!TX4[-JWO/4>$>$%4S@LV;\:$8?-"3!HW+^"4D<,F
M9(L["A2, $%&(!R^88R*"5.5K\&W:>BD>>-F#@@S;^3H32G8Z9S)'=^2*8.G
MS.6]'2'+27/@U9?)\3BFGCF7,ALV$<4UG=4<[::Q>ALVT,1TY8=[6_@$"
M!50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