Connection String for Oracle in OraDb11g_home1 Driver - database

I know that connection string questions are a dime-a-dozen, but I've got a new one.
I created a System DSN to talk to an Oracle database that I have locally on my machine. I put in all the info and hit the test button, and it says that it's successful. I'm using the OraDb11g_home1 driver.
When I try to put together a connection string for an application that uses ODBC, of course I can't get it to work.
One of the connection string attributes that they say that they require in their documentation is something called "Provider." What is this?
One of the most recent strings that I've used includes the following.
Driver={Oracle in OraDb11g_home1};Server=\\localhost:1521\local;Uid=mike;Pwd=password
Can anyone please offer any suggestions? Thanks,
mj

I figured it out. I was trying to use an application that was using 32-bit ODBC and the DSNs that I created were 64-bit.

Related

Azure Function Database Connection

I have a Python package that I am able to run successfully on an Azure Data Science Virtual Machine. However, when I push it to Azure as a Function, I cannot successfully make a database connection. I was getting an error that the ODBC Driver 13 for SQL Server was not supported, so I changed the driver to ODBC Driver 17 for SQL Server and now I am NOT getting an error, but no data is being returned for a query that I know should return data.
Is there any other reason that data would not be returned? Firewall issues? do I need to add a binding? Do I need to separate out the connection string to feed each part (e.g., Driver, UID, PWD) into pyodbc.connect() separately? Right now I am feeding it in like this:
setting = os.environ("CONNECTIONSTRING")
conn = pyodbc.connect(setting)
This query works fine returning data when I run it on the VM using this code, just not as a Function.
(Note, this is different from my previous post regarding reading the Azure App Setting. That problem has been solved).
There are many parts where this could be breaking.
I'd suggest start by having a Profiler or Extended Events trace on your SQL Server to verify whether a connection is even being established. If not then you need to work through the the various points of connectivity to find out where it breaks. The identity, firewall, NSGs etc might all come into play here.
Once you see a connection then you can play with permissions to ensure that your query then returns your data.
Without a full picture of your infrastructure and settings it is hard to pin it down further.
Turns out it was not a database connectivity issue like I thought it was; it was a code error.

What is the difference between connectionstring and dsn?

I'm having a very hard time deciphering the difference between dsn and connection string. My problem lies is that DS can give you the database name, database driver, name password . Isn't DSN able to make a connection to the database with these details. I need an explanation because this has been bugging me for a long time
DSN has the neccessary details to establish a connection between the database and the client, doesn't it? If it does why is there a connection string?
Please answer and thanks for taking your time to answer!
DSN stands for Data Source Name and it is kept in registry as a user or system value. If it is there, you can refer to connection just by its name. It looks tempting to do that way, and many old samples actually use and encourage a DSN.
However, a connection string is the connection information written as a string and doesn't need to be saved in registry. It can be built on the fly, or built and saved (probably encrypted) to a location of developer's choice (may be even another local database) - (it is in a sense developer invented DSN then). It has much more flexibility and many developers prefer it over DSN.

How to access remotely MS SQL Server on linux ubuntu 14.04

How would I access MS SQL Server with ubuntu 14.04. I tried using freetds I failed to understand the process and It was my first time learning sqlmap. I have tried to read for several hours but in vain. Just give me a clue a way to proceed. I have the IP address of the database but I don't know how I can read it.
DbVisualizer (https://www.dbvis.com) should work for you. Its cross platform, fairly easy to use and can connect to almost any kind of database. You'll need the IP address, port, username and password, just create a new connection and provide the connection details. You then can see the tables and run SQL against them (you're gonnna need to learn SQL if you don't know it).
It would help to know what you are trying to migrate. Im assuming the Ubuntu server is where the data is, but you haven't said what platform you are using or what format you are trying to get the data in. Are you just trying to clone the entire database to your local MySQL process?

LocalDB connection with Integrated security=False

I was looking everywhere and still have not found clear answer to this simple question:
Is it possible to use SQL authentication with LocalDB, i.e. is it possible to use connection string containing
Integrated Security=False
?
Yes, last I tried it was possible. Just follow the steps from this MDSN article.
Keep in mind that it will still be user instance, running under the account that started it, and will be shut down shall the account log out. Also no remote access.

How to configure ODBC Data Source Administrator (DSA) for MS Access db?

I ultimately want to query an existing MS-Access database (say, contacts.mdb) from a Lazarus program I will write.
It appears that configuring a User DSN is the first step.
In the ODBC DSA, I am stuck at Adding a driver for MS-Access databases. What do I need to download for this?
OK, I'm starting over from scratch. Please bear with me.
I'm now trying to use the Lazarus example given at wiki.lazarus.freepascal.org/MS_Access.
Following the Instruction given as "Goto your [Data sources (ODBC)] at the control panel administrative tools..." I run /usr/bin/ODBCConfig and get an error which says "Invalid window handle." Clicking OK closes without anything.
Does this mean I've gotten everything so FUBAR that's it's hopeless?
If your program is written in PHP you can use php5-odbc for access any odbc source, like mssql server or access databases.
This post http://phplens.com/phpeverywhere/node/view/9 illustrate you all the necessary step.
Thsi might be the thing you need
http://www.easysoft.com/products/data_access/odbc-access-driver/
I think it should be enough to put something like the following in ~/.odbc.ini:
[Contacts]
Description = The Contacts Database
Driver = /usr/lib/libmdbodbc.so
Database = /home/dkjmusic/data/contacts.mdb
Of course you need an MDB ODBC driver (e.g. libmdbodbc Install libmdbodbc http://bit.ly/software-small) to be installed

Resources