Solved

know tables in the database

Posted on 2007-04-04
3
803 Views
Last Modified: 2013-12-18
hi

i have yet to install oracle in my company laptop. in one the application, on one page i can actually run a query and get the results.
i wanted to know what is the name of the database and what tables reside in it
i ran these 2 queries
select * from global_name gives below
global database name TESTINGDB.WRD

select name from v$database
TESTINGDB

so the db is basically Testing...but what is WRD. So if I need to know the tables in the database testingdb what query do i need to run?
0
Comment
Question by:samir25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 23

Assisted Solution

by:paquicuba
paquicuba earned 450 total points
ID: 18850449
AS a DBA:
SELECT OWNER||'.'||TABLE_NAME FROM DBA_TABLES;

As a USER:
SELECT OWNER||'.'||TABLE_NAME FROM ALL_TABLES;
SELECT TABLE_NAME FROM USER_TABLES;
0
 
LVL 12

Assisted Solution

by:jwahl
jwahl earned 50 total points
ID: 18850460
try

SELECT owner, table_name
FROM all_tables;


0
 
LVL 23

Accepted Solution

by:
paquicuba earned 450 total points
ID: 18850648
>> but what is WRD
WRD is the database domain name

1. What is a global database name?
----------------------------------
The global database name is the unique name of the database.

In a distributed database system (a set of databases stored on multiple
computers that typically appears to applications as a single database) the
global database names ensure that each database is distinct from all other
databases in the system. Oracle forms a databases global database name by
prefixing the databases network domain with the individual databases name.

For example: sales.us.oracle.com and sales.uk.oracle.com

The global database name defaults to DB_NAME.DB_DOMAIN and this value
is marked at database creation time. If you change the DB_NAME or
DB_DOMAIN after the database has been created, the value for the global
database name (GLOBAL_NAME) will not change.

2. How to determine the current global database name?
-----------------------------------------------------

A public view with the name GLOBAL_NAME is available which issues a query
on the table props$. So any user can find out the global database name
by querying this public view:

SELECT * FROM global_name;

GLOBAL_NAME
----------------------
TEST815.CH.ORACLE.COM


3. How to change the global database name?
------------------------------------------
To change the global database name, issue the following command
(renaming the global database name will not change the value of the
DB_NAME or DB_DOMAIN parameters):

ALTER DATABASE RENAME GLOBAL_NAME TO remote1.oracle.com;


4. Related parameters in init<SID>.ora file.
--------------------------------------------
GLOBAL_NAMES = [TRUE | FALSE]
The parameter GLOBAL_NAMES specifies whether a database link is required
to have the same name as the global database name to which it connects.
If the value of GLOBAL_NAMES is FALSE, then no check is performed.
Oracle recommends setting this parameter to TRUE to ensure the use of
consistent naming conventions for databases and links.
To check the current value of this parameter, issue the following command:

SELECT name,value FROM v$parameter WHERE name = 'global_names';

NAME VALUE
---------------- --------
global_names TRUE

You can change the value of this parameter dynamically. This can be done
for the current session only or for the current and all consequent
sessions:

ALTER SESSION SET global_names = TRUE;
ALTER SYSTEM SET global_names = FALSE;


5. Related parameter in listener.ora file.
------------------------------------------
When (for example) a database link is created, Net8 is used to establish a
network session in order to transfer data between the two servers.
Once the network session is established, Net8 acts as a data courier for
the servers. The network session is established with the help of a
listener.
The listener process listens for incoming connection requests and manages
the traffic to the server. The listener verifies the incoming request
information with the information it has received from the database service
as well as information it has stored in its own configuration file
(listener.ora). If the information matches, a connection is granted.

In the LISTENER.ORA file, under the sections SID description, a parameter
GLOBAL_DBNAME can be found. This parameter identifies the
global database name and is the name and domain name of the database,
as given in SERVICE_NAMES parameter in the database initialization
parameter file (init<SID>.ora).

If you want to refer to the database by its global database name on the
network, then you must specify that global database name to the listener.
This parameter must be embedded under SID_DESC and should match the value
of the SERVICE_NAMES parameter. Example:

sid_list_mylistener=
(sid_list=
(sid_desc=
(global_dbname=TEST815.ch.oracle.com)
(sid_name=TEST815)
(oracle_home= D:\Oracle\Ora815)
)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle DR - data guard failover. 18 60
Oracle function to insert records? 15 65
Error in creating a view. 8 35
Migration from SQL server to oracle (XML input) 4 54
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question