Home All Groups Group Topic Archive Search About


Author
15 Jun 2009 1:18 PM
Paulo
Hi, how do I use a command via Query Analizer to make a bkp on some
database? How do I know it's fineshed?

"DBName_DateTime.bak" <- must be the file generated

I'm using SQL2000/5

Many Thanks

Author
15 Jun 2009 2:10 PM
Tom Moreau
Check out BACKUP DATABASE in the BOL.

--
   Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON   Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau


"Paulo" <eris_pa***@terra.com.br> wrote in message
news:uiIFyub7JHA.1568@TK2MSFTNGP06.phx.gbl...
Hi, how do I use a command via Query Analizer to make a bkp on some
database? How do I know it's fineshed?

"DBName_DateTime.bak" <- must be the file generated

I'm using SQL2000/5

Many Thanks
Are all your drivers up to date? click for free checkup

Author
15 Jun 2009 2:11 PM
Linchi Shea
You will get a lot more information on this question if you open up SQL
Sefver 2005 Books Online, and type BACKUP on the Index tab. But briefly, to
backup database ABC to file abc_db_backup.bak in directory G:\backup, you can
do the following:

BACKUP DATABASE ABC to disk='G:\backup\abc_db_backup.bak' with INIT;

Look up in BOkks Online for the options that can be specified for BACKUP
DATABASE.

Linchi

Show quoteHide quote
"Paulo" wrote:

> Hi, how do I use a command via Query Analizer to make a bkp on some
> database? How do I know it's fineshed?
>
> "DBName_DateTime.bak" <- must be the file generated
>
> I'm using SQL2000/5
>
> Many Thanks
>
>
>
Author
15 Jun 2009 2:31 PM
Paulo
EXECUTE master.dbo.xp_sqlmaint N'-PlanID
2938A525-91BC-41F0-9378-4CD969241DEE -WriteHistory -VrfyBackup -BkUpMedia
DISK -BkUpDB "d:\BKPS" -DelBkUps 3DAYS -BkExt "BAK"'

I tried above but no success!

Show quoteHide quote
"Linchi Shea" <LinchiS***@discussions.microsoft.com> escreveu na mensagem
news:AD5143DA-8863-48F5-B4B7-6B6D412D1CEC@microsoft.com...
> You will get a lot more information on this question if you open up SQL
> Sefver 2005 Books Online, and type BACKUP on the Index tab. But briefly,
> to
> backup database ABC to file abc_db_backup.bak in directory G:\backup, you
> can
> do the following:
>
> BACKUP DATABASE ABC to disk='G:\backup\abc_db_backup.bak' with INIT;
>
> Look up in BOkks Online for the options that can be specified for BACKUP
> DATABASE.
>
> Linchi
>
> "Paulo" wrote:
>
>> Hi, how do I use a command via Query Analizer to make a bkp on some
>> database? How do I know it's fineshed?
>>
>> "DBName_DateTime.bak" <- must be the file generated
>>
>> I'm using SQL2000/5
>>
>> Many Thanks
>>
>>
>>
Author
15 Jun 2009 3:55 PM
Linchi Shea
What error messages are you getting from running the statement?

Linchi

Show quoteHide quote
"Paulo" wrote:

> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> 2938A525-91BC-41F0-9378-4CD969241DEE -WriteHistory -VrfyBackup -BkUpMedia
> DISK -BkUpDB "d:\BKPS" -DelBkUps 3DAYS -BkExt "BAK"'
>
> I tried above but no success!
>
> "Linchi Shea" <LinchiS***@discussions.microsoft.com> escreveu na mensagem
> news:AD5143DA-8863-48F5-B4B7-6B6D412D1CEC@microsoft.com...
> > You will get a lot more information on this question if you open up SQL
> > Sefver 2005 Books Online, and type BACKUP on the Index tab. But briefly,
> > to
> > backup database ABC to file abc_db_backup.bak in directory G:\backup, you
> > can
> > do the following:
> >
> > BACKUP DATABASE ABC to disk='G:\backup\abc_db_backup.bak' with INIT;
> >
> > Look up in BOkks Online for the options that can be specified for BACKUP
> > DATABASE.
> >
> > Linchi
> >
> > "Paulo" wrote:
> >
> >> Hi, how do I use a command via Query Analizer to make a bkp on some
> >> database? How do I know it's fineshed?
> >>
> >> "DBName_DateTime.bak" <- must be the file generated
> >>
> >> I'm using SQL2000/5
> >>
> >> Many Thanks
> >>
> >>
> >>
>
>
>
Author
15 Jun 2009 4:05 PM
Tibor Karaszi
What lead you to believe that you would execute xp_sqlmaint? Did you
create a maint plan which happened to get that GUID? Etc...

Here's something that should get you started:
http://www.karaszi.com/SQLServer/util_backup_script_like_MP.asp

Show quoteHide quote
"Paulo" <eris_pa***@terra.com.br> wrote in message
news:uxgzhXc7JHA.6136@TK2MSFTNGP03.phx.gbl...
> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
> 2938A525-91BC-41F0-9378-4CD969241DEE -WriteHistory -VrfyBackup -BkUpMedia
> DISK -BkUpDB "d:\BKPS" -DelBkUps 3DAYS -BkExt "BAK"'
>
> I tried above but no success!
>
> "Linchi Shea" <LinchiS***@discussions.microsoft.com> escreveu na
> mensagem news:AD5143DA-8863-48F5-B4B7-6B6D412D1CEC@microsoft.com...
>> You will get a lot more information on this question if you open up
>> SQL
>> Sefver 2005 Books Online, and type BACKUP on the Index tab. But
>> briefly, to
>> backup database ABC to file abc_db_backup.bak in directory
>> G:\backup, you can
>> do the following:
>>
>> BACKUP DATABASE ABC to disk='G:\backup\abc_db_backup.bak' with
>> INIT;
>>
>> Look up in BOkks Online for the options that can be specified for
>> BACKUP
>> DATABASE.
>>
>> Linchi
>>
>> "Paulo" wrote:
>>
>>> Hi, how do I use a command via Query Analizer to make a bkp on
>>> some
>>> database? How do I know it's fineshed?
>>>
>>> "DBName_DateTime.bak" <- must be the file generated
>>>
>>> I'm using SQL2000/5
>>>
>>> Many Thanks
>>>
>>>
>>>
>
>
Author
15 Jun 2009 5:38 PM
Paulo
Very good... very good Mr. Karaszi... you're THE guy!

Thanks!

Show quoteHide quote
"Tibor Karaszi" <tibor_please.no.email_kara***@hotmail.nomail.com> escreveu
na mensagem news:ugBErMd7JHA.1432@TK2MSFTNGP02.phx.gbl...
> What lead you to believe that you would execute xp_sqlmaint? Did you
> create a maint plan which happened to get that GUID? Etc...
>
> Here's something that should get you started:
> http://www.karaszi.com/SQLServer/util_backup_script_like_MP.asp
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://sqlblog.com/blogs/tibor_karaszi
>
>
> "Paulo" <eris_pa***@terra.com.br> wrote in message
> news:uxgzhXc7JHA.6136@TK2MSFTNGP03.phx.gbl...
>> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
>> 2938A525-91BC-41F0-9378-4CD969241DEE -WriteHistory -VrfyBackup -BkUpMedia
>> DISK -BkUpDB "d:\BKPS" -DelBkUps 3DAYS -BkExt "BAK"'
>>
>> I tried above but no success!
>>
>> "Linchi Shea" <LinchiS***@discussions.microsoft.com> escreveu na mensagem
>> news:AD5143DA-8863-48F5-B4B7-6B6D412D1CEC@microsoft.com...
>>> You will get a lot more information on this question if you open up SQL
>>> Sefver 2005 Books Online, and type BACKUP on the Index tab. But briefly,
>>> to
>>> backup database ABC to file abc_db_backup.bak in directory G:\backup,
>>> you can
>>> do the following:
>>>
>>> BACKUP DATABASE ABC to disk='G:\backup\abc_db_backup.bak' with INIT;
>>>
>>> Look up in BOkks Online for the options that can be specified for BACKUP
>>> DATABASE.
>>>
>>> Linchi
>>>
>>> "Paulo" wrote:
>>>
>>>> Hi, how do I use a command via Query Analizer to make a bkp on some
>>>> database? How do I know it's fineshed?
>>>>
>>>> "DBName_DateTime.bak" <- must be the file generated
>>>>
>>>> I'm using SQL2000/5
>>>>
>>>> Many Thanks
>>>>
>>>>
>>>>
>>
>>
>
Author
15 Jun 2009 5:40 PM
Tibor Karaszi
Glad you found it useful. Also check out Ola Hallengren's procedures
(URL in the article) for a more comprehensive and "packaged" solution.

Show quoteHide quote
"Paulo" <eris_pa***@terra.com.br> wrote in message
news:urdfKAe7JHA.4100@TK2MSFTNGP06.phx.gbl...
> Very good... very good Mr. Karaszi... you're THE guy!
>
> Thanks!
>
> "Tibor Karaszi" <tibor_please.no.email_kara***@hotmail.nomail.com>
> escreveu na mensagem news:ugBErMd7JHA.1432@TK2MSFTNGP02.phx.gbl...
>> What lead you to believe that you would execute xp_sqlmaint? Did
>> you create a maint plan which happened to get that GUID? Etc...
>>
>> Here's something that should get you started:
>> http://www.karaszi.com/SQLServer/util_backup_script_like_MP.asp
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://sqlblog.com/blogs/tibor_karaszi
>>
>>
>> "Paulo" <eris_pa***@terra.com.br> wrote in message
>> news:uxgzhXc7JHA.6136@TK2MSFTNGP03.phx.gbl...
>>> EXECUTE master.dbo.xp_sqlmaint N'-PlanID
>>> 2938A525-91BC-41F0-9378-4CD969241DEE -WriteHistory -VrfyBackup -BkUpMedia
>>> DISK -BkUpDB "d:\BKPS" -DelBkUps 3DAYS -BkExt "BAK"'
>>>
>>> I tried above but no success!
>>>
>>> "Linchi Shea" <LinchiS***@discussions.microsoft.com> escreveu na
>>> mensagem
>>> news:AD5143DA-8863-48F5-B4B7-6B6D412D1CEC@microsoft.com...
>>>> You will get a lot more information on this question if you open
>>>> up SQL
>>>> Sefver 2005 Books Online, and type BACKUP on the Index tab. But
>>>> briefly, to
>>>> backup database ABC to file abc_db_backup.bak in directory
>>>> G:\backup, you can
>>>> do the following:
>>>>
>>>> BACKUP DATABASE ABC to disk='G:\backup\abc_db_backup.bak' with
>>>> INIT;
>>>>
>>>> Look up in BOkks Online for the options that can be specified for
>>>> BACKUP
>>>> DATABASE.
>>>>
>>>> Linchi
>>>>
>>>> "Paulo" wrote:
>>>>
>>>>> Hi, how do I use a command via Query Analizer to make a bkp on
>>>>> some
>>>>> database? How do I know it's fineshed?
>>>>>
>>>>> "DBName_DateTime.bak" <- must be the file generated
>>>>>
>>>>> I'm using SQL2000/5
>>>>>
>>>>> Many Thanks
>>>>>
>>>>>
>>>>>
>>>
>>>
>>
>
>
Author
15 Jun 2009 3:03 PM
Uri Dimant
Paulo
As Tom said check out BACKUP DATABASE command in the bOL

> database? How do I know it's fineshed?

--For operations
DBCC CHECKDB
DBCC SHRINKDATABASE
DBCC SHRINKFILE
BACKUP DATABASE
ROLLBACK


select top 2 start_time,
percent_complete ,estimated_completion_time
from sys.dm_exec_requests
order by start_time desc






Show quoteHide quote
"Paulo" <eris_pa***@terra.com.br> wrote in message
news:uiIFyub7JHA.1568@TK2MSFTNGP06.phx.gbl...
> Hi, how do I use a command via Query Analizer to make a bkp on some
> database? How do I know it's fineshed?
>
> "DBName_DateTime.bak" <- must be the file generated
>
> I'm using SQL2000/5
>
> Many Thanks
>

Bookmark and Share