Sunday, October 30, 2011

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

While installing MS CRM 2011, i faced this issue.
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"

While installing MS CRM 2011, i faced this issue.

to resolve this just check the followings
goto All Programs -> Configuration Tools -> SQL Server Configuration Manager

1. make sure u r using the server name instead IP

2. make sure all the services are running as in the image



3. Also make sure the things are enabled as in the images as below....


Then try to install ms crm and connect to DB. It should connect now.

hope this will help.

Sunday, October 16, 2011

get the picklist string and index values by query in ms cmr 2011

some times we need to write sql queries in ms crm for fetching values from ms crm database.
so if we need the picklist values( string values), we need to fetch a different table than the entity table.
crm stores all in StringMap table

Get objecttypecode:-

SELECT * 

FROM StringMap INNER JOIN MetadataSchema.Entity ON StringMap.ObjectTypeCode = MetadataSchema.Entity.ObjectTypeCode

where StringMap.AttributeName Like @attribute

get value:-

SELECT  Value as Status
FROM @entity e
LEFT JOIN StringMap ON
@attribute = AttributeValue AND
ObjectTypeCode = @objecttypecode AND AttributeName = @attribute


hope this helps anyone in any corner...

Tuesday, October 4, 2011

new concept security role and team in ms crm 2011

we all know that team is a good concept in ms crm 2011.
suppose you have cerated one user and trying to log in, with out assigning any security roles, you will get the error as in image.

suppose you did not assign any security role, but the user is under any team where the team has asiigned a security role, then the error will not come.
so the role will be inherited form the team.

but think a scenario where, the user is assigned a security role and also in a team where the team is also assigned a security role.in this scenario which will reflect for the user?
here the security role in the user level assigned will reflect.

if any one has any observations please put here.