CRM Installation Error : Sql instance name must be the same as computer name

When the Sql server instance is differ from the machine name, this error will be given as a result of verification tasks under the system check of CRM installation. Most of the time this happens if the Sql server instance changes after the first installation and reinstallations.

CRM Installation Sql Error
CRM Installation Error

Anyhow this can be fixed easily as we can use few sql stored procedures. Follow the steps listed below.

Continue reading “CRM Installation Error : Sql instance name must be the same as computer name”

Advertisements

Create a Proxy in SQL Server Management Studio

Microsoft SQL Server Agent proxy accounts define a security context in which a job step can run.

To create a proxy account
1.In Object Explorer, expand a server.
2.Expand SQL Server Agent.
3.Right-click Proxies and select New Proxy.
4.On the General page of the New Proxy Account dialog, specify the proxy name, credential name, and description for the new proxy. Note that you must create a credential first before you create a proxy if one is not already available. For more information about creating a credential, see How to: Create a Credential (SQL Server Management Studio) or CREATE CREDENTIAL (Transact-SQL).
5.Check the appropriate subsystem for this proxy.
6.On the Principals page, add or remove logins or roles to grant or remove access to the proxy account.


Create a Credential in SQL Server Management Studio

A credential is required to connect from a outside resource to SQL Server. I needed to created a proxy to run an Integration Service and I wanted to create a credential for that.
MSDN says that a single credential can be mapped to multiple SQL Server logins and a SQL Server login can be mapped to only one credential. Only users with ALTER ANY CREDENTIAL permission can create or modify a credential.


1.In Object Explorer, expand Security, right-click Credentials, and then click New Credential.
2.In the New Credentials dialog box, in the Credential Name box, type a name for the credential.
3.In the Identity box, type the name of the account used for outgoing connections (when leaving the context of SQL Server). Typically, this will be a Windows user account. But the identity can be an account of another type.
4.In the Password and Confirm password boxes, type the password of the account specified in the Identity box. If Identity is a Windows user account, this is the Windows password. The Password can be blank, if no password is required.
5.Click OK.To create a credential

Create Log file and attach Data file in SQL Server

You can attach a SQL Server data file(.mdf) which has no log file(.ldf) associate with the data file.

Use the following SQL Query with the correct path of the data file. 

CREATE DATABASE MyDB
ON (FILENAME = ‘C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\MyDB_Data.mdf’)  — change the drive and file path
FOR ATTACH_REBUILD_LOG ;



	

Access to a SQL Server in some other Domain from SQL Server Management Studio

Senario in brief: My normal working domain is DomainA. But i have to connect to a sql server in DomainB. Administrators have given me remote desktop connection to the server which has sql server in DomainB but not to direct access from my SQL Server management studio.

Following is the solution.

runas /netonly /user:DomainB\sqladmin “C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe”

paste this infront of your command prompt and give the password for sqladmin user in SqlServer.
find the correct “Ssms.exe” path in your PC as “C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe” is in my PC.