Windows 2016 (VM) - CRM 2016 OnPremisis
Windows 2016(VM) - SQL2014
I don't know where to start with this one!
After previous problems on my dev system with accessing reports, I ended up trashing the CRM and SQL and rebuilding them. Both built fine and I could access all areas of the 'default' CRM.
I imported the organization from the old dev CRM ( CRM2016) and tested all areas - all ok.
Now this is where I'm going around in circles. I have tried to apply a plugin which uses TSQL to query the organization database. This plugin was working fine on the 'trashed' CRM, and all I have done is point the datasource to the current datasource. This is the frustrating part. CRM can see and use the organization database, however when the plugin tries to make a connection I get ;
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)
I have tried the following;
1. All firewalls are down
2.Used the sa user for the connection
3. checked the SQL server is available (sqlcmd -L ) .. and its present.
4. Named Pipes and TCP/IP are enabled
5 SQL Logs don't appear to be showing any errors
My Plugin code
Dim SLQConnection As New SqlClient.SqlConnection("Data Source=xxxSQL;Initial Catalog=CRMProcessing;Persist Security Info=True;User ID=sa;password=xxxxxxxxx")
Dim SQLCommand As New SqlClient.SqlCommand
Dim SQLReader As SqlClient.SqlDataReader
Dim ReportNo As String = UCase(eentity.Attributes("new_bacsreportsid").ToString)
SQLCommand.CommandType = CommandType.StoredProcedure
SQLCommand.CommandText = "CRM_ARUDDProcessing_FM"
SQLCommand.Connection = SLQConnection
SLQConnection.Open()
SQLCommand.Parameters.Add("@PREXMLText", SqlDbType.VarChar).Value = Replace(XMLFile, "encoding =""utf-16""", "")
SQLReader = SQLCommand.ExecuteReader
I'm at a complete loss as where to look now. any assistance would be gratefully received ..I'm on my second day trying to work this out. Not sure if its a CRM or SQL issue.
*This post is locked for comments