OMDG-MaxDB-Administration

1,112 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,112
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
36
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

OMDG-MaxDB-Administration

  1. 1. Database Administration MaxDB © SAP AG Author: Ralf Dahmen (OMDG) Company: Bankberatung AG HomePage: www.bankberatung.com Creation Date: 22.01.2008 Revision Date: 27.01.2008 Version: 0.2 1. Getting Started With MaxDB ............................................................................................................. 2 1.1. Database Administration............................................................................................................. 2 1.1.1. Installation of MAXDB ...................................................................................................... 2 1.1.2. Creating A Database Instance Using The DBM Wizard .................................................... 2 1.1.3. Database Administration Using DBMCLI.......................................................................... 6 1.1.3.1. ClearDB.cmd............................................................................................................... 7 1.1.3.2. InstDB.cmd ................................................................................................................. 8 1.1.3.3. SaveDB.cmd ............................................................................................................. 13 1.1.3.4. SaveLG.cmd.............................................................................................................. 15 1.1.3.5. SavePG.cmd (Database Incremental Archiving) ...................................................... 16 1.1.3.6. RestoreDB.cmd (Restore a Database Full Backup) .................................................. 17 1.1.3.7. RestorePG.cmd (Restore a Database Incremental Backup)...................................... 18 1.1.4. Troubleshooting ................................................................................................................ 19 1.1.4.1. LOG Full, Detection and Repair ............................................................................... 19 1.1.4.2. Database Full, Detection and Repair......................................................................... 21 1.1.5. Loading Demo Tables ....................................................................................................... 23 The audience for this abstract are MaxDB beginner. This is the reason why the headline says Getting Started. Normally an abstract should mention themes like Some internal topics o Page layout and organization of data and log volumes o SQL optimizer behaviour o Dictionary storage o Optimized logging technique Hot Standby Server (HSS) Snapshots ... Refer those topics to the system documentation of MaxDB. Page 1 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  2. 2. 1. Getting Started With MaxDB 1.1. Database Administration Datebase administration in a company covers a variety of tasks. The important ones are • Reliability of operation o Creation, alternation and deletion of database instances and their database users o Backup and recovery of database instances o Monitoring of database instances and their database users • Performance management To support these administration tasks MaxDB offers the tool Database Manager (DBM). A command line interface (CLI) supports use within procedural languages like windows command scripts, Unix Shells or Perl and Python scripts. The following sections give an overview about the administration of MaxDB and its tools. 1.1.1. Installation of MAXDB You have to decide where the installation files goes to. The installation wizard offers a customized installation. For the current installation of GettingStarted all off the files (Server, DBM and SQL Studio) are directed to: The reason to emphasize this is to see where the files are going while administaring data base instances. Just the installation was done. Up to now no data base instance is created. This shows the next subsection. 1.1.2. Creating A Database Instance Using The DBM Wizard Invoke the DBM tool and check if a database instance is available. To check use the button Add…> The Add window is still empty. There is no offer of a database instance. Page 2 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  3. 3. The creation process is documented twice. The section Database Administration Using DBMCLI covers the creation process using the command line interface (embedding technique). This section shows the process of creating a database instance using the wizard of the database manager utility. A new database instance admin is to be created. The wizard is started by pressing the button Create... shown in the screen image below: Choose Custom to see the detailed parameter inquieries. Type in the database instance name admin and answer the windows with next>. Give the passwords to the instance operator (dbm) and the instance adminstrator dbadmin. For demonstration purposes use the OLTP instance type. The wizard generates default instances values which may be altered. Here we want to change the Path where context and diagnosis information is stored. To change the value just double click the parameter RUNDIRECTORY and give the new value. Here it says C:sdbADMINwrk Page 3 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  4. 4. Change the data and log volume to the admin directory in the next step: Continue altering the backup directories: The next step summarizes the parameter given and allows to store them in a template file: Save the file ADMIN.dbi under C:sdbADMIN and start the configuration. Page 4 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  5. 5. The template file ADMIN.dbi is XML, which can be modified by the administrator: The wizards ends with a success message and DBM shows the database instance admin is running: All the steps the wizard executes may also be executed by command files using the database manager command line interface dbmcli. Page 5 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  6. 6. 1.1.3. Database Administration Using DBMCLI The Database Manager functionality is supplied as the client component Database Manager GUI (Graphical User Interface) and the Database Manager CLI (Command Language Interface). This section covers the same installation steps of the instance admin as shown in Creating A Database Instance Using The DBM Wizard. In addition backup and recovery functionality is demonstrated with a couple of examples embedded in command procedures. These examples show how the dbmcli commands may be used to achieve the same result the user would get with the wizard and/or the DBM GUI: Dropping and deinstalling an instance >ClearDB admin dbm dbm Setting environment variables Clearing Database admin... ClearDB.cmd ...Shutdown database admin ...Drop and deregister database admin ...OK, unRegister admin in database manager (GUI). Instance creation > InstDB %DBNAME% %CUSER% %CPW% %DBAUSER% %DBAPW% %DOMAINPW% %NODENAME% Setting environment variables Install Database admin ... ...Register Database ...Create Param Script MAXDB-GroupadministrationscriptAll_in_one_set_admin.bcr InstDB.cmd ...Install Parameters ...Start cold) ...Activate ServerDB ...Load System Tables ...Restart ServerDB ...Declare media katalog entries to prepare further backup and restore activities ...OK, register admin with User dbm,dbm in database manager (GUI). Backing up instance data > SaveDB C %DBNAME% %CUSER% %CPW% %NODENAME% Setting environment variables SaveDB.cmd Save Database admin ... ...Shutdown database ...Backup ServerDB (C) ...Startup database ...OK, look at admin, Backup, Media and History in database manager (GUI). Backing up instance log > SaveLG C %DBNAME% %CUSER% %CPW% %NODENAME% Setting environment variables SaveLG.cmd Save Log admin ... ...Shutdown database ...Backup Log (C) ...Startup database ...OK, look at admin, Backup, Media and History in database manager (GUI). Loading sample data using the MaxDB replication manager tool LoadDB.cmd > LoadDB %DBNAME% %ResUser% %ResPW% %CommandFile% %NODENAME% Page 6 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  7. 7. Setting environment variables Execute MAXDB-Groupadministrationscriptbig.loa for Database admin ... ...Invoking Loader Manager to execute Commandfile to DB-User "test" ...OK, select data for user "test" by SQL Studio... Backing up instance incremental data > SavePG C %DBNAME% %CUSER% %CPW% %NODENAME% Setting environment variables SavePG.cmd Save Pages admin (incremental backup)... ...Shutdown database ...Backup Pages (C) ...Startup database ...OK, look at admin, Backup, Media and History in database manager (GUI). Restoring instance data > RestoreDB H %DBNAME% %CUSER% %CPW% %NODENAME% Setting environment variables RestoreDB.cmd Restore Database admin ... ...Shutdown database ...Restore full backup to ServerDB (from last backup) ...Startup database ...OK, look at admin, Backup and History in database manager (GUI). Restoring instance incremental data > RestorePG H %DBNAME% %CUSER% %CPW% %NODENAME% Setting environment variables RestorePG.cmd Restore incremental backup to Database admin ... ...Shutdown database ...Restore Pages ServerDB (from last backup) ...Startup database ...OK, look at admin, Backup and History in database manager (GUI). The script scriptsAll_in_one.cmd calls the example scripts above. It creates the database instance admin, backs it up and restores it. The procedure ends with a running database instance. Usage: All_in_one.cmd > All_in_one.txt. Note: Set your environment variables according your MAXDB installation and GettingStartedMaxDB path in file script/All_in_one_set.cmd. All_in_one calls the following command files: 1.1.3.1. ClearDB.cmd This section shows the DBMCLI commands db_offline and db_drop step by step and their results in the DBM GUI. During execution the script ClearDB.cmd displays these output lines: 01. ClearDB Clearing Database admin... 02. ClearDB ...Shutdown database admin... 03. ClearDB ...Drop and deregister database admin 04. ClearDB ...OK, unRegister admin in database manager (GUI). The first DBMCLI call in ClearDB.cmd registers the instance admin: Page 7 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  8. 8. 02. ClearDB dbmcli -d %DBNAME% -u %CUSER%,%CPW% db_offline The command shuts the database down. Only the database administrator may has access to the instance. The instance is now in terms of MAXDB in cold mode. The next command drops the database: 03. ClearDB dbmcli -d %DBNAME% -u %CUSER%,%CPW% db_drop The database and log volumes will be deleted. So, be sure executing cleardb! After deinstallation of MaxDB the DBMGUI shows this status: 1.1.3.2. InstDB.cmd This section shows the DBMCLI commands db_create, param_startsession param_init, param_put, param_checkall, param_commitsession, param_addvolume, db_start, db_activate, load_systab, backup_media_put, sql_connect, sql_execute, sql_release and dbrestart step by step and their results in the DBM GUI. During execution the script InstDB.cmd displays these output lines: 01. INSTDB Install Database admin ... 02. INSTDB ...Register Database 03. INSTDB ...Create Param Script ../wrk/InstDB_admin.bcr 04. INSTDB ...Install Parameters 05. INSTDB ...Start cold 06. INSTDB ...Activate ServerDB 07. INSTDB ...Load System Tables 08. INSTDB ...Restart ServerDB 09. INSTDB ...Declare media catalog entries to prepare further backup and restore activities 10. INSTDB ...OK, register admin with User dbm,dbm in database manager (GUI). The first DBMCLI call in InstDB.cmd registers the instance admin: 02. INSTDB dbmcli -R %INSTPATH% db_create %DBNAME% %CUSER%,%CPW% Page 8 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  9. 9. dbmcli -R c:sdbdependent_program_path7603 db_create admin dbm,dbm The directory (-R) must be the path of the installation directory of MaxDB. After successful completion of the command db_create the file C:sdbindependent_data_pathconfigadmin.upc is created under Windows. Due to the entries in that file the new instance admin can be registered in the DBMGUI by the Control User dbm: After registration the instance admin is available for administration in the DBMGUI: MaxDB sends an error message if the user dbm tries to start the instance. The reason for this error message is that no system environment (device volumes etc.) is available yet. 03. INSTDB ...Create Param Script ../wrk/InstDB_admin.bcr The adminstrator has to define the database parameters. The procedure InstDB stores the parameter values to the file %SCRIPTPATH%/InstDB_admin.bcr: Page 9 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  10. 10. param_startsession param_init OLTP param_put DEFAULT_CODE ASCII param_put MAXUSERTASKS 20 param_put CAT_CACHE_SUPPLY 1632 param_put RUNDIRECTORY %RUNDIRECTORY%wrk param_checkall param_commitsession param_addvolume 1 DATA %RUNDIRECTORY%dataDAT_001 F 2560 param_addvolume 1 LOG %RUNDIRECTORY%logLOG_001 F 1024 The next DBMCLI call 04. INSTDB dbmcli -d %DBNAME% -u %CUSER%,%CPW% -i %BCRFile% adds some more system parameters automatically, translates them into an internal format and writes the instance-specific configuration file C:sdbindependent_data_pathconfigadmin.pah and ADMIN. Now the the ServerDB processes can be started: dbmcli -d %DBNAME% -u %CUSER%,%CPW% db_start 05. INSTDB dbmcli -d admin -u dbm,dbm db_start Step 5 is displayed if the corresponding DBM window is refreshed: The database is started (cold or or yellow mode) now. The result of the start command can be seen in the RunDirectory. Several files are written such as protocol, trace and diagnostic files. From the database point of view nothing of value has happened yet. The database files containing for example the users' data are still missing. The DB devspaces will be created in the next step. This step may take a while, since the volumes are created and preformatted (X'00') in the specified size: The Instance must now be activated using the command db_activate: dbmcli -d %DBNAME% -u %CUSER%,%CPW% db_activate %DBAUSER%,%DBAPW% 06. INSTDB dbmcli -d admin -u dbm,dbm db_activate dbadmin,dbadmin The RunDirectory contains the device space files data_001 and log_001. The Device Space data_001 is still empty (despite the resource consumption). The volume data_001 stores the user data catalog (data dictionary), table and index data. The device space log_001 contains the ReDo Log (After Image) of the Page 10 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  11. 11. transactions caused by SQL commands. The first LOG entries are still written by the ServerDB itself. The results of the step db_activate can be seen in the DBMGUI. Here's an example, navigating by Configuration -> Parameters: db_activate creates the dba user (administrator) and the instance has been initialized. In principle the ServerDB is in an accessible state. The catalog for the metadata (Data Dictionary) has not yet been defined. Without the catalog the user would get meaningless error messages. The catalog and its data are loaded by the command load_systab. The catalog is owned by the predefined database user domain: dbmcli -d %DBNAME% -u %CUSER%,%CPW% -t %RUNDIRECTORY%wrkload_systab.log 07. INSTDB load_systab -ud %DOMAINPW% dbmcli -d admin -u dbm,dbm -t csdbadminwrkload_systab.log load_systab -ud dom In comparison to the previous screen image all system data is loaded now. The loading phase is logged by the SERVERDB: Page 11 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  12. 12. The command dbrestart 08. INSTDB dbmcli -d %DBNAME% -u %CUSER%,%CPW% dbrestart sets the database to a consistent state. The contents of the data buffer are written to the device volumes. To enable backup and restore actions several media settings have to be predefined: ...Declare media catalog entries to prepare further backup and restore activities dbmcli -u %CUSER%,%CPW% -d %DBNAME% backup_media_put dat %RUNDIRECTORY%backupdata.bck FILE DATA 0 8 YES dbmcli -u %CUSER%,%CPW% -d %DBNAME% backup_media_put log %RUNDIRECTORY%backuplog.bck FILE 09. INSTDB LOG 0 8 NO dbmcli -u %CUSER%,%CPW% -d %DBNAME% backup_media_put inc %RUNDIRECTORY%backuppages.bck FILE PAGES 0 8 YES dbmcli -u %CUSER%,%CPW% -d %DBNAME% backup_media_put aut %RUNDIRECTORY%backupalog.bck FILE AUTO 0 8 NO For example the command backup_media_put defines the media dat for a complete data backup. inc is the media for an incremental data backup. The result of a backup is stored in the directory %RUNDIRECTORY%backup. The media definition can be reached by Configuration -> Backup Media: If the example script InstDB.cmd ends successfully the database instance admin may be accessed without any restrictions. The whole process takes less than a minute, regardless whether the Installation Wizard or the DBMCLI InstDB.cmd is used. The result of both methods is the same. Page 12 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  13. 13. 1.1.3.3. SaveDB.cmd This section shows the DBMCLI commands step by step and their results in the DBM GUI. After installation there is no backup issued (HISTLOST): The freshly installed instance admin can be backed up now. The script all_in_one.cmd calls the script SaveDB.cmd next: 01. SAVEDB Save Database admin ... 02. SAVEDB ...Shutdown database 03. SAVEDB ...Backup ServerDB (C) 04. SAVEDB ...Startup database 05. SAVEDB ...OK, look at admin, Backup, Media and History in database manager (GUI). The first DBMCLI call of SaveDB.cmd shuts down the instance admin to perform an offline backup: 02. SAVEDB dbmcli -d admin -u dbm,dbm db_admin The backup starts with the next command: 03. SAVEDB dbmcli -d admin -u dbm,dbm -uUTL -c backup_start dat Page 13 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  14. 14. The result of the backup is shown in the window Backup History: The file DATA defined in the media dat is the save data set written by the backup process. The Database Manager CLI currently supports the use of the following external backup tools: • ADSM/TSM (IBM(Tivoli) • Backint for Oracle • Backint for MaxDB • NetWorker (Legato) After the offline backup the instance is restarted: ...Startup database 04. SAVEDB dbmcli -d %DBNAME% -u %CUSER%,%CPW% db_online In order to get transaction entries and data the script all_in_one.cmd creates the resource user test und loads 5000 sample rows in the table test.bkpf. This is done by the Subprocedure userdata.cmd. Add User To Database admin ... ...Create User test ...Create Table BKPF ...OK, try new user "test" by SQL Studio. Execute ...scriptsadministrationload_bkpf.loa for Database admin ... ...Invoking Replication Manager to execute Commandfile to DB-User "test" ...OK, select data for user "test" by SQL Studio... 5% more data pages and 83% of the log volume are used: Page 14 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  15. 15. 1.1.3.4. SaveLG.cmd This section shows the DBMCLI commands step by step and their results in the DBM GUI. After installation there is no log backup issued. The script all_in_one.cmd calls the script SaveLG.cmd next: 01. SAVELG Save Log admin ... 02. SAVELG ...Shutdown database 03. SAVELG ...Backup Log (C) 04. SAVELG ...Startup database 05. SAVELG ...OK, look at admin, Backup, Media and History in database manager (GUI). The first DBMCLI call of SaveLG.cmd shuts down the instance admin to perform an offline backup: 02. SAVELG dbmcli -d admin -u dbm,dbm db_admin The next command initiates the backup process: 03. SAVELG dbmcli -d admin -u dbm,dbm -uUTL -c backup_save log Refresh the window Backup History to see the results: Each saved file log gets a save counter. The backup process wrote the files LOG.001 und LOG.002. After the offline backup the instance is restarted: 04. SAVELG dbmcli -d admin -u dbm,dbm db_online Page 15 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  16. 16. To demonstrate backing up online data and logs more sample data is loaded by the script all_in_one.cmd. 1.1.3.5. SavePG.cmd (Database Incremental Archiving) Meanwhile more database transactions took place. Those data pages which were modified since the last full or incremental backup are to be archived by an incremental backup. Before the backup starts the instance shows the resource usage: The script all_in_one.cmd calls script SavePG.cmd next: 01. SAVEPG Save Pages admin (incremental backup) ... 02. SAVEPG ...Shutdown database 03. SAVEPG ...Backup Pages (C) 04. SAVEPG ...Startup database 05. SAVEPG ...OK, look at admin, Backup, Media and History in database manager (GUI). Page 16 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  17. 17. The first DBMCLI call of SavePG.cmd shuts down the instance admin to perform an offline backup: 02. SAVEPG dbmcli -d admin -u dbm,dbm db_admin The next command initiates the backup process: 03. SAVEPG dbmcli -d admin -u dbm,dbm -uUTL -c backup_start inc The file pages defined in the media inc is the save data set written by the backup process. After the offline backup the instance is restarted: 04. SAVEPG dbmcli -d admin -u dbm,dbm db_online The result can be seen in window Backup History: In comparison to the full backup the incremental backup reduces disk space and runtime. 1.1.3.6. RestoreDB.cmd (Restore a Database Full Backup) The script all_in_one.cmd calls the example script restorepg.cmd next: 01. RESTOREDB Restore Database admin ... 02. RESTOREDB ...Shutdown database 03. RESTOREDB ...Restore full backup to ServerDB (from last backup) 04. RESTOREDB ...Startup database 05. RESTOREDB ...OK, look at admin, Backup, Media and History in database manager (GUI). The latest Backup of the media labeled DAT_00002 is to be restored (recovery). A recovery can not be performed while the ServerDB is in OLTP multi-user mode. Therefore the instance must be shut down: 02. RESTOREDB dbmcli -d admin -u dbm,dbm db_admin The restore is done by the command recover_start: Page 17 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  18. 18. 03. RESTOREDB dbmcli -d admin -u dbm,dbm -uUTL -c recover_start dat The result is shown in the window of Backup History: Afterwards the ServerDB is restarted: 04. RESTOREDB dbmcli -d admin -u dbm,dbm db_online The restore process is still incomplete, since the latest data changes have not been restored. The administrator may choose the latest LOG information or the latest incremental page backup (PAG_00003). The incremental backup covers all LOG archives indicated by Log Required = NO. 1.1.3.7. RestorePG.cmd (Restore a Database Incremental Backup) The script all_in_one.cmd calls the script restorepg.cmd next: 01. RESTOREPG Restore incremental backup to Database admin ... 02. RESTOREPG ...Shutdown database 03. RESTOREPG ...Restore Pages to ServerDB (from last backup) 04. RESTOREPG ...restorepg.cmd: Error occured... The latest incremental data backup PAG_00003 is to be restored by RestorePG.cmd. After shutdown of the instance 02. RESTOREPG dbmcli -d admin -u dbm,dbm db_admin the next DBMCLI command recover_start restores the latest inc media: 03. RESTOREPG dbmcli -d admin -u dbm,dbm -uUTL -c recover_start inc Restore actions with errors are stored and highlighted in the DBMGUI as well: Page 18 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  19. 19. The explanation of the error situation make sense, because each restart increases the database version counter. The recovery tried to apply version PAG_00003 to the version DAT_00002. Refer to script all_in_one.cmd how the error can easyly being fixed. 1.1.4. Troubleshooting This section covers the actions to be taken in case of a LOG full problem and database full situation. 1.1.4.1. LOG Full, Detection and Repair Meanwhile normal users are working, the database stops operation. To detect a problem the administrator uses DBM. It shows the status of the database: The database admin is still accessible (readable only). To get more information the dbm/dba analyzes the server status by clicking: Page 19 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  20. 20. 1)Check > Database Server > Active ID UKT Win TASK APPL Current Timeout Region Wait tid type pid state priority cnt try item T17 7 0xA6C User 1808 LOG FULL (246) 0 0 2112(s) Console command finished (2008-01-24 12:57:20). Transaction T17 is suspended by the database kernel process. Checking the database messages gives more details: 2)Check > Diagnosis Files > Database messages -------------------------------------------------------------------------------- Date Time TID(hex) Typ MsgID Label Message-Text -------------------------------------------------------------------------------- 2008-01-24 12:31:54 0x768 20004 KernelDB 50 percent of log area occupied, 510 pages used 2008-01-24 12:31:54 0x768 20004 KernelDB 75 percent of log area occupied, 765 pages used 2008-01-24 12:41:03 0xFE8 20001 Log Log is full. 2008-01-24 12:41:03 0xFE8 20001 Log Log is full. 2008-01-24 12:41:03 0xA6C WRN 20056 Log LOG FULL: task 17 suspended 2008-01-24 12:41:04 0x768 WRN 20001 KernelDB 90 percent of log area occupied, 918 pages used -------------------------------------------- current write position ---------------- =========================================== end of write cycle =================== The DBA has 3 opportunities to solve this problem. The first and the best choice is to enable automatic LOG saving: 1. Set autolog to ON in DBMGUI! If LOG saving is switched to autolog, transaction T13 ends normally without an error message. Media log or alog is written: A log full situation will never occur anymore because the LOG will be archived by the database kernel asynchronously. Page 20 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  21. 21. 2. Add LOG DEVSPACE of 8 MB in DBMGUI! If more LOG space is added, transaction T13 ends normally without an error message. A log full situation will occur the next time the LOG space is full. 3. Save LOG in DBMGUI! The transaction ends normally without an error message. A log full situation will occur the next time the LOG space is full. The Database admin is fully accessible (readable/writeable) now. 1.1.4.2. Database Full, Detection and Repair Meanwhile normal users are working, the database stops operation (Transaction all_in_one is waiting for IO completion). To detect the problem administrators use DBM. DBM shows the status of the database: Page 21 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  22. 22. The Database admin is still accessible (readable only). To get more information the dbm/dba analyzes the server status by clicking: 1)Check > Database Server > Active ID UKT Win TASK APPL Current Timeout Region Wait tid type pid state priority cnt try item T28 7 0xAE0 User 1892 DB FULL (197) 0 0 1261(s) T52 4 0xFF0 Savepnt Vsleep 0 0 1094(s) Console command finished (2008-01-24 14:29:04). The current transaction causes a db_full state. The transaction has been suspended by the database kernel process. Checking the database messages gives more details: 2)Check > Diagnosis Files > Database messages -------------------------------------------------------------------------------- Date Time TID(hex) Typ MsgID Label Message-Text -------------------------------------------------------------------------------- 2008-01-24 14:18:13 0xAE0 WRN 20000 KernelDB 96 percent of data area occupied, 103 pages free 2008-01-24 14:18:13 0xAE0 WRN 20041 Converte DB FULL: Task 28 suspended (used pages: 2507 req.: 1 data area: 2558) 2008-01-24 14:18:16 0xFC4 20050 Converte Savep. needed (217 pages changed 2304 bl. occupied 255 blocks avail.) 2008-01-24 14:18:16 0xFC4 1 Savepoin Savepoint (Converter) started by T1 2008-01-24 14:18:16 0xFF0 20004 Pager SVP(1) Start Write Data 2008-01-24 14:18:16 0xFC4 WRN 20000 KernelDB 97 percent of data area occupied, 77 pages free 2008-01-24 14:18:16 0xFF0 20005 Pager SVP(1) Stop Data IO, Pages: 208 IO: 18 2008-01-24 14:18:16 0xFF0 20006 Pager SVP(2) Wait for last task: 52 2008-01-24 14:18:16 0xFF0 52030 AUTOSAVE started 2008-01-24 14:18:16 0x76C 19625 IO Async I/O thread started, 'c:sdbadminbackupalog.bck.010 2008-01-24 14:18:16 0xFF0 52101 AUTOSAVE Filetype: file 2008-01-24 14:18:16 0xFF0 52024 AUTOSAVE 200 pages -> "adminbackupalog.bck.010" 2008-01-24 14:18:17 0xFF0 52024 AUTOSAVE 352 pages -> "adminbackupalog.bck.010" 2008-01-24 14:18:17 0x76C 19626 IO Async I/O thread stopped, 'c:sdbadminbackupalog.bck.010' 2008-01-24 14:18:17 0xFF0 52031 AUTOSAVE ready 2008-01-24 14:20:12 0xAE0 19633 CONNECT Connect req. (T30, Node:'', PID:1992) 2008-01-24 14:20:12 0xAE0 19615 VOLUMEIO Attaching volume 'c:sdbadminlogLOG_002' 2008-01-24 14:20:13 0x3FC 19613 DBSTATE I/O thread for 'c:sdbadminlogLOG_002' started 2008-01-24 14:20:13 0xAE0 19616 VOLUMEIO Detaching volume 'c:sdbadminlogLOG_002' 2008-01-24 14:20:13 0x3FC 19614 DBSTATE I/O thread for 'c:sdbadminlogLOG_002' stopped 2008-01-24 14:20:13 0xAE0 19615 VOLUMEIO Attaching volume 'c:sdbadminlogLOG_002' 2008-01-24 14:20:13 0x5CC 19613 DBSTATE I/O thread for 'c:sdbadminlogLOG_002' started 2008-01-24 14:20:14 0xAE0 20002 IOMan Add log volume 2 with 2560 pages successfully executed 2008-01-24 14:20:14 0xAE0 19651 CONNECT Connection released, T30 -------------------------------------------- current write position ---------------- =========================================== end of write cycle =================== The only way to solve a DB FULL situation is to ADD DATA DEVSPACE : Page 22 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  23. 23. After adding a new data volume the transaction ends normally without an error message. A DB FULL situation may occur the next time the database space is full: The database admin is running. 1.1.5. Loading Demo Tables The tutorial schema hotel may be added to a database or not. For demonstration purposes the schema and data is loaded. Page 23 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen
  24. 24. Here is a entity relationship diagram of the schema hotel: Log on to SQL Studio using the database user mona and password red. Page 24 of 24 – Getting Started with MaxDB / Database Administration – R.Dahmen

×