January 19, 2010 at 3:52 pm
hi,
i am trying to execute restore database command from perl dbi connection.
it errors out..
[Microsoft][ODBC SQL Server Driver][SQL Server]Processed 168 pages for database 'aks1', file 'Test' on file 1. (SQL-01000)
actually restore command generates following information.
Processed 168 pages for database 'aks1', file 'Test' on file 1.
Processed 1 pages for database 'aks1', file 'Test_log' on file 1.
RESTORE DATABASE successfully processed 169 pages in 0.165 seconds (8.390 MB/sec).
so dbi handle , thins first message is error and exits.
Somewhere i read, restore command requires the client alive for completion.
This causes database restore hangs in partial . log is not applied and i cann't recover toand i get this error to bring online
Msg 4333, Level 16, State 1, Line 1
The database cannot be recovered because the log was not restored
any idea, how can i keep dbi handle alive or ignore these informational messages or other method to run the command from perl?
thanks
AK
January 19, 2010 at 10:10 pm
I'm not a Perl user so, sorry, no joy there. I am curious, though... why are you using Perl to execute restores?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 20, 2010 at 6:39 am
i am creating a script to refresh devlopment database from production.
it will be called from a front end screen that lists source/target server and developer can refresh any dev database
January 20, 2010 at 8:51 am
i changed prepare to include an option solved the problem
my $sth = $db->prepare( $sql, { odbc_exec_direct => 1})
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply