TimesTen JDBC URL format without DSN - jdbc

I would like to ask what should be the format of JDBC URL when I know the server OP, port, user and password. I cannot use ODBC (DSN).
I have tried: jdbc:timesten:client://<server>:<port>/<db>, but it is not working.

Even though I could not find it anywhere I was able to get it working by trying huge amount of options. To save others some time, here is what worked for me.
jdbc:timesten:client:TTC_SERVER=<server>;TCP_PORT=<port>;TTC_SERVER_DSN=<DB name>;

Related

Delphi TsqlConnection error password will expire

I have one problem with TSQLConnection component. I use it to connect Oracle SQL database, everything was good, but now I get that error " the password will expire within 7 days", I know this is SQL warnings, but when I use oracle session component for connect to database I did not get that error. Please help me, it is very important for me. My program must work :( I will wait you, thanks in advance.
I'm not familiar with Delphi, but am very familiar with the reported error message."the password will expire within 7 days", is an ORA-28002. If you only get that when connecting from MSSQL (via a linked server) but not when connecting directly to Oracle, then I'd be very confident that the oracle username defined with the linked server is NOT the same as you are using for a direct connection. You need to show us the username that is used by the linked server, and then the output of (connected directly to oracle as a user with DBA credentials)
select username,
account_status,
to_char(lock_date,'dd-Mon-yyyy hh24:mi:ss') as lock_date,
to_char(expiry_date,'dd-Mon-yyyy hh24:mi:ss) as expiry_date
from dba_users
where username='USER_IN_QUESTION';
obviously substituting your real user in question.
I've written about expiring passwords here: I'm pretty sure a lot of it will be applicable to your situation.

How to replicate existing OracleRDB ODBC connection in Oracle's SQL Developer application?

I am new to Oracle database in general, but I'm attempting to get Oracle's SQL Developer running on a workstation that has pre-configured System DSNs created for an OracleRDB database. I've confirmed the ODBC connections are working because I can use MS Access to connect and link to the tables. The "test" options within ODBC also succeed. Now I am trying to get a similar connection created using SQL Developer so I can see the column types and write queries in a more useful editor.
Here's what I have available when examining the ODBC connection properties:
Now I'm trying to create a duplicate connection in SQL Developer, but I'm at a loss for why things don't work. I first tried using the default SQL Developer installation, but couldn't get things working. Then I discovered there's an OracleRDB extension available, so I installed that, but I keep getting this error when attempting to use similar values:
As I stated, these ODBC connections were pre-configured on the workstation I'm using, so I don't know anything more than what is provided by the Oracle ODBC driver window.
Is there something obvious I'm not seeing or doing to replicate this connection in SQL Developer? Or perhaps something else I can do to debug this to learn more?
UPDATE
On the advice of one answer I'm trying to make the connection with JDBC, but having a hard time understanding what I'm doing wrong. Here's another screenshot with the connection parameters I have available, but with the server and database names changed:
With these values (the port came from my tnsnames.ora file), if I try to make a JDBC connection I keep getting the following error from SQL Developer:
One final attempt I did was to use the proper values in the Oracle RDB tab, and when I use them and click 'test' the Testing Connection dialog just spins and never seems to return:
So I apologize for the long post here, but I'm struggling because there's just something I am really not understanding about how this all works. I appreciate everyone who took the time to read this question.
Oracle SQL Developer is a Java Application. You'll need to get the JDBC Driver for RDB.
Once you have that, in the SQL Developer preferences, find the Third Party JDBC section, and then use that to add an entry and point to the JAR for what you just installed.
Step by step instructions here.
Working connection string for RDB Thin Driver:
RDB_DB_CONN_STR = "jdbc:rdbThin://node.myplace.com:1707/";
where node.myplace.com is the name of the OpenVMS node hosting the RDB Thin Driver, 1707 is the port number assigned to the RDB Thin Driver.

Jetbrains Datagrip cannot connect sql server without specify database

i try to use Datagrip as my primary sql server query tools, bit i meet a problem that i can not move forward.
When i setup the project data source, i have to choose a Database, otherwise it will goto the default tempdb, how i can work like sql server management studio, that i can see all database list.
i have tried both jTds and Microsoft drivers, both not works.
or can i choose multi-database? i do not want to create one data source for one database.
if i connect to mysql, it works like expected.
tks
It is possible to connect without specifying the database. Just leave this field blank. After entering other settings (host, port, user, password), go to Schemas tab in Data Source properties and select all the Databases and schemas you want to work with. Then invoke Synchronize action for this Data Source in Database tool window.
DataGrip 2016.2 EAP claims to have support for showing multiple databases. See https://blog.jetbrains.com/datagrip/ and find for "Database View". Unfortunately, as of the date I'm writing this, it doesn't seem to work at all.
Unfortunately, Andrey's suggestion did not work for me.

Seting Schema for HSQLDB in JDBC connection

How does one set the schema for HSQLDB in the JDBC URL itself.
Kinda how you can do in MySQL with jdbc:mysql://localhost:3306/
-EDIT-
My current DB url looks like this
jdbc:hsqldb:file:C:\\hsqldb\\dbname
Also inside the dbanme there is a schema newSchema, which can be set using
set schema newSchema,
how do i do this using the jdbc URL itself.
have you already tried the standard protocol?
"jdbc:hsqldb:hsql://[HOST]:[PORT]/myDBName"
How are you trying to connect? through a standalone app or by creating a resource?
You might have seen this but still check here if not done:
http://hsqldb.org/doc/2.0/guide/dbproperties-chapt.html#dpc_connection_url
I think need to specify the port number like as shown //192.0.0.10:9500
UPDATE:
I have been doing some more testing. The suggested solution appears to be ineffective.
For example; if I set the schema to Test I still may not use SQL on tables in that schema. Essentially that extra stuff I put in there has no effect, even though I thought it was OK.
select * from BOOKMARKS;
SEVERE SQL Error at '<stdin>' line 5:
"select * from BOOKMARKS"
user lacks privilege or object not found: BOOKMARKS
SquirrelSQL has an option for an initial schema, so queries there work OK. The sqlTool accepts the URI but doesn't change/select the schema. It is slightly frustrating that I can't see HOW to report the current schema name in use btw.
So this answer doesn't solve the problem; I'm leaving it here because it will save the next person time when they find a good answer to the challenge.
back to the drawing board ...
original suggestion ...
I'd like to do this too. For example with mysql the example is:
mysql -h hostname:port schema
The port number, being one port per database. Now in HSQLDB, the URL is one database within a Catalog (that's how they spell it). Here's the solution I came-up with. I have ...
databsee: dev
schemas
public
test
In my RC file, ~/.config/sqltool.rc ...
urlid dev_test
url jdbc:hsqldb:hsql://localhost/dev;set schema test;
username programmer
password secret
I can use the connection ID dev_test to link to the test schema, the normal default is public. And you can run the sql tool with:
java -jar /usr/lib/hsqldb/lib/sqltool.jar --rcFile=~/.config/sqltool.rc dev_tmp
That approach worked with a Groovy Sql connection:
url: 'jdbc:hsqldb:hsql://localhost/dev;set schema test',
...
Worked just how I'd want it. So what I can do is append the schema I want to that URL connection string string. It may no be the solution but it will do what you describe.
Looking at the connection protocol: there is NO option for a schema nor for a catalog. So catalog will be part of your URL, eg. if you use a file base database, that is one catalog.

Oracle Connection String With Windows Authentication

We have a requirement to make our products work on Oracle as well as SQL Server (around which they were originally built). Unfortunately we don't have any in house Oracle development experience to speak of but as a senior dev it has fallen to me to lead the project. So far I have managed to make our app connect to an Oracle database (I'm using Oracle XE 11.2) by using the following connection string:
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=VS010-ORA11GR1)(PORT=1523))(CONNECT_DATA=(SERVICE_NAME=DEVORA)));User Id=dbo;Password=dbo;
The reason we decided to use this type of connection string is because we do not want to rely on changing tnsnames.ora on every client machine. However, as you can see this specifies an Oracle user and associated password. We also need to provide the ability to use the equivalent of SQL Server integrated security.
According to the literature I have read, to do this I simply need to specify / as the user id and then omit the password portion (as this is ignored anyway for Windows authentication). I also created the user in Oracle, making sure it matched the Windows user, with the following snippets:
CREATE USER "OPS$<DOMAIN>\<user>" IDENTIFIED EXTERNALLY;
GRANT CONNECT,RESOURCE TO "OPS$<DOMAIN>\<user>";
I also checked that the sqlnet.ora file on my local machine which hosts the XE instance and my dev environment contained the line:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
I understood that this would enable my app to connect to the Oracle database uing Windows Authentication. However what actually happens is that I get the following Oracle error message:
ORA-01005: null password given; logon denied
this doesn't make much sense because of course its null - it's supposed to be, according to the tutorials I've read.
The app targets .Net Framework 3.5, we are using the System.Data.OracleProvider and the actual connecting and so on is handled by Enterprise Library 5. Incidentally, I am aware of the deprecation of the OracleClient component but I just want this to work before I go into the extra complexities of changing providers.
Can anyone tell me what I'm missing? Have I chosen the wrong type of connection string? I apologise for any basic mistakes but I have always managed to avoid Oracle until now so my knowledge of it is close to zero.
Many thanks
I had the same problem and solved after adding this to conn. string:
Integrated Security=yes
To expand on the answer above by #Stikut. I tested this out with NHibernate 3.3.3.GA and it works.
user id=/;password=;Integrated Security=yes

Resources