Databases
The error ORA-30926 as a result of a Merge
Submitted by carlos on 17 February, 2009 - 00:00ORA-30926 error usually occurs when performing merge operations, and typically we leave something descolocados as the description of it does not give too much information about what is happening:
ORA-30926: unable to get a stable set of rows in the source tables.
Normally this error occurs when the merge operation to target a row to be updated on it more than one row in the table source. As the engine does not know what to choose register returns an error. It is a problem of duplication in the origin table.
Example:
-
We have:
TABLA_ORIGEN with the values
ID Description
1 'The first value'
1 'The value with duplicate id'
2 'Another value'
- Read more
- 1430 reads
-
Searching for user passwords in Oracle
Submitted by carlos on 14 August, 2007 - 20:12For obvious security reasons we can not see clear the password of the users of the database, but as an administrator user SYSTEM does have privileges to view the encrypted password:
SQL> select password from dba_users where username='SCOTT';
PASSWORD
-----------------------------
F894844C34402B67The usefulness of this is that as we return the SELECT can be used in a sentence of password change;
SQL> alter user scott identified by values 'F894844C34402B67';GRANTS WITH GRANT OPTION: The transitive property granting privileges
Submitted by carlos on 22 June, 2007 - 23:00
Grant command is used to grant to user's databases generic privileges or permissions over objects.
It's syntax is:
GRANT [system_privileges | roles]
TO [user | role | PUBLIC] {WITH GRANT OPTION}
to grant generic privileges
- Read more
- 269 reads
-
Build scripts with the help of the dictionary
Submitted by carlos on 6 June, 2007 - 23:00It is quite common when working with databases that often have to perform any job creation or alteration of structures, analysis, compilation, etc. objects on the database. This tends to create a DDL script with a number of judgments, which in most cases the only thing that changes is the name of the object to be treated.
You can save a lot of work using the dictionary of the database to dynamically build these judgments.
As an example will create a new field to store the date of creation of records in all tables in a schema of an Oracle database. To do so would use the following statement:
SELECT 'ALTER TABLE' | | OWNER | | '. " | | TABLE_NAME | |
'ADD FECHA_CREACION DATE DEFAULT SYSDATE,'
FROM ALL_TABLES
WHERE OWNER = 'HR';
The result would be something like this:
- Read more
- 219 reads
-
ETL Tools
Submitted by carlos on 24 April, 2007 - 23:00In electronic publishing MCData.ti can be found a fairly complete classification of different tools related to business intelligence and data management. This is the description that makes tools for ETL (Extraction, Transformation and Load).
Company: Cognos Product DecisionStream
- Read more
- 162 reads
-
