code: public RemoteDatabase getRemoteDatabase()
          throws RemoteException
      {
          if (m_remoteDatabase != null)
              return m_remoteDatabase;
          try {
              if (this.getTableCount() == 0)
                  return null;    // Never
              ClientTable table = (ClientTable)m_vTableList.get(0);
              RemoteTable tableRemote = table.getRemoteTable();
              if (tableRemote != null)
              {
                  synchronized (this.getSyncObject(tableRemote))
                  {   // In case this is called from another task
                      // Move these properties up in case they are in the environment properties.
                      Map<String,Object> propDatabase = BaseDatabase.addDBProperties(this.getProperties(), this, null);
                      BaseDatabase.addDBProperty(propDatabase, this, null, this.getDatabaseName(false) + BaseDatabase.DBSHARED_PARAM_SUFFIX);
                      BaseDatabase.addDBProperty(propDatabase, this, null, this.getDatabaseName(false) + BaseDatabase.DBUSER_PARAM_SUFFIX);
                      m_remoteDatabase = tableRemote.getRemoteDatabase(propDatabase);
                  }
              }
              if (m_remoteDatabase != null)
              {
                  synchronized (this.getSyncObject(m_remoteDatabase))
                  {   // In case this is called from another task
                      m_remoteProperties = m_remoteDatabase.getDBProperties();
                  }
              }
          } catch (RemoteException ex)    {
              Utility.getLogger().warning("dbServer exception: " + ex.getMessage());
              throw ex;
          } catch (Exception ex)  {
              ex.printStackTrace();
          }
          return m_remoteDatabase;
      }
docs: Open the remote database.
  @param environment The remote server object.
  @param The user id/name (recommended on the initial server open).
  @return The RemoteDatabase.