SQLBASE Functions and SQLWNTM.dll

forum.sqlbase (1998-2010)
K C Li

SQLBASE Functions and SQLWNTM.dll

Post by K C Li » 02 Nov 2009, 16:52

 Posted by:  KC Li 

Hi,

I found this APT which includes some SQLBASE functions e.g.
SqlInstallDatabase, SqlDeinstallDatabase ... etc

However, the one I really want at the moment is Reorganise .. and or load
database

Does anybody know where I can find all the SQLBASE function in the
SQLWNTM.dll

Thanks in advance

KC

Rainer Ebert

SQLBASE Functions and SQLWNTM.dll

Post by Rainer Ebert » 03 Nov 2009, 14:50

 Posted by:  Rainer Ebert 

Hi KC,

here's my enhanced version of sqlbase.apt, which you have attached in an
older version.

I don't know if there is a reorganize command in the SQLBase API. I do think
that it is an implementation in SQLTalk.

We use Unload, Drop database, Create database and Load in combination with
the commands/settings in the reorganize script of Mike (like recovery, lock
database, ...).

Regards,
Rainer

K C Li

SQLBASE Functions and SQLWNTM.dll

Post by K C Li » 03 Nov 2009, 16:01

 Posted by:  KC Li 

Hi Rainer,

Thanks for the updated version.

The reason I perfer to use 'Reorganize' is that the 'Drop Database ' delete
all files under the DBName folder, e.g. we have customers sometimes do a
'quick' backup by using winzip or winvar and stores the .zip or .var file
there.

By using drop database, all files will be removed

Best regards,

KC

FRBhote
India
Posts: 1230
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

SQLBASE Functions and SQLWNTM.dll

Post by FRBhote » 03 Nov 2009, 16:14

 Posted by:  F R Bhote 

You can use a deinstall database, rename the folder and then do a create
database. Then you still have the old database.

Jim McNamara

SQLBASE Functions and SQLWNTM.dll

Post by Jim McNamara » 03 Nov 2009, 16:16

 Posted by:  Jim McNamara 

Reorganize does 4 things - it unloads the database, drops the database,
creates a new database, then loads the new database. So using the reoganize
does not circumvent the drop database command.

You do not want to use the reorganize command. Unless the database is very
small the reorganize command will likely run for many hours - it does not
lock the database or turn recovery off so it spends most of its time
unneccesarily maintaining log files and monitoring for user contention.

Use Mike Vandine's script to reorg the database. It's the only solution
that makes any sense.

K C Li

SQLBASE Functions and SQLWNTM.dll

Post by K C Li » 03 Nov 2009, 17:01

 Posted by:  KC Li 

Hi,

As far as I can see, the Reorganize does set the 'Recovery off' before
relaoding the database ( it shows in SQLTalk that 'Recovery is now off')
After the re-loading, it trurns the recovery back on ( it shows in SQLTalk
that 'Recovery is now On')

I do check the database folder between time and no log files are created,
until after the reloading finished ( Try it and you know what I mean)

I can't see 'Reorganise' will take any longer then the multi-steps way

'Reorganize' has an advantage that it does not delete any files in the db
folder. while the long way (i.e. unload .. drop .. create ... reload)
deletes all files except .dbs and .log files
(Also it only uses one word, even it is American spelling :) )

Thanks

KC

Jim McNamara

SQLBASE Functions and SQLWNTM.dll

Post by Jim McNamara » 03 Nov 2009, 20:30

 Posted by:  Jim McNamara 

I aborted a REORGANIZE on a 5Gb database after it ran for 8 hours. When I
use Mike's script, the entire process completes in about 45 minutes.

I wasn't trying to start a debate with you. Just passing along some of my
16 years experience maintaining SQLBase databases.

Rainer Ebert

SQLBASE Functions and SQLWNTM.dll

Post by Rainer Ebert » 04 Nov 2009, 09:27

 Posted by:  Rainer Ebert 

I can confirm this with my > 15 year experience with SQLBase databases.

Regards,
Rainer

K C Li

SQLBASE Functions and SQLWNTM.dll

Post by K C Li » 04 Nov 2009, 12:12

 Posted by:  KC Li 

Hi,

Thanks for your advice, but I tried an 'Reorganize' on a 2.6 GB database
(SQLBase 11.5) last week in a client's machine and it only took minutes to
finish.

I am not here arguing or debating ... It does Set recovery off and then On

How long ago did you actually use the reoragnize? May be when you used that
, it was years ago before they improved it ?

Best regards,

KC

K C Li

SQLBASE Functions and SQLWNTM.dll

Post by K C Li » 04 Nov 2009, 13:26

 Posted by:  KC Li 

Hi Rainer, Jim and Bhote,

Thanks for all your advice and help and sorry about all the troubles I have
given.

I am going to use Mike's idea in his script and the functions in Rainer's
SQLBASE.apt to make an app that do the re-org .
The reason for this is so that I can write log file to keep track of fail or
successful in each single step.
This exe will be run in the SQLBase command center so I might need to send
an e-mail to the DBA/IT if things fail

Once aagin, thanks very much for all you advice and help

By the way, I found an App called DBCOPY.APP but I cannot open this APP
because it's different version than my TD.
Could someone convert it to APT for me please

Best regards and thanks again

KC

Return to “forum.sqlbase”

Who is online

Users browsing this forum: [Ccbot] and 0 guests