|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.util.Tool
org.h2.tools.Recover
public class Recover
Helps recovering a corrupted database.
| Field Summary |
|---|
| Fields inherited from class org.h2.util.Tool |
|---|
out |
| Constructor Summary | |
|---|---|
Recover()
|
|
| Method Summary | |
|---|---|
int |
allocateObjectId(boolean b,
boolean c)
INTERNAL |
void |
checkPowerOff()
INTERNAL |
void |
checkWritingAllowed()
INTERNAL |
int |
compareTypeSave(Value a,
Value b)
INTERNAL |
static void |
convert(java.lang.String dir,
java.lang.String db)
Try to convert a database to the page store format. |
java.lang.String |
createTempFile()
INTERNAL |
static void |
deleteRecoverFiles(java.lang.String dir,
java.lang.String db)
Delete all files that were created by the recover tool. |
static void |
execute(java.lang.String dir,
java.lang.String db)
Dumps the contents of a database to a SQL script file. |
void |
freeUpDiskSpace()
INTERNAL |
int |
getChecksum(byte[] data,
int start,
int end)
INTERNAL |
java.lang.String |
getDatabasePath()
INTERNAL |
java.lang.String |
getLobCompressionAlgorithm(int type)
INTERNAL |
SmallLRUCache<java.lang.String,java.lang.String[]> |
getLobFileListCache()
INTERNAL |
boolean |
getLobFilesInDirectories()
INTERNAL |
java.lang.Object |
getLobSyncObject()
INTERNAL |
int |
getMaxLengthInplaceLob()
INTERNAL |
TempFileDeleter |
getTempFileDeleter()
INTERNAL |
Trace |
getTrace()
INTERNAL |
void |
handleInvalidChecksum()
INTERNAL |
static void |
main(java.lang.String... args)
Options are case sensitive. |
FileStore |
openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
INTERNAL |
static java.io.InputStream |
readBlob(java.lang.String fileName)
INTERNAL |
static java.io.Reader |
readClob(java.lang.String fileName)
INTERNAL |
void |
run(java.lang.String... args)
Dumps the contents of a database file to a human readable text file. |
| Methods inherited from class org.h2.util.Tool |
|---|
printNoDatabaseFilesFound, readArgBoolean, setOut, showUsage, throwUnsupportedOption |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Recover()
| Method Detail |
|---|
public static void main(java.lang.String... args)
throws java.sql.SQLException
| [-help] or [-?] | Print the list of options |
| [-dir <dir>] | The directory (default: .) |
| [-db <database>] | The database name (all databases if not set) |
| [-trace] | Print additional trace information |
args - the command line arguments
java.sql.SQLException
public void run(java.lang.String... args)
throws java.sql.SQLException
run in class Toolargs - the command line arguments
java.sql.SQLException
public static java.io.Reader readClob(java.lang.String fileName)
throws java.io.IOException
java.io.IOException
public static java.io.InputStream readBlob(java.lang.String fileName)
throws java.io.IOException
java.io.IOException
public static void execute(java.lang.String dir,
java.lang.String db)
throws java.sql.SQLException
dir - the directorydb - the database name (null for all databases)
java.sql.SQLExceptionpublic java.lang.String getDatabasePath()
getDatabasePath in interface DataHandler
public FileStore openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
throws java.sql.SQLException
openFile in interface DataHandlername - the file namemode - the modemustExist - whether the file must already exist
java.sql.SQLException
public int getChecksum(byte[] data,
int start,
int end)
getChecksum in interface DataHandlerdata - the byte arraystart - the starting offsetend - the end offset
public void checkPowerOff()
checkPowerOff in interface DataHandlerpublic void checkWritingAllowed()
checkWritingAllowed in interface DataHandlerpublic void freeUpDiskSpace()
freeUpDiskSpace in interface DataHandler
public void handleInvalidChecksum()
throws java.sql.SQLException
handleInvalidChecksum in interface DataHandlerjava.sql.SQLException - if this should not be ignored
public int compareTypeSave(Value a,
Value b)
compareTypeSave in interface DataHandlera - the first valueb - the second value
public int getMaxLengthInplaceLob()
getMaxLengthInplaceLob in interface DataHandler
public int allocateObjectId(boolean b,
boolean c)
allocateObjectId in interface DataHandlerb - if a fresh id is requiredc - true if the id is for the data file
public java.lang.String createTempFile()
createTempFile in interface DataHandlerpublic java.lang.String getLobCompressionAlgorithm(int type)
getLobCompressionAlgorithm in interface DataHandlertype - the data type (CLOB or BLOB)
public java.lang.Object getLobSyncObject()
getLobSyncObject in interface DataHandlerpublic boolean getLobFilesInDirectories()
getLobFilesInDirectories in interface DataHandlerpublic SmallLRUCache<java.lang.String,java.lang.String[]> getLobFileListCache()
getLobFileListCache in interface DataHandlerpublic TempFileDeleter getTempFileDeleter()
getTempFileDeleter in interface DataHandlerpublic Trace getTrace()
getTrace in interface DataHandler
public static void deleteRecoverFiles(java.lang.String dir,
java.lang.String db)
throws java.sql.SQLException
dir - the directorydb - the database name
java.sql.SQLException
public static void convert(java.lang.String dir,
java.lang.String db)
throws java.sql.SQLException
dir - the directorydb - the database name
java.sql.SQLException - if conversion fails
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||