We have a need to connect to a PG database using Microsoft Access 2018.
I downloaded the ODBC driver ( psqlodbc_12_01_0000-x64.zip). I made sure the driver was also added to the system path in environment variables ( C:\Program Files\psqlODBC\1201\bin) for both the user and the system. I then restarted my computer.
I checked the OBDC Drive in Admin and the drivers are listed.
I do have a 64-bit OS
When I try to make a connection to it in Microsoft Access ( External Data > New Data Source > Select Data Source > Machine Data Source > New) it doesn't appear as an option to connect to. What am I missing here?
Related
I downloaded and installed on Windows the following:
IBM DB2 Runtime Client (64-Bit) 10.5
with the aim of connecting to a remote server database.
It installed here:
C:\Program Files\IBM\SQLLIB
But I don't see any DB2 folders in there.
I tried to catalog the remote db like this:
db2 catalog tcpip node testing remote the.server.com server 446
If I then try to connect to it, I get the following:
SQL1031N The database directory cannot be found on the indicated file system.
There is some wizard installed called the 'Default DB2 and IBM Database Client Interface Selection Wizard'. I ran this and it said it would create a default DB2 copy and would be used by default, called DB2COPY1 and it would be installed to C:\Program Files\IBM\SQLLIB.
But I'm nnot sure what this is doing really.
What do I need to do here to connect to the remote DB2??
EDIT:
I have managed to get a bit further based on this article here:
https://www-01.ibm.com/support/docview.wss?uid=swg21008914
my current commands look like:
db2 catalog tcpip node tstnode remote my.server.com server 446
db2 catalog db db1name as mytstdb at node tstnode authentication server
db2 catalog dcs db db1name as A123456DAT
db2 terminate
db2 connect to mytstdb user <username> using <password>
However the connect fails with:
SQL30061N The database alias or database name "A123456DAT " was not
found at the remote node. SQLSTATE=08004
Any ideas?
If you are connecting through port 446, I guess you are trying to connect to DB2 for IBM z or DB2 for IBM i. If yes, you will need at least Db2 Connect.
Regarding error "SQL30061N The database alias or database name "A123456DAT " was not found at the remote node. SQLSTATE=08004" it happens to me when the userid does not have some priviledges on the source system. If it is an IBM i, look at the corresponding spool file. DRDA Connections are attended by jobs called QRWTSRVR. With the IBM i command WRKSPLF SELECT(USERID) (changing USERID by the user trying the DRDA connection) you can see the spool files for jobs related to your connection. Usually spool file messages are very specific on the cause of the failure.
If you are trying to connect to DB2 on z, I don't have experience.
After successfully installing IBM DB2 Express V10.5_01 on an Ubuntu 14.04 LTS machine I tried to follow the next step and start
db2fs
in an X-Windows session. I am asked to create a profile for firefox and a browser window comes up with an error message dialog showing
exception TypeError: netscape.security.PrivilegeManager is undefined
When pressing ok for a few times the "create sample database" button disappears and instead a warning appears:
First Steps was unable to connect to the online DB2 Information Center and could not find an instance of a locally installed DB2 Information Center for this version of the product. To access product information, one of the following types of connections to a DB2 Information Center is required:
Internet access to the online DB2 Information Center
A locally installed version of the DB2 Information Center
Access to a remotely configured DB2 Information Center
As a workaround I tried to use
db2sampl
after adding my user to the groups dasadm1 db2iadm1 and db2fadm1 that had been created by the installation procedure.
db2sampl -force
Creating database "SAMPLE"...
Existing "SAMPLE" database found...
Dropping and recreating database "SAMPLE"...
Attempt to drop existing database "SAMPLE" failed.
Attempt to create the database "SAMPLE" failed.
SQL1013N The database alias name or database name "SAMPLE " could not be
found. SQLSTATE=42705
db2 list db directory
shows:
Database alias = SAMPLE
Database name = SAMPLE
Local database directory = <path>/db2inst1
Database release level = 10.00
Comment =
Directory entry type = Indirect
Catalog database partition number = -1
Alternate server hostname =
Alternate server port number =
unfortunately
db2cc
is not available anymore as an admin tool in V10.5 see DB2 Express V10.1 and db2cc binary and before downloading
IBM Data Studio I'd first like to check the basic integrity of my installation.
db2help
e.g. gives the errormessage
/bin/sh: 0: Illegal option -p
In all I have the feeling that Ubuntu 14.04 LTS is not a properyly supported platform for IBM DB2 Express V10.5_01.
How feasible is it to get IBM DB2 Express V10.5_01 running in this environment?
I just installed Oracle Database 11g Express Edition.
In the Run SQL Command Line window I connected to database with username:SYSTEM and password:{password I selected during installation}
SQL>connect SYSTEM/{password}
Then I created a user with password as described in the documentation. After that, I am able to access the database i.e. creating and querying tables and info.
Now, I want opened latest Eclipse EE and opened a Database Development perspective. In the Data Source Explorer, I right clicked and selected New Connection. In the driver definition, I added the jar file ojdbc6.jar which is provided in the oracle installation.
I don't know what to fill in Host, Username, and Password. I tried several combinations, and still getting ping failed. Please help, I am trying it for 3 days now and got so frustrated.
To check the host name -> ORACLE_HOME/server/network/admin
open the tnsnames.ora file with oracle developer. You will see somethimg like this-
ADDRESS = (PROTOCOL = TCP)(HOST = hostname )(PORT = 1521
now in eclipse-> windows->preferences->data management-> connectivity -> driver definition
there add oracle thin driver 11 and include necessary jars(u will find them in your \oraclehome->jdbc->lib ,then in properties in the connection url field include url with ur hostname you checked in tnsname.ora
example -jdbc:oracle:thin:#hostname:1521:xe
I know, u are welcome.. i too spent 4 days in figuring this :)
I want to connect Matlab to Sql server.
this is my code:
db = database('ChifcoProd-2013-12-12-11-37', '', '', 'sqljdbc4.jar',...
'jdbc:microsoft:sqlserver://localhost:1433;database=ChifcoProd-2013-12-12-11-37')
error:
JDBC Driver Error: sqljdbc4.jar. Driver Not Found/Loaded
the driver is already installed and I added the path to javaclasspath but it doesn't work.
Try using the Help within MatLab, its very helpful.
You are using the correct database connection:
conn = database(instance,username,password,driver,databaseurl)
The example provided by MatLab looks like this:
Connect to an Oracle database via JDBC driver.
Connect to the database, test_db, using the user name, scott, and password, tiger. Use the JDBC driver, oracle.jdbc.driver.OracleDriver, to make the connection. The URL defined by the driver vendor is jdbc:oracle:oci7:
conn = database('test_db','scott','tiger',...
'oracle.jdbc.driver.OracleDriver','jdbc:oracle:oci7:')
OR
Microsoft SQL Server Authenticated Database Connection
Connect to a Microsoft SQL Server database with integrated Windows Authentication using a JDBC driver.
Close MATLAB if it is running.
Insert the path to the database driver JAR file in the classpath.txt file. The classpath.txt file is located at:
$MATLABROOT\toolbox\local\classpath.txt
The updated path entry should now include the full path to the driver. For example:
C:\DB_Drivers\sqljdbc_2.0\enu\sqljdbc4.jar
Insert the path to the folder containing sqljdbc_auth.dll in the librarypath.txt file. The librarypath.txt file is located at:
$MATLABROOT\toolbox\local\librarypath.txt
The path entry should not include the file name sqljdbc_auth.dll:
C:\DB_Drivers\sqljdbc_2.0\enu\auth\x64
The sqljdbc_auth.dll file is installed in the following location:
<installation>\sqljdbc_<version>\<language>\auth\<arch>
where is the installation directory of the SQL server driver.
If you are running a 32-bit Java Virtual Machine (JVM), then use the
sqljdbc_auth.dll file in the x86 folder, even if the operating system
is the x64 version.
If you are running a 64-bit JVM on a x64 processor, then use the
sqljdbc_auth.dll file in the x64 folder.
If you are running a 64-bit JVM on a IA-64 processor, then use the
sqljdbc_auth.dll file in the IA64 folder.
Start MATLAB.
Use the AuthType parameter to establish a Windows Authentication connection.
conn = database('dbName','','', ...
'Vendor','Microsoft SQL Server','Server','servername',...
'AuthType','Windows')
I am having problems trying to create a database with DB2 Express C (v9.7).
I already have a another version of DB2 installed on my system:
Product: DB2 Connect Enterprise Edition
Version: 8.2
Copy: DB2COPY1
Instance: DB2
I understand that it is possible to have coexistence.
Express C has seemingly installed OK on my laptop, and I am able to use the Sample Database without a problem. I created new copy DB2COPY2, and new instance DB2_01.
I've installed it as a DB2ADMN.
When I try and create a database I get the error:
SQL22223N The Instance "DB2_01" does not exist on host "host name".
It is saying that the instance does not exist on the host. Which is strange because I installed it locally as a DB2ADMN.
Coexistence is supported. You have to open correct CLP version, and
set db2instance=db2_01
db2cc
and then it should work. If it doesn't you have to probably uncatalog and re-catalog your node and databases.