How to find Oracle SYSTEMDB Tables - sql

I have an existing database and sql queries.
The query below works and returns rows.
Select * from systemdb.TABLE_A;
However when I tried to find the "TABLE_A" table using "Oracle SQL Developer", I cannot find it in the Tables or Views tree list.
Would like to ask where can I possibly find this table?
What is the meaning of "systemdb" keyword in the query above?
Thank you very much.

In that query SYSTEMDB is the name of a schema in the database. A schema is almost synonymous with a user.
In SQL Developer you are presumably logged in as a different user than SYSTEMDB. To see the tables belonging to SYSTEMDB you expand "Other Users" at the bottom of the tree, then you find SYSTEMDB and expand that one, and then you can find "Tables" or "Views" of the user SYSTEMDB.

It seems to be a tablespace / user created by PeopleSoft PeopleTools. There is not much to be found on it, but I found it here:
have to prepare 4 environmets with PeopleSoft... If there any documentation when you create SystemDB?

Related

How can I get a query of possible login names for SQL job owner?

I'm trying to get the list of all possible login names for a job owner. The following query
SELECT * FROM sys.syslogins
WHERE hasaccess=1
gives me close to what I'm looking for but it returns additional login names that I do not find in the Browse Objects dialog box using SSMS (such as ##MS_AgentSigningCertificate## or BUILTIN\Administrators). I cannot find any logic in sys.syslogins table to discriminate those records. I looked in other logins tables but nothing comes closer than sys.syslogins.
SQL Server is version 10.50 (2008R2) but I'm looking for a query that will give me the results for this version or earlier.
What am I missing?
#Larnu pointed me in the right direction.
Query that solves my question is:
SELECT * FROM sys.server_principals
WHERE [type] IN ('S', 'U')

How can I stop my SQL from returning empty data results?

I usually use Toad to manipulate my Oracle databases, but I even tried SQL manager for this one and it still would not work. I have a table with a few hundred records, and even running a simple
SELECT * FROM customer
will not work. There are no errors, and the data grid that displays pulls all the correct field column names but there are no records shown. What could be causing this?
Does your login schema own the table? If not, verify that any synonym is actually pointing to the object that you think it is. Preface the table name with its owning schema to rule out any conflicts.

How to move table data from one environment to another environment in Oracle

I am a novice Oracle User.
I want to move a table records from QA to Test environment. The table already exists in Test. Would it be something like this ?
insert into wKTest01.MyTableIWantToMove select * from wkQA01.MyTableIWantToMove ;
Any help is greatly appreciated.
Both the tables in both environments have same number of columns with same data types.
You can use database links in Oracle to do this.Create a database link in your test database called myQADBLink which points to your QA DB.
The code would look something like this
CREATE DATABASE LINK myQADBLink CONNECT TO <username> identified by
<password> USING
'<QA DBconnect string>';
SELECT 1 FROM dual#myQADBLink; -- This is to test if your dblink is created properly.
Now you can copy from QA to test by saying
INSERT INTO wKTest01.MyTableIWantToMove select * from wkQA01.MyTableIWantToMove#myQADBLink;
Yes, it actually exists, right like you put it.
Here is the full syntax guide for this: http://docs.oracle.com/cd/E17952_01/refman-5.1-en/insert-select.html.
Later, when you might place your tables at the different Oracle instances, google 'Orace DBLink' for the good ;)

How can I see where data in a column comes from?

I don't know if anyone can help me. In my job, I inherited a completely undocumented database (Oracle 11). So far, I've managed to map most of the tables and determine what's going on where. However, there are a few columns that I haven't been able to decipher.
Is there some way of finding out how is the data in the column built? This is not a manual input. Everything seems to point to the data being the result of an entry in a different column in a completely different table.
It might be an impossible task, but any and all suggestions will be more than welcome.
Thanks!
C
Perhaps the data is being inserted in your mystery columns via a trigger? Try looking in the PL/SQL source table in the dictionary:
SELECT owner, name, type, line
FROM dba_source
WHERE UPPER(text) LIKE '%MYSTERY_COLUMN_NAME%'
AND type = 'TRIGGER'; -- use or omit this as desired.
This will get you pointed in some possible places to look.
Good luck!
You can retrieve the complete DDL for a table using the DBMS_METADATA package.
SELECT dbms_metadata.get_ddl('TABLE', 'YOUR_TABLE_NAME', 'YOUR_USER_NAME')
FROM dual;
If those columns are really computed columns then this should be visible in the DDL for the table.
Alternatively you can use SQL Developer to show the DDL for the table
I am presuming that you already have the sql that is in question.
select table_name from dba_tab_columns
where column_name = 'COLUMN_YOU_WANT_TO_KNOW'
will provide all tables that contain a column name that you are looking for. If you do not have dba privileges you can use all_tab_columns instead (which will show all tables your account would have access to).

Access get all tables

Is there a way in by sql statement or vba code to return all tables from access file? "I don't know the name of the tables"
like when you want to have all fields in a table you use '*' regardless the names of the fields.
but how to get all tables?!!!!
This will bring back all tables in the MS Access database (including linked tables)
SELECT MSysObjects.*, MSysObjects.Type
FROM MSysObjects
WHERE (((MSysObjects.Type)=1)) OR (((MSysObjects.Type)=6));
It also inclued Sys tables, so you might want to exclude tables starting with MSys
Have a look at
Using MSysObjects
SELECT "Table" AS [Table],
MSysObjects.Name, MSysObjects.
Depends what kind of database you are running. Many of them support the SHOW TABLES command.