Thursday, August 1, 2013

Configure Mirorring on SQL 2008 R2

Principal and Mirror are need to be running same version of SQL Server.
Run ALL SQL Server instances with the same domain account.
Run ALL SQL services with the same domain account.
Ensure that TCP/IP was enabled as a protocol on ALL SQL Server.
Start the SQL Browser Service on ALL SQL Servers.
Ensure that Database on Principle Server is in full recovery model.
On Principal Server Perform a Full backup Transaction Log.
Use the backup file to restore database on Mirror Server with NORECOVERY Option.
Configure Security as below:
1-      Right-click the database, select “Tasks->Mirror…”

2- Click “Configure Security”

3- Click Next

4- Select "Yes" if you need a witness server to configure automatic failover and “No” and Click Next. if this case we will select "No"

5- Click Next

6- Set up the Principal first.

7- Connect to the Mirror Server by the domain account.

8- Type the Service Account that run SQL Instance

9- Click Finish

10- Must see status “Success”

11- Click “Start Mirroring”

AX 2012 - Reports deployment failed


The deployment was aborted. You do not have privileges to deploy to server: bwircadbridge. For deployment, you must have administrative rights to the SQL Server Reporting Services (SSRS) server. Contact your administrator to deploy.



Solution:
Start the "Remote Registry" service

Restore Ax 2012 demo data

After restoring the demo data in SQL 2008 R2, run the below script:

DECLARE @NetworkDomain nvarchar(255);

DECLARE @NetworkAlias nvarchar(80);

DECLARE @SID nvarchar(124);

DECLARE @InitialPartition bigint;

select @InitialPartition=Recid from PARTITIONS where PARTITIONKEY=N'Initial'

select @NetworkAlias=NETWORKALIAS,@NetworkDomain=NETWORKDOMAIN,@SID=SID from

USERINFO where PARTITION=@InitialPartition AND ID = N'Admin'

UPDATE USERINFO SET

NETWORKDOMAIN=@NetworkDomain,NETWORKALIAS=@NetworkAlias,SID=@SID WHERE

PARTITION != @InitialPartition AND ID = N'Admin'