Extract Schema Definitions From Jade Code

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Extract Schema Definitions From Jade Code

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:41 pm

by Anonymous >> Fri, 24 Sep 2004 1:31:11 GMT

Currently we are still in Jade 5 and are slowly doning some testing on Jade 6 with a plan to move by the end of they year. I'm trying to work out a good way of backing up our development databases now, and when we move to 6. I realised that I realy only need the schema definitions, not the actual data, which in serveral of our systems is quite big and unweildy thus i dont want to backup the data. What i'd really like to do is run a full jade extract from a Jade server task. That way we would only be backing up the code rather than the crap data that is in a development environment. Has anybody had any experince in doing this? Can I call a method which will run a full extract to the path I specify?

I've also noticed the version control that can be enabled but wonder how people have found it in both Jade 5 and 6.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Extract Schema Definitions From Jade Code

Postby ConvertFromOldNGs » Fri Aug 07, 2009 12:41 pm

by cnwjhp1 >> Fri, 24 Sep 2004 2:16:40 GMT

I don't know if it is possible from a server task directly, but you can execute jadloadb (Jade 5) or jadclient (Jade 6). We have one database that does schema backups of several other databases. Here is the snippet of our code that does one schema at a time. There are a number of unresolved references, but it should give you the idea.

if adm.versionInfo(envName)[1:1]="5" then // Jade 5
param:="A, "&schemaPath&schemaName&".scm, "&schemaPath&schemaName&".ddb, "&schemaName;
cmdLine:=path&"\jadloadb ini="&path&"\"&env[i:end]&".ini"&" path="&env&"\server\c_system"&" server=multiUser"
&" schema=JadeSchema app=Jade"
&" executeSchema=JadeSchema executeClass=Schema executeMethod=extractBatch"
&" executeParam="&'"'&param&'" executeTransient=true';
else // use jadclient for Jade 6
param:=" Single "&schemaPath&schemaName&".scm "&schemaPath&schemaName&".ddb "&schemaName;
cmdLine:=path&"\jadclient ini="&path&"\"&env[i:end]&".ini"&" path="&env&"\server\c_system"&" server=multiUser"
&" schema=JadeSchema app=JadeBatchExtract"&" endJade"&param;
endif;

We then send cmdLine to something similar to app.createExternalProcess, which starts up a fat client. Note that this can do extracts of any database, not just the one executing this code, and that the rap must be running. Presumably a different cmdLine could be used to run as singleUser or thin client.

I believe the Jade 6 technique is documented.

Cheers,
John P


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 11 guests