Hi
Toad for Oracle latest version: 13.2.0.258
I have 2 problems with direct connections. Bear in mind these problems have been present quite long time (several years at least), so it is not a new problem, to me at least, I just didn't have time to report it before.
Just to clarify, I have the following host, listener up and running
- Hostname=oracledb1
- Port=1521
- ServiceName=orcl
- SID=orcl1
Problem 1:
I add new connection to toad using service name. I test the connection, success, then I close toad, and after that Connections.xml file has been modified, and the following record is present there:
<Host>oracledb1</Host> <Sid>orcl</Sid> <Port>1521</Port> <ConnectionType ServiceName="True">Direct</ConnectionType>
Note that ServiceName="True".
After starting toad again, I can successfully:
- Connect to it
- Test the connection from the "Test Connections" button
- Test the connection from "Edit Login Record" pop-up and connect from there
Now, let's say I want to change the described login record to use SID instead of the ServiceName.
I click "Edit Login Record" and change 2 things:
- Change radio button from "Service Name" to "SID"
- Change ServiceName to SID, so "orcl -> orcl1"
Next, I will click "Test", it says passed, next I will click "OK" button. But from connections view I still can see that the login record is not changed. It still uses ServiceName (radio button is unchanged and still it says "orcl").
Now if I edit this login record again, I can see from there also, that indeed all my changes are lost.
Bear in mind that, if I edit this record, and check this box "Connect" and click "OK", then it will connect fine, but after connecting to it, I can see from present connections, that it still shows me like I am using ServiceName.
And If I for example close toad, and check Connections.xml file, it is modified again, and the file still has the same parameters for this connection:
<Host>oracledb1</Host> <Sid>orcl</Sid> <Port>1521</Port> <ConnectionType ServiceName="True">Direct</ConnectionType>
To sum up: So basically, login record cannot be changed from ServiceName to SID. All changes are lost. It seems like radio button always defaults back to "ServiceName".
NOTE: But If I do this other way, so that I have created connection using SID. And then edit this connection from SID to ServiceName, then it will create entirely new connection record from this. So after this, I have 2 connections present, one for SID, and other one for ServiceName. And I can connect to both of these.
(well, I can't test SID connection, but it connects just fine, I will describe this issue in Problem 2)
Perhaps editing ServiceName to use SID, has to function same way, that there should be entirely new connection created..? I do not know that.
Problem 2.
If I create new connection using SID, close toad, after that I can see this connection record from Connections.xml file:
<Host>oracledb1</Host> <Sid>orcl1</Sid> <Port>1521</Port> <ConnectionType ServiceName="False">Direct</ConnectionType>
Note that ServiceName="False", and I have presented "orcl1" there.
Now I open toad again, this connection is present there, radio button is on SID, and name is "orcl1". All good so far.
Now, from all the connections I can connect to it just fine.
But if I select the connection and:
- click "Test Connections" button
- or click "Edit Login Record" and click "Test" from there
From both of these, I get:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
But I can connect to it just fine.
To sum up: So to make long story short, all the connections created using SID, cannot be tested at all. Although it connects to these connections just fine.
Note that, if I click "Edit Login Record", the radio button has been defaulted back to "Service Name". I have tried, even if I change it back to SID, I still get ORA-12514.
At that time, if I haven't clicked OK from "Edit Login Record" pop-up, then Connections.xml still shows:
<ConnectionType ServiceName="False">Direct</ConnectionType>
But if I edit login record, and I do not change anything, but just click OK (note that, radio button defaults always to "Service Name"), then after closing toad, the following boolean has been changed to true:
<ConnectionType ServiceName="True">Direct</ConnectionType>
This means, that this connection is entirely broken (since orcl1 is SID), because in Connections.xml it has these settings:
<Sid>orcl1</Sid> <ConnectionType ServiceName="True">Direct</ConnectionType>
Well it got quite long topic, but I hope that it will help narrowing down these issues.
Feel free to ask any questions, if something is not clear.
Regards
Raul