Showing posts with label master. Show all posts
Showing posts with label master. Show all posts

Thursday, March 22, 2012

BACKUP SERVICE MASTER KEY TO FILE

Hello,
I would to create a backup file dynamically (the filename will contain
the hostname of the DB).
any idea how can I use a variable for that?
(a variable is easy to use for a regular database backup, but not for
a master key).
I wrote on the comment the error I get.
thanks, Yaniv
use master;
declare @.tmpStr varchar(200)
set @.tmpStr = 'c:\temp\DB_service_2.key'
-- working
BACKUP SERVICE MASTER KEY TO FILE = 'c:\temp\DB_service.key'
ENCRYPTION BY
PASSWORD = 't1t1t1t1t1'
-- error: Incorrect syntax near '@.tmpStr'
BACKUP SERVICE MASTER KEY TO FILE = @.tmpStr ENCRYPTION BY PASSWORD =
't1t1t1t1t1'
goYou can use dynamic SQL. Built the BACKUP command in a TSQL varchar variable
, then execute it:
EXEC(@.sql)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<yaniv.harpaz@.gmail.com> wrote in message
news:1170238336.716966.152710@.p10g2000cwp.googlegroups.com...
> Hello,
> I would to create a backup file dynamically (the filename will contain
> the hostname of the DB).
> any idea how can I use a variable for that?
> (a variable is easy to use for a regular database backup, but not for
> a master key).
> I wrote on the comment the error I get.
> thanks, Yaniv
> use master;
> declare @.tmpStr varchar(200)
> set @.tmpStr = 'c:\temp\DB_service_2.key'
> -- working
> BACKUP SERVICE MASTER KEY TO FILE = 'c:\temp\DB_service.key'
> ENCRYPTION BY
> PASSWORD = 't1t1t1t1t1'
> -- error: Incorrect syntax near '@.tmpStr'
> BACKUP SERVICE MASTER KEY TO FILE = @.tmpStr ENCRYPTION BY PASSWORD =
> 't1t1t1t1t1'
> go
>

BACKUP SERVICE MASTER KEY TO FILE

Hello,
I would to create a backup file dynamically (the filename will contain
the hostname of the DB).
any idea how can I use a variable for that?
(a variable is easy to use for a regular database backup, but not for
a master key).
I wrote on the comment the error I get.
thanks, Yaniv
use master;
declare @.tmpStr varchar(200)
set @.tmpStr = 'c:\temp\DB_service_2.key'
-- working
BACKUP SERVICE MASTER KEY TO FILE = 'c:\temp\DB_service.key'
ENCRYPTION BY
PASSWORD = 't1t1t1t1t1'
-- error: Incorrect syntax near '@.tmpStr'
BACKUP SERVICE MASTER KEY TO FILE = @.tmpStr ENCRYPTION BY PASSWORD = 't1t1t1t1t1'
goYou can use dynamic SQL. Built the BACKUP command in a TSQL varchar variable, then execute it:
EXEC(@.sql)
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<yaniv.harpaz@.gmail.com> wrote in message
news:1170238336.716966.152710@.p10g2000cwp.googlegroups.com...
> Hello,
> I would to create a backup file dynamically (the filename will contain
> the hostname of the DB).
> any idea how can I use a variable for that?
> (a variable is easy to use for a regular database backup, but not for
> a master key).
> I wrote on the comment the error I get.
> thanks, Yaniv
> use master;
> declare @.tmpStr varchar(200)
> set @.tmpStr = 'c:\temp\DB_service_2.key'
> -- working
> BACKUP SERVICE MASTER KEY TO FILE = 'c:\temp\DB_service.key'
> ENCRYPTION BY
> PASSWORD = 't1t1t1t1t1'
> -- error: Incorrect syntax near '@.tmpStr'
> BACKUP SERVICE MASTER KEY TO FILE = @.tmpStr ENCRYPTION BY PASSWORD => 't1t1t1t1t1'
> go
>

Monday, March 19, 2012

backup question

Dear all,
i want to verify whether the following backup planning can restore to the
original environment or not
1.) backup master, msdb, model with full backup to bak
2.) backup all user database with full backup and tran log backup to bak
question
how about the DTS package, user login, replication, job schelding, is it can
restore when i backup to the master and model?Users, packages and jobs are all in the databases you are
backup up (DTS Packages - as long as they are saved to SQL
Server as the location) so backing up all of your databases
and restoring all databases, including system databases will
get things back.
Replication restore strategies depend on how you have
implemented replication. You'd want to backup the publisher,
distributor, subscriber. There are different strategies for
merge, transactional, snapshot replication. You can find
them in books online. Look up the index topic:
replication, backup and restore operations
-Sue
On Mon, 3 Oct 2005 04:17:13 -0700, Joe
<Joe@.discussions.microsoft.com> wrote:

>Dear all,
>i want to verify whether the following backup planning can restore to the
>original environment or not
>1.) backup master, msdb, model with full backup to bak
>2.) backup all user database with full backup and tran log backup to bak
>question
>how about the DTS package, user login, replication, job schelding, is it ca
n
>restore when i backup to the master and model?

Backup problems with MASTER database

I cannot get the master database to backup or the MSDB database. I'm only trying to get a full backup out of a maintenance plan. I can manually backup the database, but not through the plan. It gives me an error about not being able to perform the task. I am trying to do a repair, and reindex on it through. Should I do that as part of the plan weekly on the system databases? I used to on my old SQL 7.0 server, but the SQL 2000 server doesn't seem willing to let me.

Thanks,
K'TigreWhat's the exact error msg?

Thursday, March 8, 2012

Backup Plan advice / suggestion

Hello guys,
I would like to know if someone can advice me on that.
I have A MyDB more system DB (master, msdb, model, tempdb)
I would like to set up a Backup plan.
I would like to:
* Backup daily MyDB and system DB
* Backup LOG MyDB every one hours
* Backup LOG System DB (every 4 hours).
Any suggestion how to plan the better schedule time? 22h? 23h for
backup?
Ina
See responses in-line...
ina wrote:
> Hello guys,
> I would like to know if someone can advice me on that.
> I have A MyDB more system DB (master, msdb, model, tempdb)
> I would like to set up a Backup plan.
> I would like to:
> * Backup daily MyDB and system DB
No need to backup TEMPDB or MODEL, unless you have modified MODEL.

> * Backup LOG MyDB every one hours
This depends on your needs and tolerance for risk. You could
*potentially* lose an hour's worth of data, is that an acceptable risk
for you?

> * Backup LOG System DB (every 4 hours).
The only system DB that you can perform log backups on is MSDB, and this
is probably unnecessary.

> Any suggestion how to plan the better schedule time? 22h? 23h for
> backup?
> Ina
>
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Hi Tracy,

> No need to backup TEMPDB or MODEL, unless you have modified MODEL.
What is model crashes? If you have a backup, you just restore that backup. If not, you have to
rebuild the system databases (or do something unsupported like grabbing the files from another
system and worry about collations, if it works etc). This is why I always include database backup of
model in my backups schedules.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:45264804.8030302@.realsqlguy.com...
> See responses in-line...
>
> ina wrote:
> No need to backup TEMPDB or MODEL, unless you have modified MODEL.
>
> This depends on your needs and tolerance for risk. You could *potentially* lose an hour's worth
> of data, is that an acceptable risk for you?
>
> The only system DB that you can perform log backups on is MSDB, and this is probably unnecessary.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
|||Thank you.
what I am doing now it is the full backup for MyDB at 11 PM and log
files this MyDB every hours between 2 AM until 10 PM
Is it fine?
Ina
Tibor Karaszi wrote:[vbcol=seagreen]
> Hi Tracy,
>
> What is model crashes? If you have a backup, you just restore that backup. If not, you have to
> rebuild the system databases (or do something unsupported like grabbing the files from another
> system and worry about collations, if it works etc). This is why I always include database backup of
> model in my backups schedules.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:45264804.8030302@.realsqlguy.com...
|||> what I am doing now it is the full backup for MyDB at 11 PM and log
> files this MyDB every hours between 2 AM until 10 PM
I assume you mean "transaction log backup every hour between 2AB and 10PM".

> Is it fine?
We cannot answer that question. You have to determine that max amount of data loss you accept in
case of some catastrophe and based on that determine what types of backup and frequency. Also, you
didn't mention what backup you do if the system databases.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ina" <roberta.inalbon@.gmail.com> wrote in message
news:1160222216.686213.118770@.e3g2000cwe.googlegro ups.com...
> Thank you.
> what I am doing now it is the full backup for MyDB at 11 PM and log
> files this MyDB every hours between 2 AM until 10 PM
> Is it fine?
> Ina
> Tibor Karaszi wrote:
>
|||Thanks Tibor,
My DB is organize like this everyday I backup Master, Model and Msdb
and every hours a back up the log of Mdsb
For my MyDB is the same backup everyday and backup log every hours.
One question when I change the schedule of the backup (i.e MyDB log
backup) do you thing is better to change backup file or device or it
is enough to change the schedule?
Ina
Tibor Karaszi wrote:[vbcol=seagreen]
> I assume you mean "transaction log backup every hour between 2AB and 10PM".
>
> We cannot answer that question. You have to determine that max amount of data loss you accept in
> case of some catastrophe and based on that determine what types of backup and frequency. Also, you
> didn't mention what backup you do if the system databases.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "ina" <roberta.inalbon@.gmail.com> wrote in message
> news:1160222216.686213.118770@.e3g2000cwe.googlegro ups.com...

Backup Plan advice / suggestion

Hello guys,
I would like to know if someone can advice me on that.
I have A MyDB more system DB (master, msdb, model, tempdb)
I would like to set up a Backup plan.
I would like to:
* Backup daily MyDB and system DB
* Backup LOG MyDB every one hours
* Backup LOG System DB (every 4 hours).
Any suggestion how to plan the better schedule time? 22h? 23h for
backup?
InaSee responses in-line...
ina wrote:
> Hello guys,
> I would like to know if someone can advice me on that.
> I have A MyDB more system DB (master, msdb, model, tempdb)
> I would like to set up a Backup plan.
> I would like to:
> * Backup daily MyDB and system DB
No need to backup TEMPDB or MODEL, unless you have modified MODEL.

> * Backup LOG MyDB every one hours
This depends on your needs and tolerance for risk. You could
*potentially* lose an hour's worth of data, is that an acceptable risk
for you?

> * Backup LOG System DB (every 4 hours).
The only system DB that you can perform log backups on is MSDB, and this
is probably unnecessary.

> Any suggestion how to plan the better schedule time? 22h? 23h for
> backup?
> Ina
>
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Hi Tracy,

> No need to backup TEMPDB or MODEL, unless you have modified MODEL.
What is model crashes? If you have a backup, you just restore that backup. I
f not, you have to
rebuild the system databases (or do something unsupported like grabbing the
files from another
system and worry about collations, if it works etc). This is why I always in
clude database backup of
model in my backups schedules.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:45264804.8030302@.realsqlguy.co
m...
> See responses in-line...
>
> ina wrote:
> No need to backup TEMPDB or MODEL, unless you have modified MODEL.
>
> This depends on your needs and tolerance for risk. You could *potentially
* lose an hour's worth
> of data, is that an acceptable risk for you?
>
> The only system DB that you can perform log backups on is MSDB, and this i
s probably unnecessary.
>
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||Thank you.
what I am doing now it is the full backup for MyDB at 11 PM and log
files this MyDB every hours between 2 AM until 10 PM
Is it fine?
Ina
Tibor Karaszi wrote:[vbcol=seagreen]
> Hi Tracy,
>
> What is model crashes? If you have a backup, you just restore that backup.
If not, you have to
> rebuild the system databases (or do something unsupported like grabbing th
e files from another
> system and worry about collations, if it works etc). This is why I always
include database backup of
> model in my backups schedules.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:45264804.803
0302@.realsqlguy.com...|||> what I am doing now it is the full backup for MyDB at 11 PM and log
> files this MyDB every hours between 2 AM until 10 PM
I assume you mean "transaction log backup every hour between 2AB and 10PM".

> Is it fine?
We cannot answer that question. You have to determine that max amount of dat
a loss you accept in
case of some catastrophe and based on that determine what types of backup an
d frequency. Also, you
didn't mention what backup you do if the system databases.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ina" <roberta.inalbon@.gmail.com> wrote in message
news:1160222216.686213.118770@.e3g2000cwe.googlegroups.com...
> Thank you.
> what I am doing now it is the full backup for MyDB at 11 PM and log
> files this MyDB every hours between 2 AM until 10 PM
> Is it fine?
> Ina
> Tibor Karaszi wrote:
>|||Thanks Tibor,
My DB is organize like this everyday I backup Master, Model and Msdb
and every hours a back up the log of Mdsb
For my MyDB is the same backup everyday and backup log every hours.
One question when I change the schedule of the backup (i.e MyDB log
backup) do you thing is better to change backup file or device or it
is enough to change the schedule?
Ina
Tibor Karaszi wrote:[vbcol=seagreen]
> I assume you mean "transaction log backup every hour between 2AB and 10PM"
.
>
> We cannot answer that question. You have to determine that max amount of d
ata loss you accept in
> case of some catastrophe and based on that determine what types of backup
and frequency. Also, you
> didn't mention what backup you do if the system databases.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "ina" <roberta.inalbon@.gmail.com> wrote in message
> news:1160222216.686213.118770@.e3g2000cwe.googlegroups.com...

Backup Plan advice / suggestion

Hello guys,
I would like to know if someone can advice me on that.
I have A MyDB more system DB (master, msdb, model, tempdb)
I would like to set up a Backup plan.
I would like to:
* Backup daily MyDB and system DB
* Backup LOG MyDB every one hours
* Backup LOG System DB (every 4 hours).
Any suggestion how to plan the better schedule time? 22h? 23h for
backup?
InaSee responses in-line...
ina wrote:
> Hello guys,
> I would like to know if someone can advice me on that.
> I have A MyDB more system DB (master, msdb, model, tempdb)
> I would like to set up a Backup plan.
> I would like to:
> * Backup daily MyDB and system DB
No need to backup TEMPDB or MODEL, unless you have modified MODEL.
> * Backup LOG MyDB every one hours
This depends on your needs and tolerance for risk. You could
*potentially* lose an hour's worth of data, is that an acceptable risk
for you?
> * Backup LOG System DB (every 4 hours).
The only system DB that you can perform log backups on is MSDB, and this
is probably unnecessary.
> Any suggestion how to plan the better schedule time? 22h? 23h for
> backup?
> Ina
>
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Hi Tracy,
> No need to backup TEMPDB or MODEL, unless you have modified MODEL.
What is model crashes? If you have a backup, you just restore that backup. If not, you have to
rebuild the system databases (or do something unsupported like grabbing the files from another
system and worry about collations, if it works etc). This is why I always include database backup of
model in my backups schedules.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:45264804.8030302@.realsqlguy.com...
> See responses in-line...
>
> ina wrote:
>> Hello guys,
>> I would like to know if someone can advice me on that.
>> I have A MyDB more system DB (master, msdb, model, tempdb)
>> I would like to set up a Backup plan.
>> I would like to:
>> * Backup daily MyDB and system DB
> No need to backup TEMPDB or MODEL, unless you have modified MODEL.
>> * Backup LOG MyDB every one hours
> This depends on your needs and tolerance for risk. You could *potentially* lose an hour's worth
> of data, is that an acceptable risk for you?
>> * Backup LOG System DB (every 4 hours).
> The only system DB that you can perform log backups on is MSDB, and this is probably unnecessary.
>> Any suggestion how to plan the better schedule time? 22h? 23h for
>> backup?
>> Ina
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com|||Thank you.
what I am doing now it is the full backup for MyDB at 11 PM and log
files this MyDB every hours between 2 AM until 10 PM
Is it fine?
Ina
Tibor Karaszi wrote:
> Hi Tracy,
> > No need to backup TEMPDB or MODEL, unless you have modified MODEL.
> What is model crashes? If you have a backup, you just restore that backup. If not, you have to
> rebuild the system databases (or do something unsupported like grabbing the files from another
> system and worry about collations, if it works etc). This is why I always include database backup of
> model in my backups schedules.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:45264804.8030302@.realsqlguy.com...
> > See responses in-line...
> >
> >
> > ina wrote:
> >> Hello guys,
> >>
> >> I would like to know if someone can advice me on that.
> >>
> >> I have A MyDB more system DB (master, msdb, model, tempdb)
> >> I would like to set up a Backup plan.
> >> I would like to:
> >> * Backup daily MyDB and system DB
> >
> > No need to backup TEMPDB or MODEL, unless you have modified MODEL.
> >
> >> * Backup LOG MyDB every one hours
> >
> > This depends on your needs and tolerance for risk. You could *potentially* lose an hour's worth
> > of data, is that an acceptable risk for you?
> >
> >> * Backup LOG System DB (every 4 hours).
> >
> > The only system DB that you can perform log backups on is MSDB, and this is probably unnecessary.
> >
> >>
> >> Any suggestion how to plan the better schedule time? 22h? 23h for
> >> backup?
> >>
> >> Ina
> >>
> >
> >
> > --
> > Tracy McKibben
> > MCDBA
> > http://www.realsqlguy.com|||> what I am doing now it is the full backup for MyDB at 11 PM and log
> files this MyDB every hours between 2 AM until 10 PM
I assume you mean "transaction log backup every hour between 2AB and 10PM".
> Is it fine?
We cannot answer that question. You have to determine that max amount of data loss you accept in
case of some catastrophe and based on that determine what types of backup and frequency. Also, you
didn't mention what backup you do if the system databases.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ina" <roberta.inalbon@.gmail.com> wrote in message
news:1160222216.686213.118770@.e3g2000cwe.googlegroups.com...
> Thank you.
> what I am doing now it is the full backup for MyDB at 11 PM and log
> files this MyDB every hours between 2 AM until 10 PM
> Is it fine?
> Ina
> Tibor Karaszi wrote:
>> Hi Tracy,
>> > No need to backup TEMPDB or MODEL, unless you have modified MODEL.
>> What is model crashes? If you have a backup, you just restore that backup. If not, you have to
>> rebuild the system databases (or do something unsupported like grabbing the files from another
>> system and worry about collations, if it works etc). This is why I always include database backup
>> of
>> model in my backups schedules.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:45264804.8030302@.realsqlguy.com...
>> > See responses in-line...
>> >
>> >
>> > ina wrote:
>> >> Hello guys,
>> >>
>> >> I would like to know if someone can advice me on that.
>> >>
>> >> I have A MyDB more system DB (master, msdb, model, tempdb)
>> >> I would like to set up a Backup plan.
>> >> I would like to:
>> >> * Backup daily MyDB and system DB
>> >
>> > No need to backup TEMPDB or MODEL, unless you have modified MODEL.
>> >
>> >> * Backup LOG MyDB every one hours
>> >
>> > This depends on your needs and tolerance for risk. You could *potentially* lose an hour's
>> > worth
>> > of data, is that an acceptable risk for you?
>> >
>> >> * Backup LOG System DB (every 4 hours).
>> >
>> > The only system DB that you can perform log backups on is MSDB, and this is probably
>> > unnecessary.
>> >
>> >>
>> >> Any suggestion how to plan the better schedule time? 22h? 23h for
>> >> backup?
>> >>
>> >> Ina
>> >>
>> >
>> >
>> > --
>> > Tracy McKibben
>> > MCDBA
>> > http://www.realsqlguy.com
>|||Thanks Tibor,
My DB is organize like this everyday I backup Master, Model and Msdb
and every hours a back up the log of Mdsb
For my MyDB is the same backup everyday and backup log every hours.
One question when I change the schedule of the backup (i.e MyDB log
backup) do you thing is better to change backup file or device or it
is enough to change the schedule?
Ina
Tibor Karaszi wrote:
> > what I am doing now it is the full backup for MyDB at 11 PM and log
> > files this MyDB every hours between 2 AM until 10 PM
> I assume you mean "transaction log backup every hour between 2AB and 10PM".
>
> > Is it fine?
> We cannot answer that question. You have to determine that max amount of data loss you accept in
> case of some catastrophe and based on that determine what types of backup and frequency. Also, you
> didn't mention what backup you do if the system databases.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "ina" <roberta.inalbon@.gmail.com> wrote in message
> news:1160222216.686213.118770@.e3g2000cwe.googlegroups.com...
> > Thank you.
> >
> > what I am doing now it is the full backup for MyDB at 11 PM and log
> > files this MyDB every hours between 2 AM until 10 PM
> >
> > Is it fine?
> >
> > Ina
> > Tibor Karaszi wrote:
> >> Hi Tracy,
> >>
> >> > No need to backup TEMPDB or MODEL, unless you have modified MODEL.
> >>
> >> What is model crashes? If you have a backup, you just restore that backup. If not, you have to
> >> rebuild the system databases (or do something unsupported like grabbing the files from another
> >> system and worry about collations, if it works etc). This is why I always include database backup
> >> of
> >> model in my backups schedules.
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >>
> >>
> >> "Tracy McKibben" <tracy@.realsqlguy.com> wrote in message news:45264804.8030302@.realsqlguy.com...
> >> > See responses in-line...
> >> >
> >> >
> >> > ina wrote:
> >> >> Hello guys,
> >> >>
> >> >> I would like to know if someone can advice me on that.
> >> >>
> >> >> I have A MyDB more system DB (master, msdb, model, tempdb)
> >> >> I would like to set up a Backup plan.
> >> >> I would like to:
> >> >> * Backup daily MyDB and system DB
> >> >
> >> > No need to backup TEMPDB or MODEL, unless you have modified MODEL.
> >> >
> >> >> * Backup LOG MyDB every one hours
> >> >
> >> > This depends on your needs and tolerance for risk. You could *potentially* lose an hour's
> >> > worth
> >> > of data, is that an acceptable risk for you?
> >> >
> >> >> * Backup LOG System DB (every 4 hours).
> >> >
> >> > The only system DB that you can perform log backups on is MSDB, and this is probably
> >> > unnecessary.
> >> >
> >> >>
> >> >> Any suggestion how to plan the better schedule time? 22h? 23h for
> >> >> backup?
> >> >>
> >> >> Ina
> >> >>
> >> >
> >> >
> >> > --
> >> > Tracy McKibben
> >> > MCDBA
> >> > http://www.realsqlguy.com
> >

Saturday, February 25, 2012

backup of database

Hi
I am new to sqlserver.
My question?
How frequently is recommended to take the backup of
model, master and msdb database.
Right now I am backing up only the user databases and transaction logs.
Please share your views.
Thanks
Mangesh
Daily backups should suffice.
Keith
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:AD73ECD8-C5AD-4DEB-944E-2A39502F6AA3@.microsoft.com...
> Hi
> I am new to sqlserver.
> My question?
> How frequently is recommended to take the backup of
> model, master and msdb database.
> Right now I am backing up only the user databases and transaction logs.
> Please share your views.
> Thanks
> Mangesh
|||The only requirement would be whenever there are modifications. As master
and model should not change frequently, very few backups are required;
usually only right after a system modification. However, this is sometimes
difficult to ascertain. So, we regularly run FULL database backups on a
nightly basis.
The msdb, however, and in contrast to the other two, is modified whenever
jobs are ran, which sould be daily. So, you might want to, at least, run a
FULL backup daily, and even a few DIFFERENTIALs throughout the day, if there
is a heavy load. Also, be aware, that the SQL Agent service will reset the
RECOVERY mode of msdb to SIMPLE whenever it is restarted. So, if you desire
to also perform meaningful transaction log backups, you would have to create
a startup job to reset the msdb back to FULL or BULK LOGGED RECOVERY.
Sincerely,
Anthony Thomas

"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:AD73ECD8-C5AD-4DEB-944E-2A39502F6AA3@.microsoft.com...
Hi
I am new to sqlserver.
My question?
How frequently is recommended to take the backup of
model, master and msdb database.
Right now I am backing up only the user databases and transaction logs.
Please share your views.
Thanks
Mangesh

backup of database

Hi
I am new to sqlserver.
My question?
How frequently is recommended to take the backup of
model, master and msdb database.
Right now I am backing up only the user databases and transaction logs.
Please share your views.
Thanks
MangeshDaily backups should suffice.
Keith
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:AD73ECD8-C5AD-4DEB-944E-2A39502F6AA3@.microsoft.com...
> Hi
> I am new to sqlserver.
> My question?
> How frequently is recommended to take the backup of
> model, master and msdb database.
> Right now I am backing up only the user databases and transaction logs.
> Please share your views.
> Thanks
> Mangesh|||The only requirement would be whenever there are modifications. As master
and model should not change frequently, very few backups are required;
usually only right after a system modification. However, this is sometimes
difficult to ascertain. So, we regularly run FULL database backups on a
nightly basis.
The msdb, however, and in contrast to the other two, is modified whenever
jobs are ran, which sould be daily. So, you might want to, at least, run a
FULL backup daily, and even a few DIFFERENTIALs throughout the day, if there
is a heavy load. Also, be aware, that the SQL Agent service will reset the
RECOVERY mode of msdb to SIMPLE whenever it is restarted. So, if you desire
to also perform meaningful transaction log backups, you would have to create
a startup job to reset the msdb back to FULL or BULK LOGGED RECOVERY.
Sincerely,
Anthony Thomas
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:AD73ECD8-C5AD-4DEB-944E-2A39502F6AA3@.microsoft.com...
Hi
I am new to sqlserver.
My question?
How frequently is recommended to take the backup of
model, master and msdb database.
Right now I am backing up only the user databases and transaction logs.
Please share your views.
Thanks
Mangesh

backup of database

Hi
I am new to sqlserver.
My question?
How frequently is recommended to take the backup of
model, master and msdb database.
Right now I am backing up only the user databases and transaction logs.
Please share your views.
Thanks
MangeshDaily backups should suffice.
--
Keith
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:AD73ECD8-C5AD-4DEB-944E-2A39502F6AA3@.microsoft.com...
> Hi
> I am new to sqlserver.
> My question?
> How frequently is recommended to take the backup of
> model, master and msdb database.
> Right now I am backing up only the user databases and transaction logs.
> Please share your views.
> Thanks
> Mangesh|||The only requirement would be whenever there are modifications. As master
and model should not change frequently, very few backups are required;
usually only right after a system modification. However, this is sometimes
difficult to ascertain. So, we regularly run FULL database backups on a
nightly basis.
The msdb, however, and in contrast to the other two, is modified whenever
jobs are ran, which sould be daily. So, you might want to, at least, run a
FULL backup daily, and even a few DIFFERENTIALs throughout the day, if there
is a heavy load. Also, be aware, that the SQL Agent service will reset the
RECOVERY mode of msdb to SIMPLE whenever it is restarted. So, if you desire
to also perform meaningful transaction log backups, you would have to create
a startup job to reset the msdb back to FULL or BULK LOGGED RECOVERY.
Sincerely,
Anthony Thomas
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:AD73ECD8-C5AD-4DEB-944E-2A39502F6AA3@.microsoft.com...
Hi
I am new to sqlserver.
My question?
How frequently is recommended to take the backup of
model, master and msdb database.
Right now I am backing up only the user databases and transaction logs.
Please share your views.
Thanks
Mangesh

Friday, February 24, 2012

BackUp master log failed

Hi,
Any one !
I can not create the backup of the master db log.
Is there a restriction on master db log?
thanks in advance
Ed
The master database transaction log, as most system databases, is set to
Simple recovery mode. This negates the ability (or need) to backup the
transaction log.
Jim
"Edward" <Edward@.discussions.microsoft.com> wrote in message
news:898FCAD2-830F-4B79-9E56-5FAFEB3F7320@.microsoft.com...
> Hi,
> Any one !
> I can not create the backup of the master db log.
> Is there a restriction on master db log?
>
> thanks in advance
> Ed

Backup Master key, Cannot write into file 'c:\temp\master'. Verify that you have write permiss

Hi,

I tried to backup the master key by the following syntax :

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'mypassword'

BACKUP MASTER KEY TO FILE = 'c:\temp\master' ENCRYPTION BY PASSWORD = 'mypassword'

but it failed and i got the following message:

Cannot write into file 'c:\temp\master'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.

NB: I am using the "sa" user to execute this command.

I know that we have a security permission issue , but where and how ?

Regards,

Tarek Ghazali

SQL Server MVP

In this case the permissions check are done by Windows to verify that the SQL Server service account has access to create the file. Most likely you are running SQL Server using a low privileged domain account (which is highly recommended). To check the name of the service account being used, you can use SQL Server Configuration Manager (SCM).

Rather than granting permissions directly to this service account on local Windows resources, you can grant the permissions to the corresponding Windows group that SQL Server 2005 setup created for you. You can find the name of this group in the local users and groups management tool in Windows (Computer Management tool).

The name for the SQL Server 2005 groups should be based on the following pattern:

SQLServer2005MSSQLUser$<<Server_name>>$<<Instance_name >>

For example: SQLServer2005MSSQLUser$MY_SERVER$MSSQLSERVER

Once you have found the name for the service account group, you can grant the proper permissions on Windows resources (such as write permissions on folders or read permissions on files you need to import).

I hope this information will help you,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Hi Raul,

first Thanks for your reply.

I tried that also but it didn't work,

Any other idea ?

Thanks,

Tarek Ghazali

SQL Server MVP

Web site: www.sqlmvp.com

|||

I forgot another reason why backup may fail: the backup operations for keys won’t replace any files, make sure the file name is unique. Let me know if changing the name of the file worked.

BTW. If you create backups of your master keys on a regular schedule and regenerate the keys (which is highly recommended), it is a good idea to keep an archive of your old keys (protected in a safe place) in case you need to access data from some old backup.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

Backup Master key, Cannot write into file 'c:\temp\master'. Verify that you have write per

Hi,

I tried to backup the master key by the following syntax :

OPEN MASTER KEY DECRYPTION BY PASSWORD = 'mypassword'

BACKUP MASTER KEY TO FILE = 'c:\temp\master' ENCRYPTION BY PASSWORD = 'mypassword'

but it failed and i got the following message:

Cannot write into file 'c:\temp\master'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.

NB: I am using the "sa" user to execute this command.

I know that we have a security permission issue , but where and how ?

Regards,

Tarek Ghazali

SQL Server MVP

In this case the permissions check are done by Windows to verify that the SQL Server service account has access to create the file. Most likely you are running SQL Server using a low privileged domain account (which is highly recommended). To check the name of the service account being used, you can use SQL Server Configuration Manager (SCM).

Rather than granting permissions directly to this service account on local Windows resources, you can grant the permissions to the corresponding Windows group that SQL Server 2005 setup created for you. You can find the name of this group in the local users and groups management tool in Windows (Computer Management tool).

The name for the SQL Server 2005 groups should be based on the following pattern:

SQLServer2005MSSQLUser$<<Server_name>>$<<Instance_name >>

For example: SQLServer2005MSSQLUser$MY_SERVER$MSSQLSERVER

Once you have found the name for the service account group, you can grant the proper permissions on Windows resources (such as write permissions on folders or read permissions on files you need to import).

I hope this information will help you,

-Raul Garcia

SDE/T

SQL Server Engine

|||

Hi Raul,

first Thanks for your reply.

I tried that also but it didn't work,

Any other idea ?

Thanks,

Tarek Ghazali

SQL Server MVP

Web site: www.sqlmvp.com

|||

I forgot another reason why backup may fail: the backup operations for keys won’t replace any files, make sure the file name is unique. Let me know if changing the name of the file worked.

BTW. If you create backups of your master keys on a regular schedule and regenerate the keys (which is highly recommended), it is a good idea to keep an archive of your old keys (protected in a safe place) in case you need to access data from some old backup.

Thanks,

-Raul Garcia

SDE/T

SQL Server Engine

Backup master database

Hi,
Is there a need to backup the master database with my other databases?
Hagay.Absolutely..
Backup Master every day... Master contains the logins, info about the other
databases and the system configuration...
--
Wayne Snyder, MCDBA, SQL Server MVP
Computer Education Services Corporation (CESC), Charlotte, NC
www.computeredservices.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Hagay Lupesko" <hagayl@.nice.com> wrote in message
news:e92o8wzhDHA.336@.tk2msftngp13.phx.gbl...
> Hi,
> Is there a need to backup the master database with my other databases?
> Hagay.
>|||Hagay
It is a very good idea to backup your master database. It
should be done on a regular basis. Daily usually as it is
very small and in most cases will only take seconds to
perform. (You do not usually need transaction logs from
your master database, most people run it in simple
recovery mode)
I prefer to keep my system database backups seperate from
my user databases, but you don't need to.
It is also a good idea to backup your master database
before making changes to other databases, configurationand
anything else that may effect any of the databases on your
server.
Hope this helps.
John

Sunday, February 12, 2012

Backup job

Looks like the job was created on a Master server. The job definition
cannot be altered on a Target server. You'll need to alter the job
definition on the Master server.
HTH
Jerry
"docsql" <docsql@.noemail.nospam> wrote in message
news:OKbfef7vFHA.3256@.TK2MSFTNGP09.phx.gbl...
> Trung to modify a db backup job. I get the following message.
>
>Hi
Or the computer was re-named and the name does not agree to what is in the
master database.
Then follow the following KB article to fix the entry in master:
http://support.microsoft.com/defaul...Ben-us%3B303774
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:OpQR4i7vFHA.2072@.TK2MSFTNGP14.phx.gbl...
> Looks like the job was created on a Master server. The job definition
> cannot be altered on a Target server. You'll need to alter the job
> definition on the Master server.
> HTH
> Jerry
> "docsql" <docsql@.noemail.nospam> wrote in message
> news:OKbfef7vFHA.3256@.TK2MSFTNGP09.phx.gbl...
>|||Hi,
After the Windows server name been changed, when trying to update or delete
the jobs previously created in a SQL Server 2000 instance, we may receive
this error message.
Additionally to MVP's Knowledge Base article, you may also refer the KB
below
PRB: Error 14274 Occurs When You Update a SQL Agent Job After Renaming
Windows Server
http://support.microsoft.com/kb/281642/en-us
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

Friday, February 10, 2012

backup files

Hello,
Could someone tell me which files i definitly need to backup in sql server
2000. I know i need to backup the master.mdf, but do i also need the
master.trn? If so, why.
Greetings,
Zeke
First off you should not backup at the file level as the resulting backup
may not be transactionally consistent or useable to restore. There is a
backup command in SQL Server that you use to produce a file(s). Check out
the BACKUP and RESTORE commands in BooksOnLine for more information. This
may be useful as well:
http://www.microsoft.com/technet/pro...n/sqlops0.mspx
Andrew J. Kelly SQL MVP
"Ezekil" <ezekiel@.lycos.nl> wrote in message
news:u7cPkz7bEHA.2972@.TK2MSFTNGP12.phx.gbl...
> Hello,
> Could someone tell me which files i definitly need to backup in sql server
> 2000. I know i need to backup the master.mdf, but do i also need the
> master.trn? If so, why.
> Greetings,
> Zeke
>

backup files

Hello,
Could someone tell me which files i definitly need to backup in sql server
2000. I know i need to backup the master.mdf, but do i also need the
master.trn? If so, why.
Greetings,
ZekeFirst off you should not backup at the file level as the resulting backup
may not be transactionally consistent or useable to restore. There is a
backup command in SQL Server that you use to produce a file(s). Check out
the BACKUP and RESTORE commands in BooksOnLine for more information. This
may be useful as well:
http://www.microsoft.com/technet/pr...in/sqlops0.mspx
Andrew J. Kelly SQL MVP
"Ezekil" <ezekiel@.lycos.nl> wrote in message
news:u7cPkz7bEHA.2972@.TK2MSFTNGP12.phx.gbl...
> Hello,
> Could someone tell me which files i definitly need to backup in sql server
> 2000. I know i need to backup the master.mdf, but do i also need the
> master.trn? If so, why.
> Greetings,
> Zeke
>

backup files

Hello,
Could someone tell me which files i definitly need to backup in sql server
2000. I know i need to backup the master.mdf, but do i also need the
master.trn? If so, why.
Greetings,
ZekeFirst off you should not backup at the file level as the resulting backup
may not be transactionally consistent or useable to restore. There is a
backup command in SQL Server that you use to produce a file(s). Check out
the BACKUP and RESTORE commands in BooksOnLine for more information. This
may be useful as well:
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/sqlops0.mspx
Andrew J. Kelly SQL MVP
"Ezekiël" <ezekiel@.lycos.nl> wrote in message
news:u7cPkz7bEHA.2972@.TK2MSFTNGP12.phx.gbl...
> Hello,
> Could someone tell me which files i definitly need to backup in sql server
> 2000. I know i need to backup the master.mdf, but do i also need the
> master.trn? If so, why.
> Greetings,
> Zeke
>