SQL script to query the entire database?

Hello

I have column names, I need to figure out what array these column names in the database.

In dev and prod table names are different. I need to understand what is the name of the table with some columns in prod that exsits in dev. Any help is appreciated.

I use

Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production

PL/SQL Release 11.2.0.3.0 - Production

CORE Production 11.2.0.3.0

Thank you.

Hello

You can query the data dictionary view dba_tab_columns.

For example, if you want to find who files an EMPNO and DEPTNO column:

SELECT master, table_name

FROM dba_tab_columns

WHERE nom_de_colonne IN ('EMPNO', 'DEPTNO')

GROUP BY master, table_name

HAVING COUNT (*) = 2

ORDER BY owner, table_name

;

Tags: Database

Similar Questions

  • script to install the entire database from scratch?

    I have Oracle database 10g and Java code to connect to the database and the system is running.
    This database have been created over the years, incementally adding some objects, patterns, roles and so on.
    How can I create a script now that settles the entire database from scratch?
    I mean what can I create the file called "set_up_database.sql", which creates the database clone/copy of my current Production database now?

    CharlesRoos wrote:
    I intend to use ' expdp/impdp' to create the binary export file and then import it into the new instance of the database.
    These tools of import-export will create me all schemas and the rights and roles of database and created patterns will have the same password?

    Yes it is possible. But it depends on the options that you set when you use expdp/impdp.

    You can export the entire database or only some users, or even just a few tables.
    You can choose to include or exclude data during export.
    When you import, you can choose again to import with or without data. With data are possible cause only if the dmp files have included data.

    You can also rename a schema during import.
    Best way to start would be to do some exercises to imp/exp using a simple 'play' database.

  • SQL script to update the Peoplesoft database information

    Hi all

    I'm a new DBA for a charity running both PS financials & HR which often must create test, training and instances of dev of our production environments. Doing so currently requires a number of manual steps to update the different nodes and paths to those required for the new instance, and naturally I did not become a DBA to do manual work ;-)

    I'm looking for these steps, but the schema PS script being what it is, I'm not having much joy to find where relevant data could be. If someone had a script to do something similar, or could point me in the direction of the tables, I would be extremely grateful. The kind of things that we currently do through the interface are:

    PeopleTools > Integration Broker > Configuration of integration > nodes
    PeopleTools > Security > security objects > Single Sign-on
    PeopleTools > Public Services > Administration > URL
    PeopleTools > Integration Broker > Configuration > Quick Setup > Integration Broker areas
    PeopleTools > Portal > node definitions
    PeopleTools > the Ren Server Configuration > Ren Server Cluster

    We are currently running MS SQL Server, but all the PL SQL scripts would be great - I just need to know what are the tables contain the data.

    Thank you very much


    Andy

    Well, it is very dependent on version Peopletools.
    An easy way might be to open the corresponding page that you speak, and then display the definition of page and the associated record. At least that is what I use to do.
    Then, update you the table background and see if she takes your new values.

    To be brief, here is an excerpt of these tables (non-exhaustive list, PT.48):
    Node of single sign - we built: pstrustnodes
    Scheduler process definition: ps_serverdefn
    Run the command: psprcsruncntl
    Message channels: pschnldefn
    The e-mail table of contents: psapmsgpub *, psapmsgsub *, psapmsgarc *.
    Definition of message node: psmsgnodedefn
    URL: psurldefn
    Definition of employment: ps_prcsjobdefn
    OPRID (e-mail address): psoprdefn
    ...

    Then fill out your own list with the method that I gave above.

    Nicolas.

  • Where the SQL Scripts running after the installation of the ODAC for Oracle Client?

    I just installed ODAC for Oracle Client on a windows server that runs a database of sql server, allowing developers to connect to a web application to an Oracle/Unix database. The installation States to run SQL scripts, located in the $ORACLE_HOME\ASP.NET\SQL directory after installation. I don't know where to run them? On the ORACLE DB on the Unix server? If someone could let me know, I'd appreciate it. Thank you.

    You must run on the Oracle database server, but they are necessary only if you use Oracle for ASP.NET providers.

    If you just install the software, so you can use OLEDB with SQL Server linked server, for example, you don't need them. What do you need to run although if this is the case is the oramtsadmin.sql script that creates the objects used by the Oracle MTS Recovery Service (if you do not have these objects created on the database) that SQL Server uses a distributed transaction for Oracle connections I think.

    It will be useful,
    Greg

  • A SCN for the entire database and the different SNA for the data files?

    DB Version: 11 g

    I always thought that there is a unique SCN for the database as a whole.
    A quote from the link below as
    When a control point is completed, Oracle stores the RCS individually in the control for each data file file
    http://www.dbapool.com/articles/1029200701.html


    What does that mean? There is a SNA for the entire database, and there are individual SCN for each data files?

    Well, unfortunately, the article says more bad than good things. Or if I can't call them wrong, they are rather confusing and rather than clear things for the reader, its making them appear to look more confused.

    First things, YVERT is used for read consistency (CR) mechanism and the backbone of the notion of Multiversioning. The control point is the mechanism to help that recovery is decided. Contrary to what said article, not any kind of checkpoints update both the data file and the control file, and also, there is not a type of them as well. In addition, the article says that the LAST_CHECKPOOINT is set to NULL, while its actually set to the infinity since it is not possible to detect the moment when the database is opened, that the last issue of control over the file would be. In the case of complete control point, this number is saved and is also associated with the toa Controlfile own database leader at the next startup. If this is not the case, there is an inconsistency in the stop_checkpoint of the data file and the stop_checkpoint reocrded in the control file, leading to a recovery of the instance.

    There are several types of control points. Similarly, there are several types of SNA as well. Without going into the details of these, IMO, the article simply means that when the control point write over a file passes, oracle updates the file checkpoint on it and this is recorded in the Controlifle. as well.

    HTH
    Aman...

  • SQL script to change the database user

    Oracle 11g on Solaris 10.5 64-bit SPARC

    I work on generate a SQL script to change all default users to a new or custom password.
    Example: change the system of the user identified by new_password

    Problem:
    My problem is that I don't want the 'new_password' be in plain text, because the script will on the ground prior to deployment.
    Can anyone give me some suggestions?
    Is this doable or I can generate the already hashed password - as change User Manager idenfified < hash_characters >

    Example change manager users identified by 'HE5823WE4095432241252 ';

    You can use the hashed password if you say for example:

    change the system of the user identified by values 'hashed_password_string '.

  • DNS query script - need a way to script to query the DNS settings of all the servers on a domain

    Hi - I was wondering if anyone new a script or a simple way to query the DNS settings of all the servers on a domain? Basically, I need to know the primary and secondary, all our servers DNS settings and that discharge into a file. Any help is very appreciated

    Thanks in advance

    Hello

    As you try to run the DNS settings on the domain, I suggest you to post the same question on the Microsoft TechNet Forums

    You can follow the link to your question:

    Windows Small Business Server: http://social.technet.microsoft.com/Forums/en/category/windowsserver/

    It will be useful.

  • SQL script to check the status of the last command

    Hi all

    I need to make a SQL script and call it from Unix (bash) shell.


    =========================
    sqlplus vikas/vikas < < END
    coil /oracle/vikas/output.txt
    order 1
    command 2
    ...
    ....
    command N
    spool off;
    commit;
    END
    =========================


    It works perfectly, but my problem is that if a command fails, the other controls in suite works. However, I need to keep a check when a broken command that you exit the script.

    On unix, we have an option of echo $? to check the status of the previous command, but how to accomplish this SQL.

    Pls help!
    __________________
    == > VIKAS < ==

    =========================
    sqlplus vikas/vikas<>
    coil /oracle/vikas/output.txt
    WHENEVER SQLERROR EXIT; -Add this
    order 1
    command 2
    ...
    ....
    command N
    spool off;
    commit;
    END
    =========================

  • Can we use SQL Qwery browser to the test database. ?

    Please someone help me with this. Is it possible to do the test using SQL Developer database? Can I do both front-end and testing of the database at the end of return?

    Published by: 883660 on Sep 7, 2011 03:25

    Well, if this isn't SQLDeveloper so your best ask in the forum of SQL query browser.

    In addition, you must define better this kind of tests you need to perform (for example if you need to test stored procedures / packages or a web application running on top of your database).

    SQLDeveloper can help you create unit for PL/SQL procedure packs and other tests, but may not be able to test other things working on top of the DB.

  • Running script to create the target database user account: OIM 11 g

    Hello
    We have a database resource on which accounts are created by running a set of scripts. Creating a user on the database directly is not allowed. Is this a common use case? I am sure about how IOM knows that this account was created (how I would list the resources allocated to a user)? If I'm not listed as a resource for a user account, then how changes will be...

    Any suggestions or advice are appreciated.
    Thank you!

    Do the steps in the procurement process for example process shape, object resource, etc. from process.
    Call your script adapter java task map the response code returned by your script.

  • Search for the specific column field in the entire database

    Dear all experts,

    I have a request, but I do not develop in fornt hand a POdate of values there, but I do not know what table it is stored. So I need a query that finds the column in question (POdate) of all the Tables.

    Is it possible if possible then kind view query.

    Kind regards
    Colette

    Hello

    Use this query
    SELECT TABLE_NAME FROM ALL_TAB_COLUMNS WHERE COLUMN_NAME = 'PODATE.

    Geeta-

  • Backup of the entire database inconsistent

    In this scenario you should back up the database after a crash of the instance or one the judgment.

    Matt

    before you try to recover the database or other destructive task.

    This will ensure that you have a place to go back as no worse than the already bad situation.

  • passage OEM "SQL Script" job name in lowercase as proxy database

    Hello

    I have a SQL script that requires the name of the database in lower case to be passed when running - she uses it as a substitution variable to create database directories that point to the UNIX file system (which is why they are case sensitive). I want to be able to configure this script as work in OEM (12 c version 3) so that I can run on several databases (11.2.0.3), but at the creation of employment, the % DBName parameter returns only the name of the database uppercase. I tried to change the % DBName parameter and run the script in a PL/SQL block, but the variable I spend it is interpreted as a literal string. I also tried to run in a shell script, but because of the way the user operating system is set up that I can't get that to work either.

    Does anyone have any ideas how this can be done? Ideally, I wish I could just run @script lower (%DBName%) or something similar.

    Thanks in advance,

    Robin

    In case anyone else has trouble with this, I worked on that I was able to use a PL/SQL block to convert the variable substitution for lower case, then create the directory with the variable:

    DECLARE

    v_lowerSID varchar2;

    BEGIN

    Select lower ('& 1') in the double v_lowerSID;

    run immediately ' create the db_dir as directory "/ [path] /' | v_lowerSID | '/' || v_lowerSID | ' _directory1 "';

    END;

    /

  • See cant SQL Server tab on the New/Select database connection

    Hi all

    I can't see the SQL Server tab in the new database connection window. I added the jdbc SQL Server driver using the tools-> Preferences-> Third Party JDBC Driver, but all I can see are the Oracle and the tabs to Access.

    I use the version 1.5.4.

    Pointers is very appreciated.

    Kind regards
    Anish.

    Note that the jdbc (for Sybase and SQL Server) driver is http://jtds.sourceforge.net/ jtds1.2 or jtds1.2.2

    -Turloch

  • Cannot get the remote database catalog

    Hello

    I use the ODBC Oracle (version 11.2.0.1.0) gateway to connect to a database from Intersystems Cache. I can run a query of the following type

    Select * from remote_table@cachedb

    However, the issuance

    Select * from all_tables@cachedb returns the following error

    >
    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:
    [Cache ODBC] [State: S0002] [Native code 30]
    [libcacheodbc.so]
    [SQLCODE: < - > 30: < Table or view not found >]
    [Cache error: < < SYNTAX > errdone + 2 ^ % qaqqt >]
    [Details: prepare >]
    [% msg: < SQL ERROR #30: Table ' SQLUSER.] [' Not found ALL_TABLES >] {S0002, NativeErr = 30}
    ORA-02063: preceding 7 lines of XXX
    >

    Obviously, there is no table named "all_tables' to the remote database. I was under the impression that the executable "dg4ODBC" translate properly a query on "all_tables', 'object' etc. in the ODBC equivalent to interrogate the database catalog.

    How we supposed to to query the remote database catalog?

    CITY

Maybe you are looking for