Showing posts with label bol. Show all posts
Showing posts with label bol. Show all posts

Sunday, March 25, 2012

Database Mirroring Setup Document.

Hi:

I am looking for a Step-by-Step document for setting up and configuring of database mirroring if one is available. I have gone through BOL and found some related documentation but want to see if a step-by-step document is available. If so can any one please direct me to the resource.

Thank you

AK

Please look at the How-to section in the BOL.

http://msdn2.microsoft.com/en-us/library/ms175059.aspx

Database Mirroring and Log Shipping

Hello All Database Mirroring Experts,

I'm interested in how Combining Log Shipping and Database Mirroring works when failover occurs.
From SQL BOL, it says:

"Topic: Database Mirroring and Log Shipping
...
To run in high-safety mode with automatic failover the mirroring

session is configured with an additional server instance known as the witness.

If the principal database is lost for any reason after the database is

synchronized and if the mirror server and witness can still communicate

with each other, automatic failover occurs. An automatic failover

causes mirror server to assume the principal role and bring its

database online as the principal database. For more information, see Automatic Failover

[ http://msdn2.microsoft.com/en-us/library/ms189590.aspx ] . If the log

shipping backup location is accessible to the new principal/primary

server, its backup jobs begin to ship log backups to that location. The

database mirroring synchronous mode guarantees that the log chain is

unaffected by a mirroring failover and that only valid log is restored.

The secondary servers continue to copy log backups without knowing that

a different server instance has become the primary server.
..."
Source: http://msdn2.microsoft.com/en-us/library/ms187016(d=printer).aspx

Could anyone tell me that how the database mirroring synchronous mode guarantees that the log chain is

unaffected by a mirroring failover and that only valid log is restored?

Let me elaborate the situation (if anything I said is incorrect, please correct me )
Here is the time line of the failover happens:

- tn-1 - tn - tf -- tn+1 > t

-> t: the time line.
tn: the moment that the log shipping backup job and copy job is done for the transaction log obtained between the time interval tn-1 and tn.
tf: the moment that mirroring failover occurs in the database mirroring session.
the time interval between each tn and tn-1 are constant, say h seconds, for all n are positive integers.

Here is the question that I want to ask:
In database mirroring synchronous mode, it guarantees that all the committed transaction from the moment tn to tf is copied to the mirror database. All the transaction log backup for log shipping are done on the original principal before the moment tf. After the mirroring failover occurs at the moment tf, how the log shipping mechanism guarantees that the transaction log between the interval tn and tn+1 that can be unaffected by a mirroring failover?
That's the point that I interested in.

Thanks a lot,
Terence

Hi Terence,

The key point to consider in the above scenario is the fact that the principal and mirror which participate in the mirroring relationship collaborate to similulate a single database which has had no failure. Starting from that observation, if there is a failover to the mirror, the next log backup will still capture all the transactions that have not yet been backed up on the principal, preserving the log chain. In your example above, the next transaction log backup from the mirror will contain all the log records past point tn.

Regards,

Matt Hollingsworth

Sr. Program Manager

Microsoft SQL Server

|||Hi Matt,

Thanks a lot for your information.
It helps me a lot to understand Database Mirroring and Log Shipping. : )

Regards,
Terence

Database Mirroring and Log Shipping

Hello All Database Mirroring Experts,

I'm interested in how Combining Log Shipping and Database Mirroring works when failover occurs.
From SQL BOL, it says:

"Topic: Database Mirroring and Log Shipping
...
To run in high-safety mode with automatic failover the mirroring

session is configured with an additional server instance known as the witness.

If the principal database is lost for any reason after the database is

synchronized and if the mirror server and witness can still communicate

with each other, automatic failover occurs. An automatic failover

causes mirror server to assume the principal role and bring its

database online as the principal database. For more information, see Automatic Failover

[ http://msdn2.microsoft.com/en-us/library/ms189590.aspx ] . If the log

shipping backup location is accessible to the new principal/primary

server, its backup jobs begin to ship log backups to that location. The

database mirroring synchronous mode guarantees that the log chain is

unaffected by a mirroring failover and that only valid log is restored.

The secondary servers continue to copy log backups without knowing that

a different server instance has become the primary server.
..."
Source: http://msdn2.microsoft.com/en-us/library/ms187016(d=printer).aspx

Could anyone tell me that how the database mirroring synchronous mode guarantees that the log chain is

unaffected by a mirroring failover and that only valid log is restored?

Let me elaborate the situation (if anything I said is incorrect, please correct me )
Here is the time line of the failover happens:

- tn-1 - tn - tf -- tn+1 > t

-> t: the time line.
tn: the moment that the log shipping backup job and copy job is done for the transaction log obtained between the time interval tn-1 and tn.
tf: the moment that mirroring failover occurs in the database mirroring session.
the time interval between each tn and tn-1 are constant, say h seconds, for all n are positive integers.

Here is the question that I want to ask:
In database mirroring synchronous mode, it guarantees that all the committed transaction from the moment tn to tf is copied to the mirror database. All the transaction log backup for log shipping are done on the original principal before the moment tf. After the mirroring failover occurs at the moment tf, how the log shipping mechanism guarantees that the transaction log between the interval tn and tn+1 that can be unaffected by a mirroring failover?
That's the point that I interested in.

Thanks a lot,
Terence

Hi Terence,

The key point to consider in the above scenario is the fact that the principal and mirror which participate in the mirroring relationship collaborate to similulate a single database which has had no failure. Starting from that observation, if there is a failover to the mirror, the next log backup will still capture all the transactions that have not yet been backed up on the principal, preserving the log chain. In your example above, the next transaction log backup from the mirror will contain all the log records past point tn.

Regards,

Matt Hollingsworth

Sr. Program Manager

Microsoft SQL Server

|||Hi Matt,

Thanks a lot for your information.
It helps me a lot to understand Database Mirroring and Log Shipping. : )

Regards,
Terence

Thursday, March 22, 2012

Database Mirroring

Hi All,
Does anybody know the OS requirements for Database Mirroring? I checked BOL and Google but couldn't find any info on that.
Thanks.http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirfaq.mspx

Q.What are the different licenses available for mirroring?
A.The witness can be any edition of Microsoft SQL Server 2005.
If a partner uses the SQL Server 2005 Standard Edition, the safety must be FULL, and REDO is single-threaded.
In SQL Server 2005 Enterprise Edition, the feature is fully implemented, and lets you turn the safety OFF and have REDO multithreaded.

SQL Server 2005 Std is supported on:
Microsoft Windows 2000 Server with Service Pack (SP) 4 or later; Windows 2000 Professional Edition with SP 4 or later; Windows XP with SP 2 or later; Windows Server 2003 Enterprise Edition, Standard Edition, or Datacenter Edition with SP 1 or later; Windows Small Business Server 2003 with SP 1 or later
http://www.microsoft.com/sql/editions/standard/sysreqs.mspx

SQL Server 2005 Enterprise is supported on:
Microsoft Windows 2000 Server with Service Pack (SP) 4 or later; Windows Server 2003 Standard Edition, Enterprise Edition, or Datacenter Edition with SP 1 or later; Windows Small Business Server 2003 with SP 1 or later
http://www.microsoft.com/sql/editions/enterprise/sysreqs.mspx

-a|||Do the OS requirements change based on the database high availability option you select?|||Don't be lazy, read the links I posted. The answers are in there.|||Thanks for the info.|||No problem :)

Friday, February 24, 2012

Database Mail definition - confusing

Hello,
>From BOL:
For improved security, Database Mail manages access to mail profiles. A
profile may be public or private. Public profiles are available for all
members of the DatabaseMailUserRole database role in the msdb database.
They allow all members of the DatabaseMailUserRole role to send e-mail
using the profile.
To use a private profile, sysadmin must grant users permission to use
the profile. In addition, execute permission on the sp_send_dbmail
stored procedure is only granted to members of the
DatabaseMailUserRole. A system administrator must add the user to the
DatabaseMailUserRole database role in order for the user to send
e-mails.
What's confusing that that DatabaseMailUserRole is a PUBLIC role.
However, if you create a private profile, it says you must add the user
to the DatabaseMailUserRole in order for the user to send emails. That
would make the any member of this role a public profile?
I guess I am confused about the language here, so in effect I have no
clue what the end result of adding a user from a PRIVATE profile into a
role that is available for PUBLIC profiles.Hi
If I have interpreted your interpretation right, I think there is some
confusion between a role which is not a fixed database role, and the public
database role.
John
"tootsuite@.gmail.com" wrote:
> Hello,
> >From BOL:
> For improved security, Database Mail manages access to mail profiles. A
> profile may be public or private. Public profiles are available for all
> members of the DatabaseMailUserRole database role in the msdb database.
> They allow all members of the DatabaseMailUserRole role to send e-mail
> using the profile.
> To use a private profile, sysadmin must grant users permission to use
> the profile. In addition, execute permission on the sp_send_dbmail
> stored procedure is only granted to members of the
> DatabaseMailUserRole. A system administrator must add the user to the
> DatabaseMailUserRole database role in order for the user to send
> e-mails.
> What's confusing that that DatabaseMailUserRole is a PUBLIC role.
> However, if you create a private profile, it says you must add the user
> to the DatabaseMailUserRole in order for the user to send emails. That
> would make the any member of this role a public profile?
> I guess I am confused about the language here, so in effect I have no
> clue what the end result of adding a user from a PRIVATE profile into a
> role that is available for PUBLIC profiles.
>

Sunday, February 19, 2012

Database Mail - Command not Supported error

Hi All,

I am trying to get Database mail running on SQL 2005. I have, very carefully, followed all the steps in BOL, and the Improved steps suggested in other posts on this forum (in particular
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=109885&SiteID=1
).

However when I try to send mail I get the error:

The mail could not be sent to the recipients because of the mail server failure.
(Sending Mail using Account 2 (2006-02-20T10:55:30).
Exception Message: Cannot send mails to mail server.
(Command not implemented. The server response was: Command not Supported).
)

Searching through other forums it appears that this is an SMTP issue of some sort:

(http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=112971&SiteID=1)

Anyone else seen this?

Unfortunately I didn't set up the server, so there may be required Windows components missing. When I first saw the error and tried to go through the steps in link 1 above, I discovered that SMTP was not on the box(!). It is up and running now, but I wonder if there is anything else missing.

Thanks, as always,

Richard R.

Richard,

I'm moving your thread to the Tools General forum. Hopefully they'll be able to answer.