Comments
7 comments
- 
                
                   Hi Joerg, Hi Joerg,
 Thanks for your post.
 Taking you up on your offer for extra info:
 1. Do you have permissions set for your sqlnet.ora?
 2. Can you tell us the path of where your tnsnames.ora and sqlnet.ora files are kept?
 3. Can you connect to your databases via manual connection?
 Thanks,
 Alice.
- 
                
                   The tnsnames.ora file is at path The tnsnames.ora file is at path
 C:\Oracle\product\11.1.0\client_1\Network\Admin
 SQL developer tool and our .Net application works fine with the tnsnames.
 The stack trace is
 Application does not support just-in-time (JIT)
 debugging. See the end of this message for details.
 ************** Exception Text **************
 System.ArgumentException: An item with the same key has already been added.
 at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
 at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
 at RedGate.Oracle.Utils.TNSNames.GetTNSEntriesFromFile(String tnsNamesPath)
 at RedGate.Oracle.Utils.TNSNames.GetTNSEntries(String oracleHome)
 at RedGate.Oracle.Comparison.UI.Controls.DataSourceControls.TnsConnection.a(Object , EventArgs )
 at System.Windows.Forms.Control.OnTextChanged(EventArgs e)
 at System.Windows.Forms.ComboBox.OnTextChanged(EventArgs e)
 at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
 at RedGate.Oracle.Comparison.UI.Controls.DataSourceControls.TnsConnection.LoadDefaults()
 at RedGate.Oracle.Comparison.UI.Controls.DataSourceControls.LiveDataSourceControl.LoadDefaults()
 at RedGate.Oracle.Comparison.UI.Controls.DataSourceControls.DataSourcePicker.LoadDefaults()
 at ai..ctor(Project project, aj pct, Boolean newProject, Boolean forceRecompare)
 at bi.a(aj , Project , Boolean , Boolean , Boolean , Predicate`1 )
 at bi.New()
 at bE.i(Object , EventArgs )
 at System.Windows.Forms.Form.OnShown(EventArgs e)
 at System.Windows.Forms.Form.CallShownEvent()
 at System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)
 at System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
 at System.Threading.ExecutionContext.runTryCode(Object userData)
 at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)
 at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
 ************** Loaded Assemblies **************
 mscorlib
 Assembly Version: 2.0.0.0
 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
 CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
 RedGate.Oracle.Compare.UI
 Assembly Version: 1.0.0.397
 Win32 Version: 1.0.0.397
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/RedGate.Oracle.Compare.UI.exe
 System.Windows.Forms
 Assembly Version: 2.0.0.0
 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
 System
 Assembly Version: 2.0.0.0
 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
 System.Drawing
 Assembly Version: 2.0.0.0
 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
 Ninject.Core
 Assembly Version: 1.0.0.82
 Win32 Version: 1.0.0.82
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/Ninject.Core.DLL
 RedGate.Shared.Controls
 Assembly Version: 8.0.0.24
 Win32 Version: 8.0.0.24
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/RedGate.Shared.Controls.DLL
 DevExpress.Utils.v7.2
 Assembly Version: 7.2.4.0
 Win32 Version: 7.2.4.0
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/DevExpress.Utils.v7.2.DLL
 RedGate.Oracle.ObjectModel
 Assembly Version: 1.0.0.397
 Win32 Version: 1.0.0.397
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/RedGate.Oracle.ObjectModel.DLL
 RedGate.Shared.Utils
 Assembly Version: 8.0.0.21
 Win32 Version: 8.0.0.21
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/RedGate.Shared.Utils.DLL
 RedGate.Oracle.Compare.EngineController
 Assembly Version: 1.0.0.397
 Win32 Version: 1.0.0.397
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/RedGate.Oracle.Compare.EngineController.DLL
 DevExpress.XtraBars.v7.2
 Assembly Version: 7.2.4.0
 Win32 Version: 7.2.4.0
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/DevExpress.XtraBars.v7.2.DLL
 DevExpress.XtraEditors.v7.2
 Assembly Version: 7.2.4.0
 Win32 Version: 7.2.4.0
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/DevExpress.XtraEditors.v7.2.DLL
 DevExpress.Data.v7.2
 Assembly Version: 7.2.4.0
 Win32 Version: 7.2.4.0
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/DevExpress.Data.v7.2.DLL
 ActiproSoftware.UIStudio.Dock.Net20
 Assembly Version: 2.0.77.0
 Win32 Version: 2.0.77.0
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/ActiproSoftware.UIStudio.Dock.Net20.DLL
 ActiproSoftware.Shared.Net20
 Assembly Version: 1.0.85.0
 Win32 Version: 1.0.85.0
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/ActiproSoftware.Shared.Net20.DLL
 ActiproSoftware.WinUICore.Net20
 Assembly Version: 1.0.85.0
 Win32 Version: 1.0.85.0
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/ActiproSoftware.WinUICore.Net20.DLL
 System.Xml
 Assembly Version: 2.0.0.0
 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
 System.Design
 Assembly Version: 2.0.0.0
 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Design/2.0.0.0__b03f5f7f11d50a3a/System.Design.dll
 DevExpress.XtraGrid.v7.2
 Assembly Version: 7.2.4.0
 Win32 Version: 7.2.4.0
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/DevExpress.XtraGrid.v7.2.DLL
 System.Data
 Assembly Version: 2.0.0.0
 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
 CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
 RedGate.Oracle.Utils
 Assembly Version: 1.0.0.397
 Win32 Version: 1.0.0.397
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/RedGate.Oracle.Utils.DLL
 RedGate.Update.Client
 Assembly Version: 2.2.0.3
 Win32 Version: 2.2.0.3
 CodeBase: file:///C:/Program%20Files/Red%20Gate/Schema%20Compare%20for%20Oracle%201/RedGate.Update.Client.DLL
 System.Web.Services
 Assembly Version: 2.0.0.0
 Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
 CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Services/2.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll
 ************** JIT Debugging **************
 Application does not support Windows Forms just-in-time (JIT)
 debugging. Contact the application author for more
 information.
- 
                
                   Thanks for the stack trace. Thanks for the stack trace.
 Do you have multiple entries in your tnsnames.ora with the same identifier?
- 
                
                   Answers to your questions: Answers to your questions:
 For testing I've set permissions for everyone. This should not be a problem.1. Do you have permissions set for your sqlnet.ora?
 My Files are in the first home C:\ORANT\NETWORK\ADMIN.2. Can you tell us the path of where your tnsnames.ora and sqlnet.ora files are kept?
 Yes, I've no problems using .net Code or Tools like Sql Developer.3. Can you connect to your databases via manual connection?
 I've played with your Dlls to reproduce the error.
 The code fills a Comboxbox with the Values of "RedGate.Oracle.Utils.GetOracleHomes()" and selects the first index.
 This causes the call to the method "RedGate.Oracle.Utils.TNSNames.GetTNSEntries(string oracleHome)" (in my case c:\orant\network\admin).
 When I call this method via my own application, the error could be reproduced.
 When I try to call the method "GetTNSEntriesFromFile" with the path "c:\orant\network\admin\tnsnames.ora" manually, the list is successfully filled.
 Maybe there is an error with the path in the function "GetTNSEntries" in combination with my first home?
 Please let me know if this helps.
 Best regards,
 Joerg
 UPDATE:
 I've tried to check what goes on in the named methods with reflector.
 It seems that the method "GetTNSEntriesFromFile" gets the value of the registry key from my first Oracle Home without the path to the tnsnames.ora and tries to open the path instead of the file.
 Maybe thats the problem with the "access denied" error.
 UPDATE2:
 I've updated the TNS_ADMIN Key to include the file "tnsnames.ora" and then the app starts up.
 Maybe I've a corrupted regitry keys but the problem is solved so far.
- 
                
                   I am getting the same error. I went through my tns file and there is no duplicate keys. I am curious as to what was meant by updating the TNS_ADMIN key to include the name of the file? Where is this key located? I am getting the same error. I went through my tns file and there is no duplicate keys. I am curious as to what was meant by updating the TNS_ADMIN key to include the name of the file? Where is this key located?
- 
                
                   bcpreece wrote:I am getting the same error. I went through my tns file and there is no duplicate keys. I am curious as to what was meant by updating the TNS_ADMIN key to include the name of the file? Where is this key located? bcpreece wrote:I am getting the same error. I went through my tns file and there is no duplicate keys. I am curious as to what was meant by updating the TNS_ADMIN key to include the name of the file? Where is this key located?
 I meant the registry key "TNS_ADMIN" in "HKLM\Software\Oracle\KEY_YourOracleHome" to include the complete path to the tnsnames.ora.
 In my case, there was only the path to the folder "c:\orant\network".
 After I added the path to filename, the key value is now "c:\orant\network\admin\tnsnames.ora".
- 
                
                   We've just released the latest build of Schema Compare for Oracle which addresses a number of issues surrounding database connections. We've just released the latest build of Schema Compare for Oracle which addresses a number of issues surrounding database connections.
 If you're experiencing problems in this area, please try out the latest build and let us know if it helps!
 More info and download link here:
 http://www.red-gate.com/messageboard/vi ... hp?t=10147
Add comment
Please sign in to leave a comment.
thanks for the release of this promising tool.
I've downloaded it and installed it. At the start of the tool, an error dialog is shown that stated, that there is no access to my oracle home directory.
As the CallStack shows, there was no access to the tnsnames.ora.
I've set extra permissions to everyone but no success, the error message still pops up.
Do you need some extra information? Do you create some log files that i can send you?
I would like to have some testing on the tool.
Thanks in advance,
Joerg