TopMiniSite
-
7 min readIn Oracle, you can audit user password changes using the "AUDIT CREATE SESSION" command in SQL*Plus. This command will log all password changes made by users with the necessary privileges. Additionally, you can review the audit trail in the database to identify who changed a specific user's password. This information can help you track down the user responsible for the password change.
-
7 min readTo decompress a Hadoop Snappy compressed file in Java, you can use the SnappyFramedInputStream class from the Apache Commons Compress library. First, you need to read the compressed file using a FileInputStream and then pass it to the SnappyFramedInputStream to decompress the data. You can then read the decompressed data from the input stream and process it as needed. Remember to close the input streams after you are done using them to free up system resources.
-
4 min readIn PostgreSQL, you can split a string using the string_to_array function. This function takes two arguments: the string you want to split and the delimiter you want to use to split the string.For example, if you want to split the string "hello,world" by the comma delimiter, you can use the following query:SELECT string_to_array('hello,world', ',');This will return an array with two elements: "hello" and "world".
-
5 min readTo call a stored procedure of Oracle using C#, you can use the OracleCommand class from the Oracle Data Provider for .NET (ODP.NET) library.First, create a connection to the Oracle database using the OracleConnection class and open the connection. Then, create an OracleCommand object and set the CommandType property to StoredProcedure.Next, set the CommandText property to the name of the stored procedure you want to call.
-
4 min readTo remove XML attributes in PostgreSQL, you can use the xpath function in combination with the xmlquery function. First, select the XML column from your table and use the xmlquery function to extract the element without the attribute. Then, update the column with the new XML data.
-
5 min readTo find specific values in a table in Oracle, you can use a SELECT statement with a WHERE clause. The WHERE clause allows you to specify the conditions that the rows must meet in order to be retrieved.
-
2 min readIn PostgreSQL, to return randomly multiple rows from a table, you can use the ORDER BY random() clause in your query. By sorting the rows randomly and limiting the number of rows returned, you can achieve the desired result. Here is an example query:SELECT * FROM your_table ORDER BY random() LIMIT n;Replace your_table with the name of your table and n with the number of rows you want to retrieve. This query will return n randomly selected rows from the table.
-
4 min readTo create a user in Oracle 12c, you can use the CREATE USER statement. First, connect to the Oracle Database using SQL*Plus or another SQL client. Then, execute the CREATE USER command followed by the username and password for the new user. You can also assign specific privileges, roles, and quotas to the user during creation. Make sure to have the necessary permissions to create users in the database.
-
3 min readUNO is a new database architecture available in Oracle Database 21c, which focuses on simplifying database management by providing a single deployment option. On the other hand, DUAL is a standard table in Oracle databases that serves as a virtual table with a single row and single column, typically used for performing calculations or querying system functions.
-
4 min readTo coalesce two columns with a default value of 0 in PostgreSQL, you can use the COALESCE function. This function returns the first non-null value from a list of arguments.You can achieve this by using the COALESCE function with the two columns as arguments, and specifying 0 as the default value.
-
5 min readIn Oracle, the equivalent of the object_name() function would be the USER_OBJECTS view. This view provides information about objects owned by the current user, including tables, views, procedures, functions, packages, and more. By querying the USER_OBJECTS view, you can retrieve the names of all the objects owned by the current user.[rating:dc3bb8f1-bf14-46f8-a39b-16fc925c6a8c]How to check the availability of object_name() in Oracle.