Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
MicroStation Wiki Unable to connect to an Oracle Database
    • Sign In

    • +MicroStation Wiki
    • -Administration Wiki
      • Adding "Display Style List" to custom Toolbox
      • +Administration - Legacy Content
      • Answers for the Levelly Challenged
      • Batch Convert Utility
      • Bentley Tablet Driver And CalComp DrawingBoard
      • Bypassing Port Problems In Windows 2000 And Windows XP
      • Cannot find survey ft option in Design File Settings > Units
      • Configuration Variable Processing
      • Configuration Variables In MicroStation V8
      • Creating Tool Icons
      • Customize item missing from Workspace menu
      • Customize Toolbox - Tool opens new Toolbox
      • DGN file association in Windows 10 (MicroStation Does not appear in list)
      • DGN Index Service - How to set up
      • DGN Index Service Setup ended prematurely – error 1603
      • Enabling Lock Pages In Memory Under Windows 7 and Vista
      • Error - Cannot locate a default SHX font. Please install msdefault.shx
      • Error - Unable to load/create dialog item of type 'IconCmd', id
      • Error 1402. Could not open key
      • Error 1603 during install
      • Error 1610 during install
      • Error 1625 during install
      • Error message when starting MicroStation, "ucf not found"
      • File Associations
      • File Correction and Audit Tools
      • Getting Started With The Standards Checker
      • Haven't Upgraded To The MicroStation V8 Format Yet
      • How to Back Up and Restore User Preferences
      • How to Copy User Preferences and User Configuration Files to a new or different PC
      • How to quickly add a number of folders to Microstation's reference files search paths
      • How To Reset User Preferences and Delete MicroStation's Temporary Files
      • Installing MicroStation V8 XM Edition silently
      • Installing MicroStation V8i (SELECTseries 3) Without an Internet Connection
      • Installing MicroStation V8i silently
      • Is there any easy way to determine key-ins or variable names?
      • Key-in command to define different pattern setting options
      • Keyin to encrypt dgn files
      • MicroStation - Creating a Custom Colour Book
      • MicroStation Command Line Options And Switches
      • MicroStation Failed to Start
      • MicroStation file access issues with shared network drives
      • MicroStation Memory Management
      • +MicroStation V8i Variables
      • MicroStation Virtualization FAQ
      • Migrating Customizations to MS V8i
      • Migrating Customizations to MS XM
      • MSDebug File
      • MSXML Issue
      • Networking Workspaces
      • Networking Workspaces the easy way
      • New Variables
      • Overriding And Resynchronizing Level Attributes
      • Restore MicroStation to Factory defaults
      • Script error during MicroStation Installation
      • Serving Up Efficiency
      • Sharing Your Workspace
      • System Fault 5 MDL abort in DITEMS
      • The Power Of The Workspace
      • To also see hidden Config-Variables
      • Unable to connect to an Oracle Database
      • Understanding File Locations And Reference Attachments In MicroStation
      • Updating To MicroStation V8 Format
      • Upgrading From 08.09.02.52 To 08.09.02.77
      • Windows Explorer ProgramData folder
      • Workmodes DGN/DWG
      • Workspaces on the Network
    • +Annotations Wiki
    • +Bentley View Wiki
    • +MicroStation PowerDraft
    • +Programming Wiki
    • +Visualization Wiki

     
     Questions about this article, topic, or product? Click here. 

    Unable to connect to an Oracle Database

       
      Applies To 
       
      Product(s): MicroStation
      Version(s): V8i
      Environment:  N/A
      Area:  Database
      Subarea:  Oracle
      Original Author: Carlos Martins, Bentley Technical Support Group
       

     

     

     

     

     

     

      

    This technote presents a number of known issues that cause connection failure when trying to establish
    a connection to an Oracle database from within MicroStation using the Oracle direct connection.

    The MicroStation Connect to Database tool is used to connect to an external database. To connect
    to an Oracle database using the Oracle direct connection (Oracle tab) set the Database Server to Oracle. In the Connect String field the connection statement has the following syntax: <user_name>/<password>@<database_alias>.


    The table below identifies situations where the connection with the database fails. The Oracle error codes shown are messages exposed in the MicroStation debug session. These error codes may prove to be a basis to resolve the connection failure problem.

    Problem

    Setup*

    MicroStation Message Center

    MicroStation Database Debug
      Session
    **

    Possible reasons

    Solution***

    Unable to
      connect when using Oracle 10g Client

    Client:  10g

    Server:
      10g or 11g

    Unsuccessful
      CONNECT statement

    Database:
      NONE

    ORA-12154: TNS: could not resolve
      the connect identifier specified

    Oracle
      10g client does not support the parenthesis present in the path of the
      MicroStation default root installation directory. The MicroStation default
      installation directory (MSDIR variable) is

    C:\Program
      Files\Bentley\MicroStation V8i (SELECTseries)\MicroStation

    Install
      Oracle 11g Client or alternatively Install MicroStation V8i removing the
      parenthesis from the installation path

    Unable to
      connect

    Any
      combination of Oracle 10g and 11g

    Unsuccessful
      CONNECT statement

    Database:
      NONE

    ORA-12170: TNS: Connect timeout
      occurred

    Network
      issues or the possibly of the machine hosting the Oracle Server blocking the
      connection port

    Connectivity
      on an I/O port is required. On Windows Servers in most cases TCP/IP port 1521
      is the standard port used.

    Unable to
      connect

    Any
      combination of Oracle 10g and 11g

    Unsuccessful
      CONNECT statement

    Database:
      NONE

    ORA-12154: TNS: could not resolve
      the connect identifier specified

    Wrong
      database_alias / service_name has been specified in the connect string

    Specify
      the correct name of the database service in the connect string: <user_name>/<password>@<database_alias>

    Unable to
      connect

    Any
      combination of Oracle 10g and 11g

    Unsuccessful
      CONNECT statement

    Database:
      NONE

    ORA-01017: invalid username/password; logon denied

    Incorrect
      user or password specified

    Specify
      the correct user and password in the connect string: <user_name>/<password>@<database_alias>

    Unable to
      connect

    Any
      combination of Oracle 10g and 11g

    Unsuccessful
      CONNECT statement

    Database:
      NONE

    ORA-12541: TNS: no listener

    TNSListener
      service is stopped

    A
      listener is a service that is configured for a specific I/O port and network
      protocol. It listens on a port for incoming and outgoing requests and routes
      them to the instance. The service must be running at the server end

    Unable to
      connect

    Any
      combination of Oracle 10g and 11g

    Unsuccessful
      CONNECT statement

    Database:
      NONE

    ORA-12514: TNS:listener does not
      currently know of service requested in the connect descriptor

    Listener.ORA
      may contain for example the IP address despite the TNSNames.ORA being define
      with the computer name

    Specify
      in Listener.ORA the computer name

     

     * Note 1: Even on a Windows 64 bit based Operating System, Oracle Client 32 bit must be installed since MicroStation is a 32 bit application.

     ** Note 2: By default one cannot debug database connection issues because the key in command session debug [on/off] is only available after completion of the database connection, when the server.ma is loaded. To workaround this set MS_SESSION_DEBUG=1, if this variable is set either at the Environment Level or as a
    MicroStation Configuration variable, Session Debug information will begin populating the message window as soon as the first database operation is executed and thus one can debug connection issues. The debug session can be captured to a file using the key in command dmsg openmsgfile path/filename.txt, after concluding the action to be debugged key in command dmsg closemsgfile.

     *** Note 3: The assistance from a database administrator may be needed in some instances since access to the machine that hosts the Oracle server may be required.
     

    Multiple Oracle Clients

    If you have multiple Oracle clients installed on your system, ensure that the correct Oracle client files are used to connect to Oracle by setting the configuration variable MS_ORACLE_HOME in the configuration file "..\Bentley\MicroStation<version>\MicroStation\config\database\oracle.cfg".

    If this variable is not set, MicroStation looks at the system registry and path to determine the Oracle Home directory. In that situation the environment variable “PATH” defines which Oracle Client version that will be used by MicroStation. The Oracle client version listed first by the Environment variable “PATH” will be the one used by MicroStation. To verify the list order simply type ‘path’ from a DOS command prompt as exemplified in the image below. The PATH” variable can be modified in Advanced System Settings.

     

    See Also

    MicroStation V8i Supported Database List

    Session Debug and Logging Database Commands

    • MicroStation V8i
    • Database
    • Share
    • History
    • More
    • Cancel
    • Dan Koval Created by Bentley Colleague Dan Koval
    • When: Tue, Sep 3 2013 10:11 AM
    • Conor K Last revision by Conor K
    • When: Thu, Oct 3 2013 9:13 AM
    • Revisions: 2
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies