Azure Devops SSIS Package Deployment - sql-server

We are trying to deploy an SSIS package via Azure devops to an on premise SQL server instance. I have done application deployment setups countless times but this is the first SQL on premise deployment we have tried using Azure devops. I have setup the azure agent and deployment groups etc
Is there a way to specify a different port for a SQL instance SSIS package deployment?
we are seeing the below error when trying to deploy a new package to a named SQL server that is running on a different port to the default 1433.
Failed to connect to server DB-DEVMT-01\INST01. A connection was
successfully established with the server, but then an error occurred
during the login process. (provider: SSL Provider, error: 0 - The
certificate chain was issued by an authority that is not trusted.)
In the logs, networks have found that connection is trying to go via 1433 but this obviously will not work so thinking if this can be specified in the agent job?
Or any other help with this error would be appreciated!
Thanks

Related

Azure Devops SSIS Deploy, cannot connect to on prem server

I have an SSIS project that I want to use Azure DevOps' CI/CD.
Using SSIS build for the build pipeline, it works.
I have created an agent, installed and configured in the desired on-prem server.
I create an SSIS Deploy for the release pipeline, using the agent.
But I am getting an error, that it cannot connect to the server.
Log snippet:
2023-01-24T03:18:22.0917377Z ------------------------------ispac to deploy---------------------------------
2023-01-24T03:18:22.0967049Z C:\azagent_work\r1\a[XXXX][XXXX][XXXX].ispac
2023-01-24T03:18:22.0977826Z ------------------------------------------------------------------------------
2023-01-24T03:18:22.1047463Z
2023-01-24T03:18:22.3707323Z ##[error]01/24/2023 03:18:22 Failed to connect to the SQL Server '[XXXX]': Failed to connect to server [XXXX].
2023-01-24T03:18:22.3720991Z ##[error]01/24/2023 03:18:22 Failed to connect to server [XXXX].
2023-01-24T03:18:22.3769044Z -----------------------------------Errors-------------------------------------
2023-01-24T03:18:22.3820946Z ##[error]Failed to connect to the SQL Server '[XXXX]': Failed to connect to server [XXXX].
2023-01-24T03:18:22.3823079Z
2023-01-24T03:18:22.3842653Z ##[error]Failed to connect to server [XXXX].
2023-01-24T03:18:22.3844585Z
2023-01-24T03:18:22.4537552Z ##[section]Finishing: Deploy SSIS
I can see the ispac file in the server & I can run it manually, but it seems it can't when via Azure Devops.
Appreciate any help... please.

Why do I get an error 22300 when adding a new linked service on Azure?

I am new to Azure. I am currently exploring Azure Synapse. I have a local SQL Server Express database on my laptop and I wanted to connect it as a data source on my Azure Synapse. I selected SQL Server:
Now when I tested the connection I get the following error:
The problem is I get a 22300 error:
Cannot connect to SQL Database: 'DESKTOP-xxxxxx\SQLEXPRESS', Database: 'David', User: 'Bidi'. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified), SqlErrorNumber=-1,Class=20,State=0,
Activity ID: eafe37de-fabf-43d6-914f-25e8685bb149.
I even tried enabling the port in the SQL configuration manager:
And I made a firewall rule to allow the port:
Unfortunately I still can't get the linked service on Synapse to connect to it.
Any help would be greatly appreciated.
You will need to install the Self-hosted integration runtime in your on-premises network, for example on the machine running SQL server:
A self-hosted IR is capable of:
Running copy activity between a cloud data stores and a data store in private network.
See the docs on how to install and configure the runtime .

SQL Connection from Azure Linux App Service web app

I have an asp net core web app and SQL Server database hosted in Plesk via a hosting company.
I have deployed a copy of the web app to an Azure Linux App Service. It uses the Plesk hosted SQL Server database. When i use the Azure App Service I get a connection error when accessing the Plesk hosted database.
SqlException: 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: TCP Provider, error: 40 - Could not open a connection to SQL Server)
If I use the Plesk hosted web app it connects to sql server correctly as expected. If I then immediately use the Azure Linux web app it manages to get a SQL connection! In all cases the connection string is identical. Its like it needs waking up!
How can this be the case. I am at a loss as to why this is happens. Any ideas folks?
Properly, you need to add the outbound IP addresses in Azure App Service into the firewall of SQL Server which your SQL Server database existed.
edit
You could check the following aspects on your side refer to this.
Make sure SQL Server Service is running
If a named instance, make sure SQL Server browser service is running
Make sure SQL Server is configured to allow remote connections
Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports
Test server connectivity with PING from the client machine
Test port connectivity using TELNET or PowerShell to the server and port (from step 4) from the client machine. For example a. TELNET
1433 b. PowerShell: 1433 | % { echo ((new-object
Net.Sockets.TcpClient).Connect("YourServerName",$)) "server listening
on TCP port $" }
Check firewall settings if step 5 or 6 connectivity test fails
For more information:
Troubleshoot connecting to the SQL Server Database Engine
Networking Related Commands for Azure App Services

Intermittent Azure database connectivity from TFS build agents

I have the following setup:
Azure MSSQL database
TFS build server
Build server in one of its steps contacts Azure database and every so often I get an error message like below:
Invoke-Sqlcmd : 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)
The rate of these failures varies. Sometimes it's one failed build for ten successful ones. Sometimes, I get five failed builds in a row.
The error occurs irrespectively of whether the build server is connected to mymssqlserver.database.windows.net or mymssqlserver.database.secure.windows.net
Azure Resource health logs are telling me that the database does indeed go offline late at night or early in the morning every few days for about 5 to 10 minutes but these offline times do not overlap with the connectivity issues.
The error always occur on remote, TFS hosted build agents, never on a local one.
Autoclose is turned off.
Your problem should be related to the Firewall Settings of you SQL Database on Azure.
I would suggest to:
verify whether the Azure SQL Database Deployment task has the parameter "Specify Firewall Rule Using" set to "Auto-Detect"; this is a must when using Hosted Build Agent;
enable verbose logging on the Build Definition (by setting System.Debug to True in the variable section), run the Build and verify whether the Azure SQL Database Deployment task is successfully setting the Firewall Rules;
verify whether the on premise build agent machine is already enlisted as allowed client in the Firewall Settings of your SQL Database, this would be the reason the deployment always works on that 'local' build agent;
read the Troubleshoot section at SQL DB Firewall Configuration and spot any possible culprit of your setup.
Solution that worked for me was to change the network protocol from the deafult, named pipes to TCP.
My connection string now looks like:
tcp:mymssqlserver.database.windows.net

Lightswitch Web Deploy - Error 26

I have a very simple Lightswitch application (HTMLClient and DesktopClient) developed on my local machine in VS 2013. I can run this locally with no issues.
I also have a remote server with IIS8 (APP02) and separate SQL server (SQL01) running SQL 2012 Standard 64 bit, both on the same domain. I can connect to the SQL server without any issues from the IIS server using a test .udl file. The IIS Server also has a sharepoint installation and all of the associated databases for this are on the SQL server.
When i Publish the Lightswitch App directly to the IIS server, after carefully following Beth Massi's article here: http://blogs.msdn.com/b/bethmassi/archive/2011/08/16/10145037.aspx?PageIndex=4#comments, I get the following error:
Error 98 An exception occurred when deploying the database for the application.
An error occurred while establishing a connection to SQL Server instance 'SQL01\SQL2012DEV'.
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\LightSwitch\v4.5\Publish\v2.2\Microsoft.LightSwitch.Publish.targets
1565 10
IIS8LightswitchApp
The IIS application is created successfully and i can navigate to it using the public URL, but no database is created at all. There is nothing in the Event Log of the SQL server related to this either.
When i publish the app to a package and install the .zip file in IIS manually, the app is deployed to IIS and SQL with no issues.
I've scoured this site, Lightswitch forums, and the web in general looking for a resolution but so far nothing has worked. A few things that i have tried are:
Changed the Log On user in Web Deployment Agent Service to a domain admin account
Changed the Log On user in Web Management Service to a domain admin account
Checked the firewalls on both servers (tried turning them off)
Does anyone have any suggestions I can try please? Also posted on the Lightswitch forums.
Have you tried configuring the IIS Server to host LightSwitch Apps using Web Platform Installer - http://msdn.microsoft.com/en-us/library/gg481779.aspx

Resources