I need to recevory a database with more than 200 incremental backups (we do a lot of it a day). I'm using ASA9, so I don't have -ad option. I can't write bat/script since dbeng9 command line creates a new process and stops the first one, this way I'll try to process second log without first finishes. Can you help me? asked 21 Sep '11, 18:17 Zote |
Solved with a little bit of C#. My program lists all log files, and starts a new dbeng9 for each, and wait until no more dbeng9 process exists. Torrow I'll cleanup my code, and publish it at bitbucket or github, this can be helpful for someone. answered 21 Sep '11, 23:12 Zote I would think that a PowerShell scriptlet would be an easier way to do that -- I know that I've used VBScript to achieve a similar effect when using CuteFTP to upload a 3-4GB file in 20MB chunks. Your comment about not being able write such a script was why I suggested the brute-force batch-file method.
(22 Sep '11, 01:21)
William Clardy
|
From the help docs, it sounds like your best bet may be to translate the log files into a single SQL file, and then apply that directly to your database: To recover from multiple transaction logs using the dbtran utility
Example The following example uses the dbtran utility to apply the backup and current transaction logs to the backup copy of the database.
answered 21 Sep '11, 19:53 Calvin Allen Isn't an option. Apply translated logs are so much slow...
(21 Sep '11, 23:10)
Zote
|
The quick and dirty way around dbeng9 starting in a separate process would be to use a batch file for all the dbeng9 -a commands, alternating the dbeng9 commands with pause commands. That would be uncomfortably interactive, because you'll have to smack the [Enter] key after each log file has been processed, but it will get you back in business. answered 21 Sep '11, 20:05 William Clardy I made something like this using C#.
(21 Sep '11, 23:13)
Zote
|
Out of my memory something like this can help. for %b in ( *.log ) do start "Server" /wait dbeng9 database.db -a %b The only problem here is that you have to watch carefully for spaces in your command line. Not as sexy as C# but ... "It is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail." by Abraham Maslow answered 22 Sep '11, 06:38 Thomas Dueme... 1
IMHO that would work only if the log files are read in the correct order. I'm not sure if one can always rely on a "natural" ordering.
(22 Sep '11, 08:04)
Reimer Pods
2
Good Point. for /F %b in ( 'dir /b /O:N' ) do echo %b Will step through the output of the directory command which is sorted by name. There is always a Option you not already know before you need it.
(22 Sep '11, 08:42)
Thomas Dueme...
|