October 21, 2005 at 3:27 am
Hi all,
After running the backup script i get the following messages i want to insert these messages in a table .
how can i do this .
10 percent backed up.
20 percent backed up.
30 percent backed up.
40 percent backed up.
50 percent backed up.
60 percent backed up.
70 percent backed up.
80 percent backed up.
90 percent backed up.
Processed 213400 pages for database 'snapshot_db', file 'Snapshot_DB_Data' on file 1.
100 percent backed up.
Processed 1 pages for database 'snapshot_db', file 'Snapshot_DB_Log' on file 1.
BACKUP DATABASE successfully processed 213401 pages in 82.244 seconds (21.255 MB/sec).
from
Killer
October 21, 2005 at 3:47 am
I do not think there is any way to do that in t-sql. If you are executing the command from a .Net client (or similar) you can get that information and then insert it to a table.
October 21, 2005 at 3:54 am
Sorry chris,
I am bound to do in sql server only.
from
Killer
October 21, 2005 at 7:10 am
Hi, Raj,
Even I have tried but the problem is you
Cannot perform a backup or restore operation within a transaction.
October 21, 2005 at 7:27 pm
Hi,
Veeresh,
Even I have tried but the problem is you .
("Will u pls explain what u are trying to say")
I havent asked for backup and restore within a transaction.
U misunderstood the question. I got the answer from Chris.
Cannot perform a backup or restore operation within a transaction.
from
Killer
October 22, 2005 at 12:12 am
Hi Raj,
I was trying this
I was restoring a database with stats and resukt of this, I wanted to store into a table ..
declare @mdf_name varchar(70)
declare @ldf_name varchar(70)
declare @from_disk varchar(70)
declare @mdisk varchar(70)
declare @to_mdisk varchar(70)
declare @to_ldisk varchar(70)
declare @qry varchar(500)
set @mdf_name = quotename ( 'xxx_Data','''')
set @ldf_name = quotename ( 'xxx_log','''')
set @from_disk =quotename ( 'D:\4SPL\MIGRATION\xxx.bak','''')
set @to_mdisk =quotename ( 'E:\TEST\ULTRASTAFF\xxx_Data.mdf','''')
set @to_ldisk =quotename ( 'E:\TEST\ULTRASTAFF\xxx_Log.ldf','''')
set @qry = ' RESTORE DATABASE xxx'+CHAR(13) +CHAR(10) +' FROM DISK = '+@FROM_DISK +CHAR(13)+CHAR(10) + ' WITH MOVE '+
@MDF_NAME + ' TO ' + @TO_MDISK + ','+ CHAR(13)+CHAR(10) + ' MOVE ' + @LDF_NAME + ' TO ' + @TO_LDISK + CHAR(13)+CHAR(10) +' , STATS'
insert into SOME_TABLE (ONE) -- error here
execute ( @QRY )
how will u solve this..
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply