How to download sql server driver using azure dev ops/ pipelines - sql-server

I am connecting to SQL server using the library pyodbc. I downloaded the driver locally using the following https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver16. All my code now works and I want to run it on azure. Is there an azure pipeline task to download the same driver am using locally? do I include it in a script?

If you use Microsoft-hosted agents to run the pipeline, normally you do not need an extra step to install the ODBC Driver:
On windows-2022 (windows-latest) agent, it has the component "Microsoft.VisualStudio.Component.MSODBC.SQL v17.2.32408.312" installed.
On windows-2019 agent, it has the component "Microsoft.VisualStudio.Component.MSODBC.SQL v16.0.28625.61" installed.
If you use self-hosted agent which installed on your local machine or VM, you can login to the machine, then manually download and install the required ODBC Driver version.

Are you planning to run on a hosted agent? If so it should already have the sql server ODBC driver installed. You can confirm this by configuring a new pipeline on a hosted agent and running the following in a powershell task
Get-OdbcDriver

Related

Connect SQL Server to MapR-Talend Sandbox

I am new to Talend.
I have installed my MapR + Talend sandbox. Now I may want to try to connect my local MS SQL Server to the Talend in the sandbox. Unfortunately when I try to create the db connection, it showed error like this:
I downloaded the jdbc driver in my local windows and ubuntu. Can someone tell me how to install the driver and where should I put/install the jdbc driver in both windows and ubuntu?

OLEDB 12.0 is not installed on local machine (ACE Driver)

I have this system configuration
Windows Server 2012 - 64 bit (Amazon EC2)
SQL Server 2012 - (Amazon RDS)
On EC2 I am trying to run a utility which will import the data from an excel to SQL Server(RDS) through SSMS.
I was getting an error "OLEDB 12.0 was not registered", I installed ACE driver on EC2. It didn't work.
The Problem which I think is since my SQL server is on different machine i.e RDS. My installed driver cannot add excel importing capabilities to it(I am using openrowset).
I cannot install the ACE driver on RDS since it's just a database.
Can anyone help me in getting a solution to it? Thanks in Advance.
If I do it on a machine which is hosting SQL server and install ACE Driver on it. It works like a charm.
The Problem was amazon RDS is just a database. So ACE driver service was running on EC2 but not on RDS. In order to work the flow of importing the ace driver should interact with services running on RDS. So I figured out two solutions for it:
1.) Move my database on EC2.
2.) Run this import process on separate machine, Generate Scripts and run through ssms on EC2 to get it stored in RDS.

Sql Server 2008 installation error : Attempt to perform an unauthorized operation

I had sql server 2008 r2 express edition in my PC .But i unistalled it ,In order to install Sql server 2008 Enterprise edition trial version in my PC.
But some features in sql server 2008 showing "attempt to perform an unauthorized operation" error during installation process.
My operating system is windows 7 home basic 64 bit.
these are the feature which are showing error while installation:
sql server database engine service
sql server replication
sql server analysis services
please help me with this issue
Here's a couple things to try from people who have had similar problems:
Check: %\Microsoft SQL Server\100\Setup Bootstrap\Log\SystemConfigurationCheck_Report.htm
Copy installation files to disk and run from there.
Run setup as administrator.
Create a new local administrator account and use that to run the installation.
When error occurs, dont exit installation, run process monitor trace, click retry for installation, stop trace, locate registry key where where access denied is, give your account temporary full control on that key, retry again.
Use the slipstream procedure to update SQL Server 2008
This method allows you to update the entire product when you run the SQL Server 2008 Setup program after following one of the following procedures:
Procedure 1: Basic slipstream steps
Follow the following steps to create a slipstream drop that you can use for installing the original media and a service pack at the same time.
Install the following prerequisites for SQL Server 2008.
.NET Framework 2.0 SP2 for SQL Server 2008 Express Edition
You can obtain the .NET Framework 2.0 SP2 from the following Web site in Microsoft Download Center:
http://www.microsoft.com/downloads/details.aspx?FamilyID=5b2c0358-915b-4eb5-9b1d-10e506da9d0f&displaylang=en
.NET Framework 3.5 SP1 for other editions
To download and install the .NET Framework 3.5 SP1, visit the following Microsoft Web site:
http://go.microsoft.com/fwlink/?LinkID=120550
Windows Installer 4.5
To download and install Windows Installer 4.5, visit the following Microsoft Web site:
http://go.microsoft.com/fwlink/?LinkID=49112
Download the latest service pack package that matches you system architecture. For example download the x64 package of SQL Server 2008 Service Pack 1 if your system is an x64-based system.
Extract the service pack by running the following command:
SQLServer2008SP1-KB968369-x64-ENU.exe /x:C:\SP1
Run the service pack to install Setup files on the computer. You will receive a Setup Support Files dialog box if the Setup support files have not been installed. You can also run the following file to install the setup support files:
C:\SP1\x64\setup\1033\sqlsupport.msi
Finally,
run the Setup.exe file from the SQL Server 2008 source media by specifying the /PCUSource parameter. For example:
Setup.exe /PCUSource=C:\SP1
I have been googling for this issue a lot but there were no solution working for me. atlast , I formatted my system for a fresh install which worked fr me.
The solution is simple.
1 - Install ONLY "Sql Server Database Engine"
2 - Start installation again and add any other features to your instance
P.S. No need to run as Admin or in Windows 7 compat-mode (if you are installing on 8 or 10)
In my Case, creating an Administrator Windows Account and installing SQL Server worked!
Also you can simply activate the built-in windows Administrator Account by running the "net user administrator /active:yes" command in command prompt(Admin Mode), then log in as Administrator. Now You can Install SQL Server without problem!
Finally I should say that you can use SQL Server from your own normal windows account after Installation and I recommend deactivating Administrator Account by "net user administrator /active:no"

deploy SQL Server Express database with desktop app?

I've created my first database based desktop app in .NET and not able to understand how can I deploy the database with the application installer, so that the database, application and the SQL Server is installed in one go.
If I only deploy the native client for SQL Server and the database with the installer, will it work?
The application uses the database very frequently.
You need to install the SQL Express engine if you want to use it. Deploying only the client connectivity will give you exactly what the 'client connectivity' name implies: you'll be able to connect to a SQL Server. But only a running SQL Server instance will be able to read/write your application database.
The SQL Express install MSI is actually very customizable and allows for a lot of scenarios, including unattended setup and remote deployment. For the most basic options, see Configuring SQL Express During Installation. Your application installer will have to invoke the Express installer passing in the desired parameters.
Using click once you can make sql server express a dependency of the main project and it would be deployed with the instalation data and installed, if it is not instaled yet, when you first install your app.
You can do it in the project properties, in Visual Studio.

Installing support files for app using sql 2005 where server is on another computer

I have a managed C++ application that connects to SQL Server 2005 Express databases on the same computer and over a network. My problem is that if the database is located on another computer over the network, the client machine will not have the needed DLLs files installed from SQL Server.
I can't force my users to install SQL Server 2005 Express on the client machine just to get the needed support files. So my question is, is it safe to installed the dependent files to the GAC on the user's computer? Or, does MS have a command line install package for just this purpose?
The files from SQL Server that my application show as being dependent on are as follows:
Microsoft.SqlServer.BatchParser
Microsoft.SqlServer.ConnectionInfo
Microsoft.SqlServer.RegSvrEnum
Microsoft.SqlServer.Replication
Microsoft.SqlServer.Rmo
Microsoft.SqlServer.ServiceBrokerEnum
Microsoft.SqlServer.Smo
Microsoft.SqlServer.SmoEnum
Microsoft.SqlServer.WmiEnum
If it helps, I'm using the Inno-Setup program for my installer. This has to be a common problem.
You dont have to install the full version of SQL Server, but you do need the necessary drivers. Installing the SQL 2008 SMO package on the client should resolve these issues.
http://www.microsoft.com/downloads/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

Resources