Need to request so that the data dictionary
Hi all
I need an application that can show all the details of the tables in my database
request to see the... : table name, type of name of column data, constraints, default value, etc...
I found two tables in the database that showa all this information... Here are the 2 quiries:
Select table_name, column_name | » ('|| DATA_TYPE | (' ('| data_length |')) "column_name from all_tab_columns
where OWNER = "UBSPROD."
Select constraint_name, constraint_type, table_name, search_condition_vc, index_name
From user_constraints where owner = "UBSPROD";
but when I join them I get a lot of records... I mean I think he's going to cartiantion products
I used query below:
Select at.table_name, at.column_name |' ('| at.data_type |') ('|| at.data_length||')) "column_name, | |
UC.constraint_name, uc.constraint_type, uc.table_name, uc.search_condition_vc, uc.index_name from all_tab_columns to, uc user_constraints | |
where at.owner = 'UBSPROD. ' | |
and at.table_name = uc.table_name |
Please, help me to display information with all tables of database related...
Thank you
The reason you see too many lines is because one table lists columns and a list of constraints and want to join the table name. So if you have a table with 3 constraints and 5 columns, you get 15 lines, which probably makes no sense.
Have a reflection on what data you actually want to display for each table. There is a many-to-many relationship between columns and constraints (each column can contain zero or more constraints, each constraint can use more than one column), is without doubt better to keep the two separate, for example
COL1
COL2
COL3
COL4
COL5
CONSTRAINT1
CONSTRAINT2
CONSTRAINT3
This would be achieved either with two separate queries, or you can use a UNION ALL operation, as appropriate. If you want to display the columns used in a constraint, you must query the synonym ALL_CONS_COLUMNS.
Also, make sure you are compatible by using the ALL_ or synonyms USER_ - do not mix the two.
Tags: Database
Similar Questions
-
Problems with synchronization model with the data dictionary
Let me start by saying that I do something wrong (there not much documentation on this product so far...).
I designed my whole from scratch in SDDM 3 and then put model upgraded to SDDM 4. There is already a problem with the sync option from the data dictionary model, in which it works only if first import you an object any in the data dictionary for the model for the reverse to work. I did, and now I can't start the synchronization successfully. The thing is, but I have all the objects already created in my database, according to a specific schema, each time I start the synchronization, it always tells me that none of my model objects exist on the destination! I've tried setting the owner on the physical model, remove, modify the connection to connect with the owner objects, but nothing seems to work.
Any ideas?
Hello
You need clear information source banner and rename the schema in the relational model if you want to use the Sync feature, otherwise, you can use import wizard of data dictionary (possibly to check 'target swap') and to
don't check box "use schema property in compare features" If your schema is changed.-"preferences > Data Modeler > DOF > compare > ' or to compare options in compare dialog.
You can clear information source banner by selecting all the objects on the diagram (Ctrl-A) and use 'Clear stamp source' in the context menu for the selected objects.
In the next version - there are options to work around the source schema and the name of the source object, and you can use different user and change the name of the table in the physical model in order to synchronize with a different schema or even track changes in table name.
Philippe
-
I backed up the files on a DVD of a XP OS to put on a 7 BONE, but the record shows that the data on the DVD is corrupted. I have run some recovery on the DVD programs and even if she shows that 2.3 GB have been used they are unable to find the data
* original title - I need fast help please *.
How is not have you backed up the files? You just burn it to a CD or did you use the 'NT backup' program of Windows XP? I don't think that the Windows XP Backup program is compatible with the Windows 7 backup program. The following link contains an article that explains this condition:
If you simply copied the files on the CD/DVD, then it is possible the program that copied the DVD not to "finalize" the DVD. If you can play the DVD on the computer that created it, but cannot on another computer, then this is probably the case. If this is the case, then put the disk into the computer that created and put in place the program that burned and look under the 'Tools' menu for an option "Finalize"... and do it.
HTH,
JW -
SDDM 4.0 - synchronize the data dictionary can not detect existing CF
I started a data model implemented in version 3 of SDDM somewhere, then had to ask for about 9 months and pick it back up. When I picked up back, 4.0 RC3 shone, so I used to work on the old model. Some problems have emerged, and one that is currently more frustrating is when I use the "Sync data dictionary" feature to create the DDL to change the physical table based on changes to the model that I made.
I used to be able to just do a right-click on the table, choose Synchronize the data dictionary, and then only the changes I made would be generated. Now, however, the function Compare seems to not be able to detect certain properties of the physical implementation table he is comparing it to. For example, there is a table with FK 3 and compare it detects that one of them, then it attempts to create them from scratch. Of course fails because there are actually the CF. I tried not to drop and re-create the keys in the comics because I don't want to go to this effort for each table.
I can post screenshots if you illustrate the problem like this. Does anyone have advice? It seems that there is a bug in the software. Thank you.
Hi Mike,.
Thanks for reporting the problem. I logged a bug for this.
The synchronization works without problem if all of the tables involved are included in the sync operation. The problem is caused by PK/UK constraints with system-generated names.
You can call the synchronization on a selection of objects (one or more), on a subview or the entire model. You can use "Select neighbors" in order to obtain selected related objects or
'Create subview with neighbors' available in the context menu for the table in the browser.
Philippe
-
Can I use the data dictionary tables based on RLS policy?
Hello guys, I use the package level security line to limit certain lines to some users.
I created several roles, I want to just enable certain roles to see all the columns, but the other roles, I'm not that they see all the lines. I mean to do this I use the session_roles table data dictionary however it did not work.
What to do in order to not allow rows of user roles?
Can I use the data dictionary tables in RLS?
Thank you very much.Polat says:
What to do in order to not allow rows of user roles?
Can I use the data dictionary tables in RLS?Ensure that:
SQL> CREATE OR REPLACE 2 FUNCTION no_sal_access( 3 p_owner IN VARCHAR2, 4 p_name IN VARCHAR2 5 ) 6 RETURN VARCHAR2 AS 7 BEGIN 8 RETURN '''NO_SAL_ACCESS'' NOT IN (SELECT * FROM SESSION_ROLES)'; 9 END; 10 / Function created. SQL> BEGIN 2 DBMS_RLS.ADD_POLICY ( 3 object_schema => 'scott', 4 object_name => 'emp', 5 policy_name => 'no_sal_access', 6 function_schema => 'scott', 7 policy_function => 'no_sal_access', 8 policy_type => DBMS_RLS.STATIC, 9 sec_relevant_cols => 'sal', 10 sec_relevant_cols_opt => DBMS_RLS.ALL_ROWS); 11 END; 12 / PL/SQL procedure successfully completed. SQL> GRANT EXECUTE ON no_sal_access TO PUBLIC 2 / Grant succeeded. SQL> CREATE ROLE NO_SAL_ACCESS 2 / Role created. SQL> GRANT SELECT ON EMP TO U1 2 / Grant succeeded. SQL> CONNECT u1@orcl/u1 Connected. SQL> select ename,sal FROM scott.emp 2 / ENAME SAL ---------- ---------- SMITH 800 ALLEN 1600 WARD 1250 JONES 2975 MARTIN 1250 BLAKE 2850 CLARK 2450 SCOTT 3000 KING 5000 TURNER 1500 ADAMS 1100 ENAME SAL ---------- ---------- JAMES 950 FORD 3000 MILLER 1300 14 rows selected. SQL> connect scott@orcl Enter password: ***** Connected. SQL> GRANT NO_SAL_ACCESS TO U1 2 / Grant succeeded. SQL> connect u1@orcl/u1 Connected. SQL> select ename,sal FROM scott.emp 2 / ENAME SAL ---------- ---------- SMITH ALLEN WARD JONES MARTIN BLAKE CLARK SCOTT KING TURNER ADAMS ENAME SAL ---------- ---------- JAMES FORD MILLER 14 rows selected. SQL>
SY.
-
Technical details of the package in the data dictionary
Hi can u tell someone in what data dictionary table func or procedure declared in the package specification is stored?
For ex.
CREATE OR REPLACE PACKAGE IN THE PKG_TEST
F_1 FUNCTION RETURN NUMBER;
F_2 FUNCTION RETURN NUMBER;
F_3 FUNCTION RETURN NUMBER;
-----------------------------
-----------------------------
-------------------------------
FUNCTION F_10 RETURN NUMBER;
END PKG_TEST;
Now the data dictionary tables, I want to know what are the functions created in PKG_TEST.i.e. He me F_1 would list at F_10.
I checked in User_Source, but finding not useful.
user_procedures
-
SQL submitted in the worksheet make pre-requete of the data dictionary
Hi all
SQL Developer version: 4.0.0.13 (Windows)
By submitting a simple SELECT * FROM < any_app_related_table > in a worksheet query response time to return results have been awful - this is particularly evident during the execution of the query when you open the worksheet as a new connection.
I decided to follow the activity of my session and found that by submitting the request following SQL was executed BEFORE the execution of the actual query that I wanted:
/ * + NO_SQL_TRANSLATION * /.
Select table_owner, table_name from all_synonyms where owner (user, 'PUBLIC') and synonym_name =: 1
and not exists (select user, object_name from user_objects where object_name =: 2 and object_type in ('TABLE', 'SEE'))
Because a couple of our data base massive dictionarys, the SQL above takes his time in execution. We have gathered the stats before SD but this makes no difference.
Is there a way that this kind of behavior "pré-requête" can be disabled in SQL Developer? My colleagues using tools such as TOAD laughing in my face than their queries run instantly. I tried searching for this behavior on the web but did not find anything...
PS - I seem to think that I asked this question before that I've seen this behavior in previous versions too, but I think that the answer was simply the words to the effect of "this is how SQL Developer works I'm afraid.
Thanks in advance
Is the version of your RDBMS 12.1? How long
Select * from user_synonyms where synonym_name = 'POTATO ';
should I do?
I'm not able to confirm your assertion that this dictionary query is triggered before the user query. It is triggered by an overview of code, or side info semantic analysis; both can be selected.
-
I changed/added comments of column to a table in my relational model. When I try to sync the database data dictionary changes are never included the observations of the new column. In fact, I see that the values in the field 'Commentary in RDBMS' are different in the preview window to compare, but the line is not highlighted in red I guess that, in fact it is even dimmed. Also, I can not check the check box "selected".
Is there a way to get comments to synchronize? I don't miss any option that I first? Is this a bug or an expected behavior?
I use the version 4.0.3 x 64 of the Data Modeler.
Any help would be appreciated,
Charlie
Hi Charlie,
but the line is not highlighted in red I guess that in fact it is grayed out even.
"that means property is excluded from the comparison - the same dialog box click on tab -" Options > properties filters '-you can control the properties to include in compare it it is to say ' comment in RDBMS ' must be checked.
Press the button "Refresh trees" after the properties are set correctly.
Philippe
-
Hi all
I have the following documents:
-Drop Table
drop table agreement;
drop table GRP_INFO;
-Create table
create table agreement
(
Agreement_Id Number (5),
Date of Coverage_Effective_Date,
Date of COVERAGE_termination_date
);
Create Table GRP_INFO
(
Agreement_Id Number (5),
Grp_Id Number (5),
Date of Effective_Date,
Date TERMINATION_DATE
);
-------------Insertion
Insert into the agreement
Select 100,'01 JAN - 2013", December 31, 2013"
From Dual;Insert into the agreement
Select 200,'01 JAN - 2013", December 31, 2013"
From Dual;Insert into the agreement
Select 300,'01 JAN - 2013", December 31, 2013"
From Dual;Insert into the agreement
Select 400,'01 JAN - 2013", December 31, 2013"
From Dual;
----------
Insert into Grp_Info
Select 100.1, 1 January 2013 ", 31 March 2013"
Of the double
UNION ALL
Select 100.2, April 1, 2013 ", April 2, 2013"
Of the double
UNION ALL
Select 100.3, April 3, 2013 ", April 15, 2013"
Of the double
UNION ALL
Select 100.4, April 3, 2013 ", April 15, 2013"
Of the double
UNION ALL
Select 100.5, 1 June 2013 ", December 31, 2013"
Of the double
Union All
Select 200.6, 1 January 2013 ", April 2, 2013"
Of the double
Union All
Select 200,7, April 3, 2013 ", April 15, 2013"
Of the double
Union All
Select 200,8, April 3, 2013 ", April 15, 2013"
Of the double
Union All
Select 200,9, June 1, 2013 ", November 30, 2013"
Of the double
Union All
Select 300,10, 1 January 2013 ", April 15, 2013"
Of the double
Union All
Select 300,11, April 16, 2013 ", December 31, 2013"
Of the double
Union All
Select 400,12, January 2, 2013 ", December 31, 2013"
From Dual;COMMIT;
-------------------
-Queries on the table of the agreement
Select * agree;
-Result of the query
agreement_id coverage_effective_date coverage_termination_date
100 01-JAN-13 31-DEC-13
200 01-JAN-13 31-DEC-13
300 01-JAN-13 31-DEC-13
400 01-JAN-13 31-DEC-13
-----------------------
-Queries on grp_info table
agreement_id grp_id effective_date termination_date
100 1 01-JAN-13 31-MAR-13
100 2 01-APR-13 02-APR-13
100 3 03-APR-13 15-APR-13
100 4 03-APR-13 15-APR-13
100 5 01-JUN-13 31-DEC-13
200 6 01-JAN-13 02-APR-13
200 7 03-APR-13 15-APR-13
200 8 03-APR-13 15-APR-13
200 9 01-JUN-13 30-NOV-13
300 10 01-JAN-13 15-APR-13
300 11 16-APR-13 31-DEC-13
400 12 02-JAN-13 31-DEC-13
-------------
-Result
agreement_id
100
200
400
----------------------
-Logic for the above result
Each agreement_id have several grp_id and grp_id all or at least one should cover all the period agreement_id for example:
-Agreement_id 100 a protection from the date is January 1, 2013 and coverage_termination_date is December 31, 2013, and if you look in all the archives against agreement_id 100 so you can find the period from April 16, 2013 until 31 May 2013 are missing so I need this agreement_id.
-Agreement_id 200 a protection from the date is January 1, 2013 and coverage_termination_date is December 31, 2013, and if you look in all the archives against agreement_id 200 then you can find that the period from December 1, 2013 until 31 December 2013 are missing so I need this agreement_id.
-Agreement_id 300 a protection from the date is January 1, 2013 and coverage_termination_date is December 31, 2013, and if you look in all the archives against agreement_id 300 then you can find that no period is missing, I don't need this agreement_id.
-Agreement_id 400 a protection from the date is January 1, 2013 and coverage_termination_date is December 31, 2013, and if you look in all the archives against agreement_id 300 then you can find that the period from January 1, 2013, until January 1, 2013 is missing, so I need this agreement_id.
--------------
Please let me know if you have any related questions my script and I really appreciate if someone can give me the solution for this problem.
Concerning
Line
Hello
Here's one way:
WITH got_gap AS
(
SELECT agreement_id, effective_date, termination_date
CASE
WHEN effective_date >
1 + MAX (termination_date) OVER (PARTITION BY agreement_id
ORDER BY effective_date
ROWS BETWEEN UNBOUNDED PRECEDING
AND 1 PRECEDING
)
THEN 1
Difference in the END as the
OF grp_info
)
SELECT g.agreement_id
OF got_gap g
JOIN agreement has ON a.agreement_id = g.agreement_id
GROUP BY g.agreement_id
GIVEN the NUMBER (g.gap) > 0
MIN (g.effective_date) OR > MIN (a.coverage_effective_date)
OR MAX (g.termination_date)< max="">
ORDER BY g.agreement_id
;
Output:
AGREEMENT_ID
------------
100
200
400
Makes no assumptions about effective_date and termination_date, except that effective_date<= termination_date="" on="" each="" row. ="" it's="" okay="" if="" different="" rows="" for="" the="" same="" agreement_id="" overlap,="" or="" if="" one="" encompasses="">=>
Do not attempt to insert VARCHAR2 values (like January 1, 2013 "") in the DATE columns. Use TO_DATE, either DATE literals.
-
Here's the situation:
We are repeatedly followed eight real-world signals and comparing them to a threshold value. We do this via a loop For inside a While loop. The loop For runs eight times per pass. We have implemented a binary table 1 d and the use of the index of the loop For as the array index, by putting a Boolean result in the table using the function replace table subset. We want to keep the data in the table to be 'sticky', in the sense that any True value is locked, so even if a fake comes later, this array element true. However, since we initialize the array in order for the replacement to the work table, we see that whenever the loop For again, it resets the table and destroys the history.
I have attached a simple VI to illustrate the concept, using a random number generator as a stand-in for the real world signals. How we change this VI do and entered real lock through multiples for loop runs, indefinitely?
In case it is not obvious, I am a relative beginner, so please keep count in your response.
Thank you
B
scottbbb wrote:
For B, although I love the simplicity of it, I have a question: it solves the problem of the re-initialization? What the shift of the While loop register get initialized - only once during its launch?
Yep, the shift register Initializes only at the beginning. You could say that every time the while loop is called (not each iteration) the shift register is reset with the wrong table.
And, Yes, GOLD will always keep a REAL when it is TRUE.
Usually, the simplest solution is the best.
-
How can I save a form so that the input data are visible. When I click on the cell, I can see what has been entered, but when I go to the next cell, the data is hidden again. I would like to print the file with the visible information that has already been entered.
To clarify what mentioned TSN, forms PDF that are used and saved by the application on a Mac are corrupt in a number of ways. When a form that has been corrupted by the Preview is opened in Acrobat/Reader, one of the symptoms is exactly what you describe. If you have access to Acrobat and the original form, empty, not corrupted, you can export the form data in a data file (e.g., FDF) and import the shape of FDF data in the blank form.
-
Regarding the authorized request property if the data block is the database no.
I'm now a project located on Oracle Forms 10g.
There is a DataBlock with certain properties such as
1 block of data in the databases: No.
2 query allowed: Yes
3 interrogate the Data Source Type: table
4 insert authorized: Yes
5 update allowed: Yes
6. Remove allowed: YesIf the DataBlock is not database data block are then properties no. 2 to 6 relevent?
I think these properties must be set to NO and the query data Source Type must be None.
Can someone help me please.Yes... The block of database property must be "NO"... I made the mistake of typo... You can also change other properties... No problem in that
-
Why I need to_char allows to compare the date?
Hi guys:
I have a question that seem silly, but I couldn't know.
I have a simple query on Oracle 11 G R2 and I use SQL developer 3.1.07, the schema and the data has been migrated from a SQL Server:
It returns empty results. However, tuples are in the table. When I try this:select * from vernote where whendate='09-JUL-12';
He returned 677 lines. the whendate data type is date. but when I try another table in the same pattern:select * from vernote where to_char(whendate)='09-JUL-12';
It returns tuples, and I don't have to use the function to_char. transpostdate is also a date. Could someone tell me why the two columns: whendate, transpostdate both are of type date, but I have to use to_char to compare, the other does not?select * from invoices where transpostdate='09-JUL-12';
Thanks in advance!
Samlxiscas wrote:
Hi guys:I have a question that seem silly, but I couldn't know.
I have a simple query on Oracle 11 G R2 and I use SQL developer 3.1.07, the schema and the data has been migrated from a SQL Server:
select * from vernote where whendate='09-JUL-12';
It returns empty results. However, tuples are in the table. When I try this:
select * from vernote where to_char(whendate)='09-JUL-12';
He returned 677 lines. the whendate data type is date. but when I try another table in the same pattern:
select * from invoices where transpostdate='09-JUL-12';
It returns tuples, and I don't have to use the function to_char. transpostdate is also a date. Could someone tell me why the two columns: whendate, transpostdate both are of type date, but I have to use to_char to compare, the other does not?
Thanks in advance!
Sam
What kind of data are WHENDATE & TRANSPOSTDATE?
If they are the data type DATE, then they contain data too part TIME.
NEVER rely on the implicit data type conversion.
July 9, 12 ' is STRING; not a DATEWhen TRUNC (transpostdate) = TO_DATE('09-JUL-2012','DD-MON-YYYY');
-
dreaded default zero in calculated field - how to remove so that the data entered
I'm not experienced with scripting in LiveCycle Designer ES2.
That's what my PDF form looks like when it is opened by the user:
But, I don't want the default $ 0.00 because some users can print the form and manually enter all areas. I want it to be empty, until the data is added in one of the hourly rate or the Total number of hours of the contract.
It comes to the design of form with tab linking objects (and as Name() use data binding to):
TtlHrs
HrlyRate
VacRate (this is a protected field to set the value by default. 04; as 4% on the form when it is opened)
It is the simple calculation in FormCalc for the TOTAL field:
TtlHrs * HrlyRate + (TtlHrs * HrlyRate * VacRate) which gives the default value of 0 in the form.
I want to write a script that will delete the 0 until data is entered in one of the first two fields. I tried using the code suggested in other posts, but it does not work - just keep getting syntax errors.
If you reply, please indicate whether your script is for the event to Java or FormCalc claculate.
Your calculation in formcalc should be something like:
If (TtlHrs.isNull == 0 and HrlyRate.isNull == 0) then
$ = TtlHrs * HrlyRate + (TtlHrs * HrlyRate * VacRate)
else $ = «»
endif
-
Kindly help me with the request to find the data in two tables
Hello Guru
Kindly help me to recover the data from two tables-
BASEBALL
LEGAL_ENT_ID (PK)
GAME_ID (FK)
LEGAL_ENT_NM
INACTIVE_DT
DATE OF INS_TS
INS_LOGIN
DATE OF UPD_TS
UPD_LOGIN
FOOTBALL
GAME_ID (PK)
BRKR_NM,
BRKR_ISR_ID
BROKER_SYMBOL
INACTIVE_DT
BRKR_SWIFT_FLG
BRKR_INTERNAL_FLG
BRKR_CATEGORY
UPD_TS
MINORITY_FLG
BROKER_TYP
STATUS
INS_TS
INS_LOGIN
UPD_LOGIN
APP_USER
ACTIVE_FLG
and if I want fecth data from these two tables according to the following condition then it is fine with the suite of applications.
1 select distinct values only table of BASEBALL by using the following query.
SELECT DISTINCT B.GAME_ID as 'CLEARING GAME ID', B.BRKR_NM "NAME of THE GAME of COMPENSATION" OF BASEBALL A, FOOTBALL B WHERE A.BROKER_RELATION_CD IN ('FUTBRKR1', 'FUTBRKR2') AND A.GAME_ID = B.GAME_ID
2 Select all the table BRKR_NM OF FOOTBALL as well by using the query - next
SELECT GAME_ID "RUNNING GAME ID", 'NAME OF THE GAME OF EXECUTION' BRKR_NM SOCCER
Now, my query is that--
I want a query that gives me a combination of above mentioned queries... and if I tried to use Union or Union All, then she is not giving me the result as expected.
I like the result to look like who has a few conditions such as -
1 - the records in the table Football are high vs Baseball table because there is no condition to filter the records of the Football.
2 - football is a superset of records and Baseball is a subset.
3 - COMPENSATION NOM_JEU and RUNNING NOM_JEU may return the same values as well.
I want the result to be in the following form-
EXECUTION ID GAME | NAME OF THE GAME TO RUN. COMPENSATION ID GAME | DELETE THE NAME OF THE GAME.
2123 test1 2345 test5
2456 test10 2456 test10
Thanks in advance. Kindly help me.
Published by: user555994 on January 4, 2011 23:48In the output you want.
All the values of baseball;
Values of football that are matched;
But on what condition you want to match?
Maybe you are looking for
-
cancelled downloads keep coming back after the restart
Hello guys. After the Update beta, beta 9 if I remember well (on the section of the said browser ver 32) downloads are badly behave. the first problem I have encountered is when I downloaded a (approximately 40 KB) zip file, the zip is downloaded on
-
I can't sign Skype PLEASE help me
-
Equium P200 does not recognize the wireless network with Win XP card
Dear team I recently installed windows XP on my Equium P200 (he had originally vista).Now, I have a problem with the Atheros wireless card. The computer does not recognize the wireless card is installed. I tried uninstalling the drivers and reinstall
-
I searched on the Lenovo site with no luck, they do not have the listed J115 menu drop-down (they start at J200). Where are these drivers on Lenovo? Where they are? Thanks for any help you can provide.
-
When I'm printing to a file I can't find the file. How can I find?
When I'm printing to a file I can't find the location of the file. How can I find?