Knime with database - sql-server

How to add new driver into database through KNIME preferences? Generally,
File-> Preferences -> Add File/ Add Directory
The files accepted are only of *.jar or *.zip.
MY QUESTION
I have installed ODBC64 into my PC. Now I need to add that file into knime preferences and use the Driver into Database Connector node.
How to add and use the file into my Knime?
And What is meant by Database URL jdbc:mysql://host:port/database_name
Host and port?
Can anyone please briefly explain and help me out?

I'm assuming based on your database URL of jdbc:mysql:// that you are wanting to connect to a MySQL database? Based on that, then there is a thread on the KNIME forum which explains pretty much all of your question, but the process is the same for any other sort of database. The steps are as follows:
Download the jdbc driver (e.g. from https://dev.mysql.com/downloads/connector/j/ for MySQL) - NB KNIME now comes bundled with several drivers already installed - MySQL is one of those - in the Database Connector node the drivers installed are listed.
In the database URL, you need to change those parts in <> - i.e. the hostname, port number and database name. Hostname may be localhost if it is a local database. The port number you will need to find from your database administrator, or will be what you set it up to be if you are running a local database (3306 is the default for MySQL), so for a database called 'myDB' on the default port on your local machine, the url should be jdbc:mysql://localhost:3306/myDB
For some of the shipped drivers, there are also connector nodes, e.g. MySQL Connector, SQLite Connector, PostgreSQL Connector etc, which still require the server name/port and database name, but take them as individual inputs rather than requiring editing of the URL

Recent versions of KNIME are based on Java 8, which dropped support for ODBC, so you should first find an alternative driver for your database and only after you can connect to that with KNIME as described on the KNIME documentation page for DB connectors.

You have several nodes which allow you to connect to a DB (especially MySQL).
I remember there was a dedicated MySQL node for connecting with the DB.
Just remember this: you have to input the IP adress : port, then insert credentials and point to the DB you want to open by default.

Related

SQL Server Linked Server with tnsnames.ora on network share - ORA: 12154

Having an issue getting a SQL Server linked server to Oracle working while using a tnsnames.ora file on a network share.
If I copy the tnsnames.ora file to the local server, the linked servers work fine. However, we keep the file on a network share. My sql service accounts have read access to the share. I configure TNS_ADMIN system variable to the network share, the linked servers no longer work. I get ora-12154: could not resolve the connect identifier specified. tnsping and sqlplus work on the server. When I use process monitor to investigate further, I see:
Operation: createFile
Result: ACCESS DENIED
...
Impersonating: domain\MyLogin
This seems like an issue, but is maybe a false positive? If a process is trying to impersonate my account and access a remote resource it will fail since we don't have Kerberos configured to handle double-hop.
SQLPlus and TNSPing work just fine with the network share configured.
I've looked at this post and tried the items that seemed relevant, but had no success.
Additional Info:
sqlnet.ora has this:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
I am able to open a file browser as a service account and open the tnsnames file.
I had this same issue while trying to connect a oracle 10g database via my WCF serivce developed in .NET 4.0 framework.
I was having multiple instances of ORACLE installed in my system. So, I modified the ORACLE_HOME to point to the Oracle 10g and it worked.
Also check the following:
Your service name might have an alias, so Make sure that your listener is listening for the same service name that you are using and check for both local and global entries. Check:
$ORACLE_HOME/network/admin/tnsnames.ora
Check your global_name setting with this SQL:
select * from global_name;
Also, Please make sure you add the Key TNS_ADMIN in the registry and create a enviroinment variable with name TNS_ADMIN
Regedit->HKEY_LOCAL_MACHINE->Software->Oracle->RightClick NEW->StringValue and name
Specify the correct path where the oracle is installed for Example
X:oracleproduct32bit10.0.1.0.0NETWORKADMIN
Edit
The below video also looks quite helpful. Please check.
https://www.youtube.com/watch?v=Sec8WG8gQPg
As an Oracle DBA I sometimes have to work with Windows. Maybe you can adopt from my experiences with Oracle on Windows.
Scenario:
An Oracle DB runs under a domain user. I want to restore a database from a backup which is located on a Windows share (sounds like "read" but it obviously isn't). I (or let's say the windows team) did not manage to find the proper way to grant the required permissions.
After many tries, the admins grant "everything" to the entire Oracle server.
Even though the Oracle process runs in a user context we did not find a set of permissions for the user only. Only the permissions for the entire server enabled the restore process to access the data.
From security point of view this is a horrible solution! But maybe it will help you to come closer to a solution (and if so, please share :-)).

Users on my network cant open the Sql server linked tables from their MS Access Form

Hi there hopefully this makes sense.
I have split the database into backend and Frontend.
In the frontend i also have added some linked tables from a SQL Database which are on the network. The DNS files are in the same folder as the front. Now when ive copied across the frontend to the end users desktop when they try to open the table via a form they get the error: "ODBC Call failed" anyone know why that might be?
1 of the end users is using the free version of ms access(2016 runtime) and other has full MS Access but both get the same error.
As it wasnt happening during the development stage on my computer and my collegues. I am a bit lost on how to fix the issue other than convert the linked tables to local tables and do a weekly update of them from the SQL server via my computer where the links work.
Seeing as a normal backend table that is linked to the front works fine. Just would like it to directly call the information from the SQl Server.
Make sure on your development workstation you link the table using a FILE DSN. When you link, Access then converts the links to what we call DSN-less.
The above means then you don’t have to copy or setup or use ANY kind of DSN on each workstation. So do NOT use a “system” DSN – that uses settings in the registry that you have to setup on each workstation.
The next issue to be aware of is which SQL driver you use to link the tables. If you use the “standard” SQL Driver when linking, then you can be SURE those drivers are installed by default on each workstation.
If you use “Native 11” (or later), then you have to ensure that the Native 11 (or later) drivers are installed on each workstation for this to work. The native drivers are better choice, but they are not by default installed on each workstation.
So I suggest you delete the links, or use the linked table manager to re-link the tables – just make sure you use a FILE dsn – since once the tables are linked, then Access ignores and does not use the DSN anymore – you don’t need it, and you could even delete the DSN and you linked tables will still work.

How to distribute FDSN to other users or machines?

I am using a File DSN to connect to a SQL Server database in a linked tables project with MS Access as front end.
When I open the created .dsn file, it looks like this:
[ODBC]
DRIVER=SQL Server
UID=XXX
DATABASE=XXXX
WSID=XXXXXX
APP=Microsoft Office 2010
Trusted_Connection=Yes
SERVER=XXXX,XXX
Description=XXX
Here, it is showing my workstation's host name and my user id as I have created the DSN
If I want to share the app along with DSN , do I have to change any details in the DSN file ?
What is procedure to be followed to distribute this FDSN to multiple machines? Or simply sharing the file would suffice
We prefer to avoid System DSN as it causes difficulty in deploying the app to multiple users in production
Any thoughts on this ?
Eliminate the DSN and use DSN-less connections. Here are some links
http://www.accessmvp.com/djsteele/DSNLessLinks.html
http://www.databasejournal.com/features/mssql/article.php/1491011/ODBC-DSN-Less-Connection-Tutorial.htm
https://support.microsoft.com/en-us/kb/147875/en-us?wa=wsignin1.0

Can't access the DataBase (.mdf file) in my WPF application from PC's on network

I created a wpf application which connect to some sql database tables.
When i run this application on my pc every thing works fine,but when i try to run it from other pc on the local network i got an error: "The file ("file name") is on a network path that is not supported for database files".
What is the best way to create a WPF application that have to run from some pc's on the local network that share a common DB?
Have you considered a database server, SQL Server, MySQL, or something similar? If you really want to stick to a file based database (something I wouldn't recommend for security reasons) then you can use something like SQLite.
You will only be able to connect to your server (your pc in this case) instance from another pc if you have 'named pipes' enabled. You can also enable TCP\IP etc. if needs be, but this is probably why you are getting the error.
Named Pipes is not available in the Compact or Free versions of MSSQL.
A database server or pc with a proper version of MSSQL is your best bet.
yepppp solved.
Thanks for your answers.
I did some things that finally solved my problem:
1. Remove the "uid=Tomer, pwd=, and pooling=False" from the connection string.
2. Enable Port 1433(sql port) in the firewall.
3. Enable the TCP/IP and the 'named pipes' as i mentioned before.
Thanks alot for your help.

How to override or workaround compiled DB connection info

I've faced a bit strange problem. There is a site client would like to duplicate on another domain name. Site is built on ASP(yes, old v1 ASP :( ) with SQLServer. Problem is that all the database operations, including connection information is compiled into a DLL library.
Is there a way to some how intercept, override or workaround this?
Platform:
Windows 2000 Server
SQLServer 7
ASP v1 (VisualBasic)
What a nightmare...
If you have control over the new database server, and the connection string references the database server by name, you could add a line in the hosts file which points the name of the old server to a new ip address. Then you still have to create a user with the same password on the new database server.
Yes! However, your new database name MUST be smaller or equal to the length of your old one. Simply open up the vb6 .dll in any Hex Editor and search and replace. Make SURE you do not change the length of the DLL or shift any bytes around.
Failing that, add a hosts entry to windows to redirect the connection.
Could it be that the application uses a DSN definition for the connection?
In Control Panel -> Administrative Tools open ODBC Data Source Administrator. Have a look at the System DSN tab. Does there seem to be anything listed there that is related to the application?
Before you hack your DNS or rename the server, be aware that the SQL Server client supports aliases specifically for this scenario: How to: Create a Server Alias for Use by a Client.
The SQL 2000 tool for configuring an alias is the Client Network Utility.
Do you have any configuration options at all from asp? Even dbname or the such? If so you might be able to use two separate servers for IIS and use a single db server. I'm afraid you might need to find the source or the guy who wrote it.
If you could figure out the connection string or DNS you might be able to do something.
You could write your own passthrough ODBC provider.

Resources