Wednesday, 28 October 2015

.NET 3.5 Installation failed on Windows Server 2012 R2

.NET 3.5 Installation failed on Windows Server 2012 R2 because the server configured to use WSUS instead of Windows update service.

Try the below steps to install .NET3.5
1. Goto group policy (run->gpedit.msc)
2. Navigate Computer Configuration ->Administrative Templates ->System
3. Enable Specify settings for optional component installation and computer repair.
4. Select "Conatct Windows Update directly to download repair content instead of WSUS.
5. Now try the .Net 3.5 install from Add Roles and Features Wizard.

Ref : https://support.microsoft.com/en-us/kb/2734782

Tuesday, 20 October 2015

Microsoft Dynamics GP - An error occurred while using the BCP utility -- data was not correctly copied to the server

Below error will occur when you run GP utilities for first time.

An error occurred while using the BCP utility -- data was not correctly copied to the server

Run GP utilities as Administrator, you will be able to open it.

Ref : https://support.microsoft.com/en-us/kb/869315

Monday, 5 October 2015

Log Shipping Copy failed due to compromise security

All of sudden Log shipping copy job failing with below error
"The system detected a possible attempt to compromise security. Please ensure that you can contact the server that authenticated you."

To resolve this issue configure the firewall - TCP port 88 and UDP port 88 are not blocked for either domain.

There is a article in MS - http://support.microsoft.com/kb/938457 explaining this error will occur when you are dealing with multi domain. 

Make sure SQL Agent services restarted after the change.

Microsoft Dynamics GP:save operation on table 'sy_users_MSTR' (45) - fix

Usually the below error will occur when you move GP database from one server to another.

"save operation on table 'sy_users_MSTR' (45)"

To fix the issue, as per Microsoft the GP databases owner should be "DYNSA" not sa or any other user.

Ref : https://support.microsoft.com/en-us/kb/860468

Wednesday, 19 August 2015

Copy Folder Structure from one server to other using Robocopy

C:\Windows\System32>Robocopy.exe "source" "destination" /e /xf *
Switch /e will copy empty directories and /xf * will exclude files.

To exclude certain files, such as txt files then you could do
C:\Windows\System32>Robocopy.exe "source" "destination" /e /xf *.txt

Thursday, 12 February 2015

SQL Server Audit

How to capture SQL database activities using SQL Audit.

<This functionality is not available in SQL Standard Edition>

-> Create Server level Audit.

EXEC sp_MSForEachDB 'If ''?'' not in ( ''master'',''msdb'',''model'',''tempdb'')
Begin
CREATE SERVER AUDIT [Audit-?]
TO FILE
( FILEPATH = N''I:\Test''
  ,MAXSIZE = 0 MB
  ,MAX_ROLLOVER_FILES = 2147483647
  ,RESERVE_DISK_SPACE = OFF
)
WITH
( QUEUE_DELAY = 1000
,ON_FAILURE = CONTINUE);
ALTER SERVER AUDIT [Audit-?] WITH (STATE = ON)
END'

-> Create Database Audit Specification.

EXEC sp_MSForEachDB 'If ''?''  not in ( ''master'',''msdb'',''model'',''tempdb'')
Begin
USE [?];
CREATE DATABASE AUDIT SPECIFICATION [DatabaseAuditSpecification-?]
FOR SERVER AUDIT [Audit-?]
ADD (DELETE ON DATABASE::[?] BY [public]),
ADD (EXECUTE ON DATABASE::[?] BY [public]),
ADD (INSERT ON DATABASE::[?] BY [public]),
ADD (SELECT ON DATABASE::[?] BY [public]),
ADD (UPDATE ON DATABASE::[?] BY [public]);
ALTER DATABASE AUDIT SPECIFICATION [DatabaseAuditSpecification-?]
WITH (STATE = ON)
End'

-> To read the Audit file.
SELECT * FROM sys.fn_get_audit_file ('I:\test\<filename>.sqlaudit',default,default);
GO

Monday, 9 December 2013

Unable to connect SSIS from remote

Access Denied while connecting SSIS from remote.

Error:
------------------------------------------------
Cannot connect to TESTSERVER1.
------------------------------------------------
Connecting to the Integration Services service on the computer "TESTSERVER1" failed with the following error: "Access is denied".
This error occurs when the computer has not been configured to allow remote connections through DCOM, or the user does not have permission to access the SQL Server Integration Services service through DCOM.
------------------------------
-----------------

To fix this error and connect the SSIS from remote, try below steps.

Add the user account to the Distributed COM Users group. To do this, follow these steps:
  1. Click Start, click Run, type lusrmgr.msc, and then click OK.
  2. In the Local Users and Groups dialog box, click Groups, and then double-click Distributed COM Users.
  3. In the Distributed COM Users Properties dialog box, click Add.
  4. In the Select Users dialog box, type the user name under Enter the object names to select, and then click OK two times. 
  Grant the appropriate permissions for the MsDtsServer DCOM application. To do this, follow these steps:
  1. Click Start, click Run, type dcomcnfg, and then click OK.
  2. In the Component Services dialog box, expand Component Services, expand Computers, and then expand My Computer.
  3. Expand DCOM Config, right-click the MsDtsServer object, and then click Properties.
  4. In the MsDtsServer (SQL Server 2005) or MsDtsServer100 (SQL server 2008) Properties dialog box, click the Security tab.
  5. Under Launch and Activation Permissions, click Customize, and then click Edit.
  6. In the Launch Permission dialog box, click Add.
  7. In the Select Users or Groups dialog box, type the user name under Enter the object names to select, and then click OK.
  8. In the Launch Permission dialog box, click the user name under Group or user names.
  9. Under Permissions for UserName, click to select the Allow check box for the following permissions:
    • Local Launch
    • Remote Launch
    • Local Activation
    • Remote Activation
    Note UserName is a placeholder for the user name that you clicked in step h.
  10. Click OK.
  11. In the MsDtsServer (SQL Server 2005) or MsDtsServer100 (SQL server 2008) Properties dialog box, click Customize under Access Permissions, and then click Edit.
  12. In the Access Permission dialog box, click Add.
  13. In the Select Users or Groups dialog box, type the user name under Enter the object names to select, and then click OK.
  14. In the Access Permission dialog box, click the user name under Group or user names.
  15. Under Permissions for UserName, click to select the Allow check box for the following permissions:
    • Local Access
    • Remote Access
  16. Click OK two times.
 Restart the SQL Server Integration Services service.