Showing posts with label event. Show all posts
Showing posts with label event. Show all posts

Tuesday, March 27, 2012

DR Scenario

For High Protection mode (2servers, no witness, FULL safety), in the event of a catastrophic failure of the principal, can a remote (but well connected) mirror be forced to assume the principal role? The MS manual "Database Mirroring in SQL Server 2005" on p2 says the failover type for HP mode is manual only (as opposed to forced). Elsewhere it seems to seems suggest otherwise but there is no clear and unambiguous discussion describing the exact procedure.

Can anyone clarify this matter? Thanks,

Bud

Since posting this question I have found in the May 2007 SQL 2005 Books On Line a clear statement that the mirror server in the above scenario can be forced to the principal mode.

|||

Bud,

In high protection mode the failover is Manual. As no witness server is available automatic failover is ruled out. So the manual failover is done as follows,

1.either clicking the Failover button in the Database Properties/Mirroring dialog in SSMS or

2.ALTER DATABASE DBNAME SET PARTNER FAILOVER

once it is done the mirror server will become the principal server.

refer, http://sql-articles.com/articles/dbmrr.htm

|||

Bud

Just to add. Your statement stated that you can FORCE a failover. In High Protection you dont need to force a failover because the data is in sync. You only force a failover in High Performance mode using the

ALTER DATABASE <database> SET PARTNER FORCE_SERVICE_ALLOW_DATA_LOSS

because the data may not be in sync and you are accepting the loss.

DPE writing to Event Log

Has anyone had success getting a custom data processing extenstion to write
to the Event Log? Writing to the log works fine on my machine in the IDE but
once deployed to the server it fails. I'm assuming its a security issue but
I do not know how to resolve it.
Any help is greatly appreciated.Hi Shawn
Make sure that you've given the correct Code Access Security (CAS)
Permissions to your assembly. If you look up the EventLog.WriteEntry
method, it requires the EventLogPermission. To see how you can add
permission attributes to your custom assembly methods, see
http://msdn2.microsoft.com/en-us/library/ms153587.aspx.
Also, you may need to add extra security attributes to your
AssemblyInfo.cs/vb file. Please review the BOL for Reporting Services
or visit http://msdn2.microsoft.com/en-us/library/ms153561.aspx for
more details.
Regards,
Thiago Silva
MCAD.NET
Shawn wrote:
> Has anyone had success getting a custom data processing extenstion to write
> to the Event Log? Writing to the log works fine on my machine in the IDE but
> once deployed to the server it fails. I'm assuming its a security issue but
> I do not know how to resolve it.
> Any help is greatly appreciated.|||Thanks for the information. I have tried what was suggested and believe that
I am still missing something.
I added the following code group to my config file. As you can see it is
set to "FullTrust".
<CodeGroup class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="FOCUSCodeGroup"
Description="Code group for my data processing extension">
<IMembershipCondition class="UrlMembershipCondition"
version="1"
Url="D:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting
Services\ReportServer\bin\MyDataExtension.dll"/>
</CodeGroup>
I tried the following two approaches in my assembly:
1)--
EventLogPermission elp = new
EventLogPermission(System.Security.Permissions.PermissionState.Unrestricted);
elp.Assert();
elog.WriteEntry(loc + " -- " + msg, entryType);
2)--
EventLogPermission eventLogPermission = new
EventLogPermission(EventLogPermissionAccess.Administer, ".");
eventLogPermission.PermitOnly();
elog.WriteEntry(loc + " -- " + msg, entryType);
(#2 came from: http://support.microsoft.com/?kbid=918122)
During execution both prompted me for authentication when the exception was
thrown and never wrote to the event log. Any ideas as to what I could still
be missing?|||I was able to resolve the problem by first creating the EventSource on the
server itself. The problem was caused by the creation of the source... NOT
the writing to the log itself. Once the souce was create manually (in the
registry) I was able to write to the log successfully using the
configurations provided earlier. Thanks for the help.
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/49c3188dba8b7b00/b7240a0183af6cd9?lnk=st&q=asp.net+2.0+eventlog+permission&rnum=10#b7240a0183af6cd9