And Kemp wrote: > > Hi, > > I'm new to MaxDB and am trying to get to grips with saving and > restoring data. I'm running an installation obtained from > maxdb-all-win-32bit-i386-7_5_00_26.zip, whilst following instructions > gleaned from maxdb-chmdoc-75.chm; both of which have been obtained > from the mysql website. These are running under a Micro$oft windoze > 2000 professional OS. > > To gain understanding of the principles involved and find my way > around the command structures I'm entering commands in the cli from a > DOS prompt. Currently I've been able to create a simple table, add > data to it and query this to check the results. > > Now I'm down to saving and restoring instance data, and this is where > the trouble starts. > > Firstly, I've tried to save the database instance. Here's a copy of > the typed commands and responses from MaxDB. From what I've read in > the documentation everything's behaving as expected. >
Did you create the table and insert with sql_execute as well, just before those statements you sent to the list? Then the easy reason may be, that you forgot the COMMIT-statement to tell the database kernel to close the transaction and make the current state persistent. If you do not commit a transaction it will be rollbacked (undone) in case the connection to the client stops/the database is set to admin/offline-state or the like. If you had done this, after setting to offline and to online again, no need of restoring the data would exist. After setting to online again, the database will have the state (data, table-definitions) it had (with COMMITTED transactions) before setting to admin/offline. Elke SAP Labs Berlin > *** COMMANDS 1 START *** > <pre> > dbmcli>sql_execute select * from aName > OK > END > 'Alphabet' > 'Battleship' > 'Camera' > > --- > dbmcli>medium_put dbcopy c:\backup\050729.bak file data 0 0 yes > OK > > --- > dbmcli>db_state > OK > State > ONLINE > > --- > dbmcli>db_admin > OK > > --- > dbmcli>param_versions > OK > c:\mysqldata\data\config\APK > c:\mysqldata\data\config\APK.01 > > --- > dbmcli>util_connect dbm,dbm > OK > > --- > dbmcli>backup_start dbcopy data > OK > Returncode 0 > Date 20050729 > Time 00173951 > Server cpc4-basf1-5-1-cust156.nott.cable.ntl.com > Database APK > Kernel Version Kernel 7.5.0 Build 026-123-094-430 > Pages Transferred 232 > Pages Left 0 > Volumes 1 > Medianame dbcopy > Location c:\backup\050729.bak > Errortext > Label DAT_000000001 > Is Consistent true > First LOG Page 1056 > Last LOG Page > DB Stamp 1 Date 20050729 > DB Stamp 1 Time 00172644 > DB Stamp 2 Date > DB Stamp 2 Time > Page Count 216 > Devices Used 1 > Database > ID cpc4-basf1-5-1- > cust156.nott.cable.ntl.com:APK_20050729_173951 > Max Used Data Page 0 > > --- > dbmcli> > </pre> > *** COMMANDS 1 END *** > > This should I think indicate that I've made a copy of the database > instance correctly - the return code is zero. I now shut down the > instance and exit the cli. > > *** COMMANDS 2 START *** > <pre> > dbmcli>db_stop > OK > > --- > dbmcli>db_offline > OK > > --- > dbmcli>quit > > --- > > C:\Documents and Settings\Administrator> > </pre> > > *** COMMANDS 2 END *** > > Restarting the database instance should I think restore both the > structure and content of the instance, but it doesn't... > > *** COMMANDS 3 START *** > <pre> > C:\Documents and Settings\Administrator>dbmcli -d apk -u dbm,dbm > dbmcli on apk>db_online > OK > > --- > dbmcli on apk>db_restart > OK > > --- > dbmcli on apk>sql_connect fred,fpass > OK > > --- > dbmcli on apk>sql_execute select * from aName > ERR > -24988,ERR_SQL: sql error > -4004,Unknown table name:ANAME > > --- > dbmcli on apk> > </pre> > *** COMMANDS 3 END *** > > I've also tried to restore the data into a different instance. > > *** COMMANDS 4 START *** > <pre> > C:\Documents and Settings\Administrator>dbmcli > dbmcli>db_create apk1 dbm,dbm > OK > > --- > dbmcli>param_startsession > OK > > --- > dbmcli>param_copy apk > OK > > --- > dbmcli>param_checkall > OK > > --- > dbmcli>param_commitsession > OK > > --- > dbmcli>param_addvolume 1 log log_001 f 2000 > OK > > --- > dbmcli>param_addvolume 1 data dat_001 f 10000 > OK > > --- > dbmcli>medium_put dbrest c:\backup\050729.bak file data 0 0 no > OK > > --- > dbmcli>db_admin > OK > > --- > dbmcli>db_activate admin,secret > OK > > --- > dbmcli>db_online > OK > > --- > dbmcli>sql_connect admin,secret > OK > > --- > dbmcli>sql_execute create user fred password fpass resource not exclusive > OK > > --- > dbmcli>sql_release > OK > > --- > dbmcli>db_admin > OK > > --- > dbmcli>util_connect dbm,dbm > OK > > --- > dbmcli>db_activate recover dbrest data > OK > Returncode 0 > Date 20050729 > Time 00183656 > Server cpc4-basf1-5-1-cust156.nott.cable.ntl.com > Database APK > Kernel Version Kernel 7.5.0 Build 026-123-094-430 > Pages Transferred 232 > Pages Left 0 > Volumes 1 > Medianame dbrest > Location c:\backup\050729.bak > Errortext > Label DAT_000000001 > Is Consistent true > First LOG Page 1056 > Last LOG Page > DB Stamp 1 Date 20050729 > DB Stamp 1 Time 00172644 > DB Stamp 2 Date > DB Stamp 2 Time > Page Count 216 > Devices Used 1 > Database > ID cpc4-basf1-5-1-cust156.nott.cable.ntl.com:APK_20050729_1 > 73951 > Max Used Data Page 0 > > --- > dbmcli>sql_connect fred,fpass > ERR > -24988,ERR_SQL: sql error > -4008,Unknown user name/password combination > > --- > dbmcli>db_online > OK > > --- > dbmcli>sql_connect fred,fpass > OK > > --- > dbmcli>sql_execute select * from aName > ERR > -24988,ERR_SQL: sql error > -4004,Unknown table name:ANAME > > --- > dbmcli> > </pre> > > *** COMMANDS 4 END *** > > I *think* that I should have restored the data here; I just don't > seem to be able to get at it. I think this is the same problem as my > attempt to restore the instance I've shut down and restarted (commands 3). > > There's probably way too much garbage from the cli interactions here > but I daren't prune it at the moment since I don't know what's > important for debugging just yet. > > If at all possible I'd prefer an answer to my problem within the cli > framework so I can try and understand what's happening. > > Thanks for wading through all of this and I hope you can help, > > And Kemp. > > > > -- > MaxDB Discussion Mailing List > For list archives: http://lists.mysql.com/maxdb > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]