Finding out source database & schema

Hi All ,
I am logged on to Oracle thru PL/SQL. how can i actually find out which database & schema am i on ?
appreciate ur advice
tks & rdgs

Well, a schema is essentially the set of database objects owned by a user, so in that sense they are identical. However, it is not always the case that because you are logged in as a user that you are actually referring to that user's schema.
SQL> show user
USER is "OPS$ORACLE"
SQL> DESC xx
ERROR:
ORA-04043: object xx does not existI have no object named xx, but someone does, and I have at least select privileges on it:
SQL> DESC finance_o.xx
Name                                      Null?    Type
ID                                                 NUMBERso, if I want to work with several objects in the finance_o schema without having to always use owner.name, I can either create a bunch of synonyms, or do:
SQL> ALTER SESSION SET CURRENT_SCHEMA=finance_o;
Session altered.
SQL> desc xx
Name                                      Null?    Type
ID                                                 NUMBERNow, any unqualified object names are looked for first in the finance_o schema. I still cannot see any of finance_o's objects that I do not have permissions on.
John

Similar Messages

  • I am in sql plus how do I find out what database I am in?

    I am in sql plus how do I find out what database I am in? is there a sql command for that...

    select name from v$database;
    or
    select sys_context('userenv', 'DB_NAME') from dual;

  • Find out the database port

    Hi,
    i test my database with a connect from the programm SQL*PLUS. Here I need no port. Now I want to test ist with the SQL Developer. Here I need the database port. I don't know the database port. Can you tell me how I can find out the database port?

    At a command prompt type tnsping database. That will display the tns connection details which includes the port number.
    Or you could look in tnsnames.ora which is probably in <ORACLE_HOME>\network\admin.
    Or you could use the tns connection type in sqldeveloper which picks up the details from tnsnames directly.
    Message was edited by:
    smitjb

  • To Find out Source datastore in ODI interfaces using SNP tables

    Hi,
    Could you please let me know how to find out Source datastore(s) in ODI interfaces using SNP tables ?
    Regards,
    Rashmik

    Please use below query...Just pass the interface name..
    SELECT C.TABLE_NAME AS "Target Table Name",
         A.COL_NAME AS "Target Field Name",
         Wm_Concat(G.SOURCE_DT) AS "Target Data Type",
         Wm_Concat(G.LONGC) AS "Target Data Length",
         Wm_Concat(TXT) AS "Transformation Rule",
         Wm_Concat(DISTINCT F.TABLE_NAME) AS "Source Table Name",
         Wm_Concat(D.COL_NAME) AS "Source Field Name",
         Wm_Concat(D.SOURCE_DT) AS "Source Data Type",
         Wm_Concat(D.LONGC) AS "Source Data Length"
    FROM
         SNP_POP_COL A JOIN SNP_TXT_CROSSR B ON A.I_TXT_MAP=B.I_TXT
         JOIN SNP_POP C ON A.I_POP=C.I_POP
         JOIN SNP_TXT E ON A.I_TXT_MAP=E.I_TXT AND B.I_TXT=E.I_TXT
         LEFT OUTER JOIN SNP_COL D ON B.I_COL=D.I_COL
         LEFT OUTER JOIN SNP_TABLE F ON F.I_TABLE= D.I_TABLE
         LEFT JOIN SNP_COL G ON A.I_COL=G.I_COL
    WHERE POP_NAME = 'XXXXXXX'
    GROUP BY C.TABLE_NAME,A.COL_NAME ORDER BY 1
    Edited by: KaushikPatel on Apr 18, 2013 6:52 AM

  • How do I find out my Database name

    Hi All,
    I have recently installed Oracle 10g Express Edition for Windows. Its working well but when I tried to login into my Oracle Discoverer Administration, I was asked to type in the database name in the connect filed.
    Can anyone tell me if I can use Disco Administration with Oracle 10g Express Edition? Also how do I find out my database name in the TSN file.
    Your reply would highly appreciated.

    Hi,
    The "Database Name" is actually your Database SID or the Service Name. If you have installed XE, it would be XE by default. You can check this out in Control Panel -> Services - you will notice an ORCL Service with the name appended with XE.
    XE does not come with the OLAP or Data Mining or Partitioning options & you can't use Oracle Discoverer OLAP. You can have a look at a post on the Oracle Business Intelligence Blog for more information :-
    http://oraclebi.blogspot.com/2005/11/oracle-xe-database-and-discoverer-1.html
    Regards,
    Sandeep

  • How does one find out the database name , service name in a database

    hi,
    how do u find out the database name , service name , SID in a database.
    Please reply.
    Thanks ,
    Regards,
    RC

    This particular information is available in the view V_$PARAMETER owned by SYS. But you can also login with Server Manager as user INTERNAL and run:
    SHOW PARAMETERS
    The entries pertaining to the naming of the database are:
    1. db_name
    2. db_domain
    3. db_name
    4. instance_name
    5. service_names
    GLOBAL_NAME is a static (not changing) Data Dictionary view which has just 1 attribute (column) called GLOBAL_NAME.
    When you run:
    select GLOBAL_NAME from GLOBAL_NAME;
    You are returned the full global name of the database, i.e. the db_name and the db_domain joined together by dot (.) For e.g. if your db_name = mgmt and db_domain = tech.co.in, then your global_name will be MGMT.TECH.CO.IN.
    Ciao.
    null

  • How to find out the database-size

    Hello,
    how can I find out the size of the database.
    I created the user as below. I defined the size of the database to 2MB. Now I want to know how much is the size of the database.
    CREATE USER oemer
    IDENTIFIED BY ...
    DEFAULT TABLESPACE system
    QUOTA 2M ON system;

    Actually, since Omer is a veteran poster to the Forms and Reports forums, I doubt that. I think he is making a much more interesting journey: from front-end to back-end.
    I'll be a bit more helpful this morning.
    Databases are ways of organising disk space to store data. Fundamentally they consist of OS files, data files. The RDBMS handles by grouping them into tablespaces. When we build tables we assign them to a tablespace.
    So, the size of the database is the sum of its datafiles. Of course, some tablespaces are used for sorting and holding undo information, so the size of the database for the purposes of persisting data is:
    SELECT count(x.tablespace_name) AS total_TS, sum(x.MB) AS total_mb, sum(x.free_mb) AS total_free_mb
    FROM   ( SELECT t.tablespace_name, sum(d.bytes)/1048576 AS mb, sum(f.bytes)/1048576 AS free_mb
             FROM   dba_free_space f, dba_data_files d, dba_tablespaces t
             WHERE  t.contents = 'PERMANENT'
             AND    d.tablespace_name = t.tablespace_name
             AND    d.file_id = f.file_id
             GROUP  BY t.tablespace_name ) x
    /The SYSTEM tablespace is special. It is used by Oracle to hold the data dictionary, the definitions of all the objects in the database. It should not be used for storing application objects (it affects the performance, apatrt from anything else). That is why we must not use it as a default tablespace.
    CREATE USER oemer
    IDENTIFIED BY ...
    DEFAULT TABLESPACE ts_users
    QUOTA 2M ON ts_users; Cheers, APC

  • To find out the database running in the Server

    Hi,
    How to find out the number of database running in the server other than this command : ps -ef | grep pmon
    Thanks,
    Suresh Bommalata.

    There's no single answer.
    1. What if one or more of the database instance(s) is/are down at the moment that you run "ps -ef | grep smon" ?
    2. "ps -ef" cannot be used on Windows.
    3. You could check the oratab file (the location is platform specific -- generally /opt or /var/opt or /etc on Unix/Linux) but not all databases may be registered on the oratab file
    4. You could look for the running (if any !) listener on the server and check the listener.ora listener.log file (database instances do not need to be in the listener.ora !)
    So : You have to run multiple checks.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Aug 2, 2010 3:09 PM

  • How to find out source code of portal

    Hi all,
        I'm working ECC6.0.
        In the portal there is a field managers substitute , when ever manager enteres . managers substitute name will populate.   the portal is constructed long back . it uses jsp.  I found out that portal applicarion calls from the jsp link of another server. i can view only  the application but i want to know where the souce code is available . potal calls the function module or table to get managers substite .i need to find out FM or filed name.
    thanks
    Naveen

    Hi all,
        I'm working ECC6.0.
        In the portal there is a field managers substitute , when ever manager enteres . managers substitute name will populate.   the portal is constructed long back . it uses jsp.  I found out that portal applicarion calls from the jsp link of another server. i can view only  the application but i want to know where the souce code is available . potal calls the function module or table to get managers substite .i need to find out FM or filed name.
    thanks
    Naveen

  • How to find out the database size of a portal?

    Hi all!
    How can I determine the size of the database of one portal?
    Thanks for your help!
    PM

    Hey Peter,
      Just making sure off the top... you're using the same version of Oracle on both the source ABAP system with DBA Cockpit and the target Portal, correct?
      Assuming you answered that in the affirmative, did you make an additional entry in the tnsnames.ora file on the ABAP system? This entry should reflect the target Portal database system to which your connecting. Make your change to the /oracle/<SID>/<DB_Ver>/network/admin/tnsnames.ora file. Once this is complete, copy that file to /sapmnt/<SID>/profile/oracle/tnsnames.ora.
    Test your connection again after this.
    Here's an excerpt from SAP Note 1261329:
    Set up the database connection.
    In the file tnsnames.ora that is in the directory (on the application server) to which the environment variable TNS_ADMIN refers, you must add the following entry for each Oracle remote database:
               <SID> =
                 (DESCRIPTION =
                   (SDU = 32768)
                   (ADDRESS_LIST =
                     (ADDRESS =
                      (COMMUNITY = TCP)
                       (PROTOCOL = TCP)
                      (HOST = <database_host>)
                      (PORT = <port>)
                   (CONNECT_DATA =
                     (SID = <DB_ID>)
    This means that
    <SID> = the ID that you want to use to access this database ("TNS Name")
    <database_host> = host name of the database server
    <port> = TCP port of the database listener
    <DB_ID> = database ID of the database that is to be connected
    Usually, you can copy the entry in the file tnsnames.ora from the relevant file of the remote system. To obtain the contents of tnsnames.ora in the remote system, log on to the remote system as the database user ora<sid> (UNIX or Linux) or as the database user <sid>adm (Windows) on operating system level. There, you call the following command from the command line.
    tnsping <SID>
    The output specifies the connection parameters and the path to the file sqlnet.ora. The directory in which this file is stored, also includes the file tnsnames.ora.
    If you haven't seen them before, check out that note (1261329, 1028624, and 1256322). If you've still got questions, let me know.
    -Kevin

  • How can I find out the database version from an old backupset

    Hi,
    I have to restore a database using an old backupset (4 years ago) to a new database. My challenge is we don't know what version of the database were used back then. Is there anyway I can find this information. We are using the RMAN catalog.
    Or is RMAN restore and recovery can be used to a newer version than the backupset?
    Thanks in advance.
    Regards,
    Sosan Fong

    Thanks for the reply and suggestion.
    We are using its own software for all databases hosted in the server. So I need to cleanup and reinstall after tested in 11g. A little bit more work, but if it works, that's ok. Is there any other suggestions?
    Regards,
    S

  • How to find out source qurey or query view   from portal report.

    Hi mates.
    we are using portal to display our report online. I want to kind out from portal Reports (charts or table) , which are queries or query view is used for display those portal charts or tables.we are using Lotus notes to publish web reports in Portal.
    Regards.
    hari

    Hello,
    Check these tables:
    VARI     ABAP/4: Variant storage (similar to INDX)
    VARICON     Selection variants: Content
    VARICONCI     Selection Variants: Content (Cross-Client)
    VARID     Variant directory
    VARID_CI     Variant Catalog, Cross-Client
    VARIDESC     Selection Variants: Description
    VARIDESCCI     Selection Variants: Description (Cross-Client)
    VARINUM     Internal number assignment for variants
    VARIS     Assignment of variant to selection screen
    VARIS_CI     Assignment of Variant to Selection Screen
    VARIT     Variant texts
    VARIT_CI     Variant Texts, Cross-Client
    VARK     Delivery Plan: Customer-Specific Itinerary
    VARZ     Delivery Plan: Zone-Specific Itinerary
    If useful reward.
    Vasanth

  • How to find out which database I'm connected to

    I need to use a pl/sql to determine which database I'm connected to. I'm not using forms so I cannot use a built-in. I need to know for a report I'm building, as the display differs based on the database.
    Thanks

    In order to consult V$... views a user must have a special role (SELECT_CATALOG_ROLE). This permit to the user to access also all DBA_... views. Such things could not be desired for security.

  • Need query to find out standby database sync information

    Hi All,
    Please provide me query which give me information about how many standby database configured .I need to generate report hourly sync information of database in our project. I have more than 120 production db and some db having more than one standby database.some of then at local satndby (some of database (prod) in datacenter and some of database in DR datacenter)
    Does it it possible to configure in 12c oem?.If it is possible guide me.How can I create report for all databases sync status within one report?
    Thanks
    Ganesh

    Hello;
    I like this one:
    Monitor Data Guard Transport
    Best Regards
    mseberg

  • How to find out database name

    Hi
    can anyone please tell me how i can find out the database name for oracle8i.
    thankyou very much in advance

    I'm not expert in this, but your error has TNS in it which could mean its looking for the tnsnames.ora file which in an oracle client installation contains the mappings from the database name to the server ipaddress and port number for connection to oracle. Its possible you may need an oracle client installation.
    Another way of connecting is via ODBC drivers which are configured in control panel in winnt and under computer managenent in win2000. An installation of Oracle will ususally install ODBC drivers.

Maybe you are looking for

  • Java Mapping library

    Hello all, we recently upgraded from XI 3.0 to PI 7.1. Now i want to implement a new Java Mapping, but i can't find the the library which contains the class "com.sap.aii.mapping.api.StreamTransformation". On our PI the directory under "(INSTANCE_DIR)

  • Sending the task TS00008267 to an e-mail address

    First of all Hi to all. I'm e new users of this forum. I'm from italy. I have this problem. In my travel workflow i use to send all e-mail and all work-item to the users. The system forward all task and email to the e-mail address present on the e-ma

  • Error in EM console after silent install using response file

    Hi, I'm trying to install oracle 10g release 2 (10.2.0.1.0) on RHEL 5 using a response file by the silent installation method. The response file itself had been generated by running a normal GUI based installation along with the record option. The sa

  • Jrew error when install 8i client in chinese win98

    I got the following error when installing the 817 client to chinese win98. JREW caused an invalid page fault in module JAVAI.DLL at 0167:6ee3803a. Registers: EAX=00000060 CS=0167 EIP=6ee3803a EFLGS=00000206 EBX=c0000005 SS=016f ESP=0063ebf0 EBP=0063f

  • Restoring photos from holiday

    I recently went on holiday and lost my iphone5. I now have a new iphone5 and the contacts I added to the phone which I lost on holiday are still in my contacts but none of the pictures I took are. Is there anyway I can retrieve them?