I'm trying to set up a linked server from a SQL Server 2017 instance to an Oracle database. I have found similar questions where the question is for Visual Studio and the answer was to install ODAC, but the link provided is to a 32 bit ODAC specifically for VS2017.
Other solutions I have found suggest installing the full Oracle Server. I just need the OraOLEDB.Oracle provider for a LinkedServer on SQL Server. I have the TNSNAMES file and everything and have accomplished this before, but only by installing the full Oracle Server, but that feels like overkill. What is the minimum I would need to install and configure on my SQL Server box to accomplish this? This feels like it should be very easy to accomplish, but for some reason it is not for me.
Many thanks!
OK after several hours I figured this out myself. I needed to install the 64 bit ODAC components from the Oracle Website.
Once I had that I needed to unzip and execute the install.bat batch process from command prompt, running cmd.exe as an administrator
d:\oracle\install.bat all c:\oracle odac
*Note above, you can download your ODAC to anywhere, for me it was a directory I created in d:\oracle... and you can install to anywhere, but I think c:\oracle is common.
Once I did that, I needed to add c:\oracle and c:\oracle\bin to my PATH environment variable.
So this was quite simple in the end. Hope this helps someone else trying to navigate the same challenge.
Microsoft has released the relational DB engine part of the SQL Server for Linux, including Ubuntu 16.01.
Is it possible to use this to install it on Debian (Jessie, for example)? If so, What different requirements would I have to consider to get it working?
I know this is pretty new, but I'd appreciate any insight into this.
Yes, it is possible. You'll need to overcome a SSL dependency by using jessie-backports source. I wasn't able to get the mssql-tools package to install however. I also tested the latest version of Kubuntu. SQL and mssql-tools installed without a hitch there.
I'm trying to get data from a PostgreSQL database into PowerBI Desktop but it doesn't seem to work. I think the problem is with the installation with npgsql. When trying to setup a new database connection in PowerBI I type in the database and server, and this is the error message I get:
"Unable to connect
Details: "PostgreSQL: We were unable to find a database provider with invariant name 'Npgsql'.
This error could've been the result of provider-specific client software being required, but missing on this computer. To download client software for this provider, visit the following site and choose the 64-bit (x64) version of, at minimum, 'Npgsql version 2.0.12': https://go.microsoft.com/fwlink/?LinkID=282716""
I've tried going npgsql website and install the required components but I can't seem to get it working. I'm not a developer so this is a bit complicated for me. Does anyone know how to get these components installed? I very much appreciate your help!
I'm using Windows 10 on a Surface Pro 3 if this helps. And I do have Visual Studio Community installed as well.
Best,
Bruno.
I have downloaded and tried it with version 3.6.6
Install npgsql
During the installation stage, enabled "Npgsql GAC Installation" as GAC requires Npgsql.
Restart the PC.
It should work now.
The solution from this page helped me: https://community.powerbi.com/t5/Community-Blog/Configuring-Power-BI-Connectivity-to-PostgreSQL-Database/ba-p/12567
Select the option to install to the GAC during install of the program npgsql v3.x.x downloaded from this page https://github.com/npgsql/Npgsql/releases
It worked for me (although I do not know why:-)
When you install Npgsql you should enable installation into the GAC.
Otherwise component will not be automatically detectable to other programs.
I am having a hard time installing drivers for ODB Mssql. I need it to let my php communicate with an Sql server (2005).
The driver:
http://www.microsoft.com/en-us/download/details.aspx?id=28160
Does someone know a alternative solution? Or an working example?
Please notice I am using cakePhp version 2+. Not 1.3.. Lots of documentation about this problem has been written for 1.3.
The driver for Mssql from MS is buggy. It needs a lot of libraries and still doesnt survive it's own installer..
My configuration is Ubuntu 12+ (with gui), Lampp (xampp for linux).
Besides that you have issues installing the driver, CakePHP2 has no datasource for PDO and ODBC.
You can use this datasource to connect to SQL 2005 from CakePHP 2 without PDO and the driver.
This is a ported version of the 1.3 source: https://github.com/rchavik/datasources/tree/mssql-2.0
I am not sure, but check its useful for you:
http://www.mindfiresolutions.com/Configuring-MSSQL-Server-to-talk-to-PHP-in-Ubuntu-1810.php
We have a Windows machine running SQL Server 2005, and we need to be able to run some database queries on it from a Linux box. What are some of the recommended ways of doing this? Ideally, we would want a command-line utility similar to sqlcmd on Windows.
FreeTDS + unixODBC or iODBC
Install first FreeTDS, then configure one of the two ODBC engines to use FreeTDS as its ODBC driver. Then use the commandline interface of the ODBC engine.
unixODBC has isql, iODBC has iodbctest
You can also use your favorite programming language (I've successfully used Perl, C, Python and Ruby to connect to MSSQL)
I'm personally using FreeTDS + iODBC:
$more /etc/freetds/freetds.conf
[10.0.1.251]
host = 10.0.1.251
port = 1433
tds version = 8.0
$ more /etc/odbc.ini
[ACCT]
Driver = /usr/local/freetds/lib/libtdsodbc.so
Description = ODBC to SQLServer via FreeTDS
Trace = No
Servername = 10.0.1.251
Database = accounts_ver8
sql-cli is a nodejs based cross platform command line interface for sql server. You can install it via npm https://www.npmjs.org/package/sql-cli
It can connect to both on-premise and sql azure instance.
sqsh + freetds.
sqsh was primarily an isql replacement for Sybase SQL Server (now ASE) but it works just fine for connecting to SQL Server (provided you use freetds).
To compile, simply point $SYBASE to freetds install and it should work from there. I use it on my Mac all day.
The best part of sqsh are the advanced features, such as dead simple server linking (no need to set up linked servers in SQL Server), flow control and looping (no more concatenating strings and executing dynamic SQL), and invisible bulk copy/load.
Anyone who uses any other command line tool is simply crazy! :)
pymssql is a DB-API Python module, based on FreeTDS. It worked for me. Create some helper functions, if you need, and use it from Python shell.
Mono contains an ADO.NET provider that should do this for you. I don't know if there is a command line utility for it, but you could definitely wrap up some C# to do the queries if there isn't.
Have a look at http://www.mono-project.com/TDS_Providers and http://www.mono-project.com/SQLClient
Since November 2011 Microsoft provides their own SQL Server ODBC Driver for Linux for Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES).
Download Microsoft ODBC Driver 11 for SQL Server on Red Hat Linux
Download Microsoft ODBC Driver 11 for SQL Server on SUSE - CTP
ODBC Driver on Linux Documentation
It also includes sqlcmd for Linux.
If you are using Java, have a look at JDBC.
http://msdn.microsoft.com/en-us/library/ms378672(SQL.90).aspx
http://en.wikipedia.org/wiki/Jdbc
You don't say what you want to do with the resulting data, but if it's general queries for development/maintenance then I'd have thought Remote Desktop to the windows server and then using the actual SQL Server tools on their would always have been a more productive option over any hacked together solution on Linux itself.
There is an abstraction lib available for PHP. Not sure what your client's box will support but if its Linux then certainly should support building a PHP query interface with this:
http://adodb.sourceforge.net/ Hope that helps you.
I'd like to recommend Sqlectron. Besides being open source under MIT license it's multiplatform boosted by Electron. Its own definition is:
A simple and lightweight SQL client desktop with cross database and platform support
It currently supports PostgreSQL, MySQL, MS SQL Server, Cassandra and SQLite.
Surprised no one has mentioned that, contrary to what other answers seem to suggest, FreeTDS is all you need. No need for unixODBC, iODBC or anything else on top of it.
run some database queries [...] command-line utility similar to sqlcmd on Windows
tsql does this and is part of the FreeTDS package (as are freebcp and other utilities). tsql does not have fancy UI, but if you want a command-line utility that is light, functional and performant, it'll do just fine.
See e.g. How to run a SQL script in tsql
And by light, I mean under 500kb in size (maybe under 60k depending on how it's compiled) and, as far as I have seen, extremely efficient with memory and CPU.
I was not confortable with the freetds solution,
it's why i coded a class (command history, autocompletion on tables and fields, etc.)
http://www.phpclasses.org/package/8168-PHP-Use-ncurses-to-get-key-inputs-and-write-shell-text.html
valentina-db it has free version for sql server
.rpm and .deb
serial id will be sent by email after registration
https://www.valentina-db.com/en/
https://valentina-db.com/en/store/category/14-free-products
If you use eclipse you can install Data Tools Platform plugin on it and use it for every DB engines including MS SQLServer. It just needs to get JDBC driver for that DB engine.
There is a nice CLI based tool for accessing MSSQL databases now.
It's called mssql-cli and it's a bit similar to postgres' psql.
Gihub repository page
Install for example via pip (global installation, for a local one omit the sudo part):
sudo pip install mssql-cli