Configure DB2 on windows. JDBC error - jdbc

My organisation wants to setup DB2 for our .Net application that links/uses the database setup on a remote desktop with a fixed IP address. Now, I'm trying to setup this DB2 databse using DB2 Express-C and IBM Data Studio and it is unable to connect to the database through the Java connection.
How do I know this? I tried performing a normal SQL operation using a DB2 command window and it worked.
If I try to do the same thing with Data Studio or command line processor, it doesn't work: always throws a 'user ID revoked' error.
I tried reconfiguring environment variables to JDBC4 driver, using it from an administrator account, but nothing works.
Question - How do I make this work properly? is there any guide or tutorial anyone can share to setup db2 express c properly.

Related

The underlying provider failed on Open. Remote Debbuging with Azure to VS2019

I am remotely debugging my application with azure and VS2019 and it works fine until I have to connect to the database.
Then I get the following error. "The underlying provider failed on Open."
On the other hand, if I debug locally everything works correctly.
Do you have to activate any permission in Azure or in the project config so that the database can be accessed remotely?
Right after the connection string I have put the following.
_context.Database.Connection.Open ();
So it returns the following error to me:
"Unable to connect to any of the specified MySQL hosts".
All this locally does not happen to me. Only when trying to debug remotely.
According to your description, we can ensure that the remote debug function of vs2019 is normal. An error is reported in this _context.Database.Connection.Open (); code. Obviously, the program cannot connect to the mysql database server.
Troubleshooting:
First make sure that your mysql database server can be accessed using tools (such as Mysql Workbench).
Using tools to ensure that the database is accessible is to ensure that the firewall of your database server is open (mysql in azure or other server).
Check the connectionstring of mysql in the released program. According to your error message, it is likely that the connection string is used incorrectly.

Export Database connection to Oracle Developer

I have a database Connection established in odbcad and Microsoft Access (aswell as working in Excel) via ODBC and want to also get it working in Oracle SQL developer.
It is a Windows SQL Server as far as i know and I have tried several Settings, of which None works. I have also installed Driver for ODBC. I would like to Import Settings into SQL developer as applied in MS Access, is there any possibility?
No, SQL Developer is a Java application and uses a JDBC driver.
But if you look at the odbc properties for your connection, those should largely translate to what you need to define a basic connection.
Oracle:
Server name or IP address of the DB, port # for the listener, and the name of the SID or Service, plus a valid username and password is all you need to connect to Oracle.
What error do you get when you try to connect?
Show us what you're trying.
Update:
You're trying to connect to SQL Server but you're getting"
Native SSPI library not loaded
You're trying to use OS Authentication for your connection. For this to work with the jTDS driver, you need to copy a DLL file named ntlmauth.dll (which is for NT authentication) under the jtds-x.x.x-dist\x86\SSO\ or jtds-x.x.x-dist\x64\SSO\, to any directories in the PATH environment.
Please update your question such that's it's clear you're connecting to SQL Server and share the error message so others can find it.
I imagine this question is a duplicate of many previous iterations of the same challenge.

Cant create local connections in SQL Developer [duplicate]

I am new to Programming. I am learning JAVA and for DB i wanted to learn Oracle so I downloaded sqldeveloper from Oracle website. It was a zip file so I didnot have to install anything, simply extracted it. When I open the sqldeveloper and try to make a new connection, it shows error.
Test failed: IO Error: The network adapter could not establish the connection.
I am not sure what to put in username and pwd. and i am also not sure if i have to connect this to jdk or jre or set classpath for database.
Can anyone help me?? I have uploaded the snapshot of the error too.
You downloaded a client.
You did NOT download the server component though - the actual database.
SQL Developer just allows you to work with an existing database.
No worries, you're not that far away. You have several options.
Oracle Database Express Edition (XE) - it's completely free.
We also have a VirtualBox appliance you can use for personal learning purposes, also completely free.
I talk about this and give step by step instructions here.
Check if oracle service, TNSListener service is up and running before trying to make any new connection from sql developer.
Even if TNS Service is down , connection can not be established with oracle instance.

Cannot create a new connection is sqldeveloepr

I am new to Programming. I am learning JAVA and for DB i wanted to learn Oracle so I downloaded sqldeveloper from Oracle website. It was a zip file so I didnot have to install anything, simply extracted it. When I open the sqldeveloper and try to make a new connection, it shows error.
Test failed: IO Error: The network adapter could not establish the connection.
I am not sure what to put in username and pwd. and i am also not sure if i have to connect this to jdk or jre or set classpath for database.
Can anyone help me?? I have uploaded the snapshot of the error too.
You downloaded a client.
You did NOT download the server component though - the actual database.
SQL Developer just allows you to work with an existing database.
No worries, you're not that far away. You have several options.
Oracle Database Express Edition (XE) - it's completely free.
We also have a VirtualBox appliance you can use for personal learning purposes, also completely free.
I talk about this and give step by step instructions here.
Check if oracle service, TNSListener service is up and running before trying to make any new connection from sql developer.
Even if TNS Service is down , connection can not be established with oracle instance.

oracle 11g Personal Edition: Create Schema

This is a two-part question. I have installed an Oracle 11g Personal Edition Server on a Windows Server 2008 VM. During the installation I chose the option to install a database as well (sample/blank database?).
Now, on the VM, I can launch the Oracle Enterprise Manager Console at localhost port 1158, login as either SYSMAN or SYSTEM and in that I can see: 'Database Instance': orcl.127.55.199 . I can also see 'OracleOraDb11g_home1TNSListener' in the Services control panel in running state.
1) I need to be able to create a new Schema in the default database. How do I do that using the Oracle Enterprise Manager or anything else?
2) How can connect to that schema from another computer, say a Windows 7 workstation? I am able to see the VM running the Oracle server and I am even able to make a connection but I get an error like '12541 no listener'. I am pretty sure I have the Oracle client software installed. Do I need to create a TNS file? I am using Direct Connection.
Thanks!
Never mind:
I got this all to work. Here are some brief notes:
1) Used Oracle Database Configuration Assistant (ODCA) to create a database
2) Used Oracle NET Manager to Create a Listener
3) Restarted Oracle Listener Service
4) Used Oracle Enterprise Manager in localhost environment to create Users--which seem to be the same as Schema--thanks #Leo for your input in the Comments!
Everything works now!
Hope this helps someone.

Resources