Showing posts with label mirror. Show all posts
Showing posts with label mirror. Show all posts

Thursday, March 8, 2012

Backup CERTIFICATE Fails

I've problems with backing up the certificate (on the Witness Server). On principal and mirror, it works fine (Win 2003 Server, US English), but on my local PC (XP Prof, German) what i use as witness Server following backup command raises an error:

USE master;

CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'something$Strong123';

CREATE CERTIFICATE HOST_W_cert WITH SUBJECT = 'HOST_W certificate for database mirroring', START_DATE = '01/01/2006', EXPIRY_DATE = '12/31/2050';

BACKUP CERTIFICATE HOST_W_cert TO FILE = 'C:\HOST_W_cert.cer';

The error message is:

Msg 15240, Level 16, State 1, Line 1

Cannot write into file 'C:\HOST_W_cert.cer'. Verify that you have write permissions, that the file path is valid, and that the file does not already exist.

I connect to the database with a domain user what is a local admin on the witness server (my local user), so this couldn't be a permission reason. The file doesn't already exists, so that is not the problem.

What could it be?

Greetings, Torsten

Actually, yes, it is. The backup runs under the security context of the account that the SQL Server service is running under. If this account doesn't have access to the root of C, then the backup will fail.|||

I was not able to change the services' account, but i think you are right. I used another Win2003/ SQL2005 Instance as Witness and it works fine.

Thanks a lot,

Torsten

Friday, February 10, 2012

Backing up to mirror

I am looking at this syntax from Books-Online:
BACKUP DATABASE AdventureWorks
TO TAPE = '\\.\tape0'
MIRROR TO TAPE = '\\.\tape1'
MIRROR TO TAPE = '\\.\tape2'
MIRROR TO TAPE = '\\.\tape3'
WITH
FORMAT,
MEDIANAME = 'AdventureWorksSet0'
1. Am I right in thinking that this has nothing to do with database
mirroring? I've never done that either, but I've read that the mirror is
updated through transactions transferred from the database to the mirror, and
also that there can be only one mirror.
2. Can the MIRROR option be set up from the backup dialog screen, or only
through code like the above?> 1. Am I right in thinking that this has nothing to do with database
> mirroring?
Correct. The word mirror is overloaded and user in several independent contexts (just like
"snapshot", "schema" and "meta-data").
> 2. Can the MIRROR option be set up from the backup dialog screen, or only
> through code like the above?
I haven't found a way to do this through the GUI, so TSQL is the way to go.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Bev Kaufman" <BevKaufman@.discussions.microsoft.com> wrote in message
news:EFCC37AA-8F13-49D8-BB54-5C47E2DFA21F@.microsoft.com...
>I am looking at this syntax from Books-Online:
> BACKUP DATABASE AdventureWorks
> TO TAPE = '\\.\tape0'
> MIRROR TO TAPE = '\\.\tape1'
> MIRROR TO TAPE = '\\.\tape2'
> MIRROR TO TAPE = '\\.\tape3'
> WITH
> FORMAT,
> MEDIANAME = 'AdventureWorksSet0'
> 1. Am I right in thinking that this has nothing to do with database
> mirroring? I've never done that either, but I've read that the mirror is
> updated through transactions transferred from the database to the mirror, and
> also that there can be only one mirror.
> 2. Can the MIRROR option be set up from the backup dialog screen, or only
> through code like the above?