Simple example of generating MD5 on Oracle PL/SQL. declare cln_md5raw raw(2000); out_raw raw(16); begin cln_md5raw := utl_raw.cast_to_raw('Our text for hashing'); dbms_obfuscation_toolkit.md5(input=>cln_md5raw,checksum=>out_raw); -- Output
All the below steps were performed on a Windows server. To create a backup, open the command prompt cmd.exe In the command prompt, run the RMAN utility Next, for a database backup without Archive Logs:
В Oracle присутствует возможность объединять выборки. Для объединения используются операторы: UNION (с вариацией UNION ALL ), INTERSECT и MINUS . Рассмотрим работу всех этих операторов. 1. UNION и UNION ALL UNION — объединяет наборы данных,…
MERGE — Function intended for merging the result of some query into a receiving table, it is not necessary for the field composition to match. Applied when it is necessary to supplement some table with new data, updating existing data in the table simultaneously. Implementation:
To write a script to select all user tables with fields and comments, we need system tables: user_tables --Selecting all user tables and their parameters select * from user_tables user_tab_comments -…
In the previous publication, some methods of manipulating XML in Oracle were considered, now let's consider how to retrieve data directly in XML. This is, in my opinion, the most interesting part. In practice, it turned out that for Oracle in most cases it does not matter whether to return a set of records or a formed ready XML of this set of records - in terms of execution time these actions are subjectively almost equivalent. But if you have a need to form some XML structure in the application based on data received from the Oracle database, it will almost certainly be a resource-intensive event, much easier to transfer this functionality to the database, although at first glance it seems that this is not what the database engine should do.
In this publication, I will provide the main ways of working with XML in Oracle, which I use myself. Here, examples of such operators and functions as: XMLType, XMLElement, xmlattributes, XMLAGG, XMLSequence, insertchildxml, xmlconcat will be considered.
The TO_DATE function converts a string to a DATE variable. Syntax: TO_DATE(source_string, Format, NLS_LANGUAGE); --The last parameter NLS_LANGUAGE (which I understand to be for setting the encoding) has never been useful to me. Examples: SQL> sel…
The TO_NUMBER function converts a string value to a numeric (NUMBER) value. Syntax: TO_NUMBER(source_string, Format, NLS_LANGUAGE); --The last parameter NLS_LANGUAGE (as I understand, for setting the encoding) has never been useful to me. Examples:…
The TO_CHAR function converts a date or number to a string. Syntax: TO_CHAR(original_value, Format, NLS_LANGUAGE); --The original value can be either a date (DATE) or a number (NUMBER). --The last parameter NLS_LANGUAGE (such as AMERICAN_AMERICA or RUSSIAN_RUSSIA) is used to specify the language for the date and time format. For example, if you want to display the date in Russian, you would use NLS_LANGUAGE = RUSSIAN_RUSSIA.