Object Status (Table, View etc.) VALID/INVALID in Informix - view

Does Informix have object status? In Oracle there is a status on the views, tables and other objects represented by VALID/INVALID values.
An equivalent Oracle query is:
SELECT owner,
object_name,
status
FROM all_objects
What about Informix?

Related

Identify system table in Oracle 11

ALL,
Is there a way to identify the system tables in Oracle 11g?
If I call SQLTables() API, I will get a list of all tables available. What I'd like is to identify what table is internal Oracle and which one is user-made.
I'm connecting with the system account. (a dba one).
TIA!
Query e.g. DBA_TABLES (which means that you have access to all tables in that database), using the OWNER column name as filter. For example:
select owner, table_name
from dba_tables
where owner in ('SYS', 'SYSTEM');
For more owners, query DBA_USERS:
select * from dba_users;
and include any you want into the first query.

How do i view the schemas in PL/SQL developer?

I want to view the Schemas that belong to a database in PL/SQL Developer.
I know that in SQL Developer I can view them in the "Other users" node, but where are the schemas in PL/SQL Developer?
Depends on your access level.
In Oracle "Users" own objects, so users and schemas are often used synonymously.
You can see the users by querying ALL_USERS (or DBA_USERS if you have DBA access).
If you define "schema" as a user that owns objects, you can query ALL_OBJECTS ( or DBA_OBJECTS ):
SELECT owner, count(1) num_objs
FROM all_objects
GROUP BY owner;
To get a list of objects for a particular user/schema:
SELECT object_type, object_name
FROM all_objects
WHERE owner = 'FRED'
ORDER BY 1, 2;

how to extract tables attributes like column name , datatype ,nullable for all the tables from the database from oracle pl/sql

Is there any query that can be used to retrive the Tables and its column attributes like column name , datatype, nullable etc for all the tables inside the database
For Oracle Pl/SQL
The Oracle SQL you need would be the following (run as user 'SYS'):
select owner, table_name, column_name, data_type, nullable
from dba_tab_columns;
If you do a desc dba_tab_columns you will get a list of many more columns which may be of interest to you as part of your result set.
You can use a SQL tool (i.e. SQL*Plus) to run this query or you can use PL/SQL to call this query and put the results in PL/SQL variables then print them out via DBMS_OUTPUT.PUT_LINE().
HTH

How to solve tora issue of "object can not be described"

in tora program when i press f4 to open any table this massage appear "Object TABLE_NAME (DB_USER) cannot be described",
please, how to solve.
The permissions are the issue:
A user account only allows a successful login
Permissions to view a table is granted by the table owner
Use a SELECT statement of the ALL_OBJECTS data dictionary view to see which tables you have access to:
SELECT * FROM ALL_OBJECTS
Use the DBA_TABLES data dictionary view to see all tables:
SELECT * FROM DBA_TABLES
References
Managing Security for Oracle Database Users
The Data Dictionary
Catalog Views/Data Dictionary Views
Tables Data Dictionary Views
Data Dictionary Translation Support
ALL_OBJECTS
Syntax for Schema Objects and Parts in SQL Statements
torasql - knowhow:debugger
Granting Object Privileges on Behalf of the Object Owner
ALTER USER
DBMS_DESCRIBE, 1 of 2
DBMS_DESCRIBE, 2 of 2

Oracle - Materialized View confusion (is Toad IDE wrong in displaying MV in Tables section?)

I'm confused about Materialized views. Either it is the Toad IDE that I am using that is confusing me, or its that I don't understand MVs enough.
I created a materialized view in Oracle by something like this....
CREATE MATERIALIZED VIEW TESTRESULT
NOCACHE
LOGGING
NOCOMPRESS
NOPARALLEL
BUILD IMMEDIATE
REFRESH FORCE ON DEMAND
WITH PRIMARY KEY
AS
SELECT ...
FROM tables...
I would expect that the materialized view would be created and populated with the data returned from the query. Okay, not a big deal.
What I am confused on is why my Toad IDE shows a table 'TESTRESULT' under the tables section. It even has a 'Create Table Script' that I can look at.
But I also see my materialized view under the 'Materialized View' section.
Behind the scenes is Oracle creating a table when I create a materialized view? It looks as if there are two seperate objects, a materialized view and a table? Could someone please explain what is going on here behind the scenes when creating a materialized view? Is Toad wrong or am I misunderstanding something?
Toad version: 9.6.1.1
Oracle: 10g
Yes, behind the scenes, Oracle creates two objects, a table where the results are actually materialized and a materialized view that has all the metadata (the query, the attributes, etc.). It's very similar to what happens when you create a unique constraint-- Oracle creates a unique index with the same name as the constraint to actually enforce the constraint and then it creates a constraint itself. If you create a materialized view on a pre-built table, you can end up with different names for the table and for the materialized view just as you could create a constraint that uses an existing index that has a different name.
SQL> select object_name, object_type
2 from user_objects
3
SQL> ed
Wrote file afiedt.buf
1 select object_name, object_type
2 from user_objects
3* where object_name = 'MV_EMP'
4 /
no rows selected
SQL> create materialized view mv_emp
2 as
3 select *
4 from emp;
Materialized view created.
SQL> column object_name format a30;
SQL> select object_name, object_type
2 from user_objects
3 where object_name = 'MV_EMP';
OBJECT_NAME OBJECT_TYPE
------------------------------ -------------------
MV_EMP TABLE
MV_EMP MATERIALIZED VIEW

Resources