Hi,
My app uses MSDE and I have created a UI for user which has buttons to backup and restore the database. Everything works fine but I want to give a visual display to user about the progress of the operation. You know like a progress bar indicating how mu
ch work is done.. so the question is:
Is there a way to find out how much time backup/restore will take.. does sql server provide any such event to us telling this information. I just want to trap this event and give the progress indication to my loyal users.
Thanks all.
dev
Thanks Andrea for the reply. I am using T-SQL commands right now to backup and restore database. If I use sql-dmo to trap progress event then would that mean that I will have to change the backup/restore sourcecode also to use sql-dmo. Please confirm.
Thanks
|||hi,
"dev" <anonymous@.discussions.microsoft.com> ha scritto nel messaggio
news:8CD41CBC-6EF7-46F8-BC3C-3415F14A6BD5@.microsoft.com...
> Thanks Andrea for the reply. I am using T-SQL commands right now to
backup
>and restore database. If I use sql-dmo to trap progress event then would
that
>mean that I will have to change the backup/restore sourcecode also to use
>sql-dmo. Please confirm.
yep.. you have to use the SQL-DMO backup object to trap the raised events...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||oh no.. so what is this sql-dmo. What is the purpose of it's existance. Why do we need it (besides for the progress bar). How is it different from programming with T-SQL. How can we choose which way to go, T-SQL or SQL-DMO. What are it's advantages an
d disadvantages.
Thanks
|||Also was it unwise of me to opt for T-SQL for doing everything instead of going for DMO. And is it ok to use DMO for backup/restore and use T-SQL for everything else. What are your recommendations.
We are as before an ISV, app will be deployed using MSDE, will have max a couple of databases. Will provide an interface to the user to backup and restore database. Will creare database from app and do version checks for database.
What should we do... or should we wait for SMO..
Thanks for your valuable time.
|||hi,
"dev" <anonymous@.discussions.microsoft.com> ha scritto nel messaggio
news:07DA4684-529D-48D5-9D6A-56DDFDB077A7@.microsoft.com...
> oh no.. so what is this sql-dmo. What is the purpose of it's existance.
Why do we need it
>(besides for the progress bar). How is it different from programming with
T-SQL. How can
> we choose which way to go, T-SQL or SQL-DMO. What are it's advantages and
disadvantages.
> Thanks
SQL-DMO is an acronym for SQL Distributed Management Object and is a full
object model to manage and administer SQL Server..
it exposes a nice object model you can navigate to perform quiet all
management tasks on SQL Server..
it's not designed for data manipulation even if it provides some features
to.
it comes with MSDE and/or can be installed from the Client Tools
installation package of SQL Server.
it is not provided as a separate download and/or package, so you have to
depoly it yourself in MSDE scenarios (you are legitimate to) ... this can be
count as a disadvantage too :-)
it's a little buggy =;-) and eats a lot of memory, but is very handy for
some admin scenario...
Transact-SQL, on the contrary, is the language SQL Server better understand,
and can perform both data manipulation and administration tasks... it's a
separate language where DMO is just a COM object model you can use in any
COM compliant client, so they can not be compared... you shoul'd stick with
Transact-SQL, and use DMO where and when appropriated...
by the way... there's only 1 book worth reading about SQL-DMO, by SQL Server
MVPs Allan Mitchell and Mark Allison,
http://www.compman.co.uk/cgi-win/browse.exe?ref=552118 , which I personally
recommend reading...
FWIW, you can have a look at a free prj of mine at the link following my
sign to have an idea aboout what you can do with SQL-DMO, a prj that
provides a user interface similar to Enteprise Manager written in VB6
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||hi,
"dev" <anonymous@.discussions.microsoft.com> ha scritto nel messaggio
news:AF907AC5-9610-41F9-95DD-FC68828844F6@.microsoft.com...
> Also was it unwise of me to opt for T-SQL for doing everything instead of
going for DMO.
>And is it ok to use DMO for backup/restore and use T-SQL for everything
else. What are your
>recommendations.
> We are as before an ISV, app will be deployed using MSDE, will have max a
couple of
>databases. Will provide an interface to the user to backup and restore
database.
>Will creare database from app and do version checks for database.
> What should we do... or should we wait for SMO..
if you only need DMO for presenting a progress bar indicating backup
progress, let it be...
you have to talk to SQL Server via Transact-SQL...
perform backup via ADO.Net commands...
SMO will be only available wit SQL Server 2005, and anyway I don't think it
shoul'd be used for traditional programming, but for the same things now
covered by DMO...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks Andrea for the insight. I already use your tool since quiet some time and appreciate it. So do you recommend I use T-SQL for everything as now, you know db creation, data manipulation and use dmo for backup/restore which I can later port to use s
mo when yukon arrives..
dev
|||I am sorry Andrea but I didn't understand what you said here:
"if you only need DMO for presenting a progress bar indicating backup
progress, let it be...
you have to talk to SQL Server via Transact-SQL...
perform backup via ADO.Net commands..."
Do you mean that I use T-SQL for everything else and just use DMO for the backup/restore.
Sorry to bother you like this but Thanks
|||hi,
"dev" <anonymous@.discussions.microsoft.com> ha scritto nel messaggio
news:778938C6-1142-4954-B633-BBF0669342D3@.microsoft.com...
> I am sorry Andrea but I didn't understand what you said here:
> "if you only need DMO for presenting a progress bar indicating backup
> progress, let it be...
> you have to talk to SQL Server via Transact-SQL...
> perform backup via ADO.Net commands..."
> Do you mean that I use T-SQL for everything else and just use DMO for the
backup/restore.
> Sorry to bother you like this but Thanks
please excuse my poor english...
what I mean is go with Transact-SQL for all you stuffs, including
Backup/Restore, if you only need SQL-DMO for providing a progress
indicator...
if you need SQL-DMO for other things, then you can consider adding it to
your project references [and setup package :-( ]
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Showing posts with label progress. Show all posts
Showing posts with label progress. Show all posts
Friday, February 24, 2012
Thursday, February 16, 2012
Backup with SQL2000
With SQL 2000 I am aware that a transaction log backup cannot be done while
a
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some statu
s
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!"Howard" wrote:
> With SQL 2000 I am aware that a transaction log backup cannot be done whil
e a
> transaction log backup of the same database is already in progress. Instea
d
> of starting a transaction log backup and having it fail, is there some sta
tus
> to check somewhere (say in the SQL catalog) that indicates that a backup i
s
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/D...RunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||I already know how to stop a job. What I need to know is whether a backup fo
r
database X is currently in progress. E.g., I know if a restore is in progres
s
because loading state would be set in the 'status' field of sysdatabases. I
s
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:
> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/D...RunningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backe
d
up.
Thanks.
"Paul Ibison" wrote:
> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:
> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>
a
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some statu
s
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!"Howard" wrote:
> With SQL 2000 I am aware that a transaction log backup cannot be done whil
e a
> transaction log backup of the same database is already in progress. Instea
d
> of starting a transaction log backup and having it fail, is there some sta
tus
> to check somewhere (say in the SQL catalog) that indicates that a backup i
s
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/D...RunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||I already know how to stop a job. What I need to know is whether a backup fo
r
database X is currently in progress. E.g., I know if a restore is in progres
s
because loading state would be set in the 'status' field of sysdatabases. I
s
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:
> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/D...RunningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backe
d
up.
Thanks.
"Paul Ibison" wrote:
> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:
> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>
Backup with SQL2000
With SQL 2000 I am aware that a transaction log backup cannot be done while a
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some status
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!"Howard" wrote:
> With SQL 2000 I am aware that a transaction log backup cannot be done while a
> transaction log backup of the same database is already in progress. Instead
> of starting a transaction log backup and having it fail, is there some status
> to check somewhere (say in the SQL catalog) that indicates that a backup is
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||I already know how to stop a job. What I need to know is whether a backup for
database X is currently in progress. E.g., I know if a restore is in progress
because loading state would be set in the 'status' field of sysdatabases. Is
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:
> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backed
up.
Thanks.
"Paul Ibison" wrote:
> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:
> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some status
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!"Howard" wrote:
> With SQL 2000 I am aware that a transaction log backup cannot be done while a
> transaction log backup of the same database is already in progress. Instead
> of starting a transaction log backup and having it fail, is there some status
> to check somewhere (say in the SQL catalog) that indicates that a backup is
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)|||I already know how to stop a job. What I need to know is whether a backup for
database X is currently in progress. E.g., I know if a restore is in progress
because loading state would be set in the 'status' field of sysdatabases. Is
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:
> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/Downloads/KillRunningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backed
up.
Thanks.
"Paul Ibison" wrote:
> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:
> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>
Monday, February 13, 2012
Backup with SQL2000
With SQL 2000 I am aware that a transaction log backup cannot be done while a
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some status
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!
"Howard" wrote:
> With SQL 2000 I am aware that a transaction log backup cannot be done while a
> transaction log backup of the same database is already in progress. Instead
> of starting a transaction log backup and having it fail, is there some status
> to check somewhere (say in the SQL catalog) that indicates that a backup is
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.
|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/Do...unningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I already know how to stop a job. What I need to know is whether a backup for
database X is currently in progress. E.g., I know if a restore is in progress
because loading state would be set in the 'status' field of sysdatabases. Is
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:
> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/Do...unningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison
|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backed
up.
Thanks.
"Paul Ibison" wrote:
> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>
|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP
|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:
> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>
transaction log backup of the same database is already in progress. Instead
of starting a transaction log backup and having it fail, is there some status
to check somewhere (say in the SQL catalog) that indicates that a backup is
in progress?
Thank-you!
"Howard" wrote:
> With SQL 2000 I am aware that a transaction log backup cannot be done while a
> transaction log backup of the same database is already in progress. Instead
> of starting a transaction log backup and having it fail, is there some status
> to check somewhere (say in the SQL catalog) that indicates that a backup is
> in progress?
> Thank-you!
Oops, I didn't state this quite right. I meant to say that the transaction
log backup would fail if their were a FULL backup in progress. So again, is
there anyway to detect that the full backup is currently in progress. Thanks
again.
|||Howard,
I use this script to check if a job is executing, and if it is to stop it.
You could adapt it for your own purposes:
http://www.replicationanswers.com/Do...unningJobs.txt
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||I already know how to stop a job. What I need to know is whether a backup for
database X is currently in progress. E.g., I know if a restore is in progress
because loading state would be set in the 'status' field of sysdatabases. Is
there any way to know that a backup is in progress? (Again, I want to know
this because I will not start a transaction log backup if there is a full in
progress).
Thanks again.
"Paul Ibison" wrote:
> Howard,
> I use this script to check if a job is executing, and if it is to stop it.
> You could adapt it for your own purposes:
> http://www.replicationanswers.com/Do...unningJobs.txt
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||Howard,
this script doesn't just stop a job - the stored procedure call checks to
see if the job is currently executing. As long as your database backup is
done in a job and you know the job name it should be ok.
Paul Ibison
|||Paul,
Unfortunately, I wouldn't know the job name of the executing backup or the
jobid. I just need to know that particular database is currently being backed
up.
Thanks.
"Paul Ibison" wrote:
> Howard,
> this script doesn't just stop a job - the stored procedure call checks to
> see if the job is currently executing. As long as your database backup is
> done in a job and you know the job name it should be ok.
> Paul Ibison
>
>
|||Howard,
please try this:
select cmd, db_name(dbid) as DatabaseName from sysprocesses
where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
Cheers,
Paul Ibison, SQL Server MVP
|||Beautiful!
Thank-you, Howard
"Paul Ibison" wrote:
> Howard,
> please try this:
> select cmd, db_name(dbid) as DatabaseName from sysprocesses
> where cmd = 'Backup Database' and db_name(dbid) = 'yourdatabasename'
> Cheers,
> Paul Ibison, SQL Server MVP
>
>
Subscribe to:
Posts (Atom)