Oracle SQL, Function for finding out Age from DOB

PLSQL Script for Function

create or replace function dob (birth char) return char as
x date;
age varchar2(30);
begin
  select to_date(birth,'ddmmyyyy') into x from dual;
  select trunc(months_between(sysdate, x)/12) ||' Years '||
trunc(mod(months_between(sysdate, x),12)) ||' Months '||
trunc(sysdate-add_months(x, trunc(months_between(sysdate, x)/12)*12+trunc(mod(months_between(sysdate,x),12))))|| ' Days ' into age
from dual;
return age;
exception

Create or Alter User failed: ORA-00600: internal error code, arguments: [kzsviver:4]

Error Description

Create user command failed with following error.

SQL>  CREATE USER "ST" IDENTIFIED BY VALUES 'S:E285C80B22886275424125E6A479E3B9CA84

F5FE51932DE4EF028DEA2CBF;D766CF03D5031EDC'    ;

 CREATE USER "ST" IDENTIFIED BY VALUES 'S:E285C80B22886275424125E6A479E3B9CA84

*

ERROR at line 1:

TRACEFILE_IDENTIFIER Parameter Oracle 11g

This parameter is used to identify the tracefile easily from the directory. When you specify or set this parameter with a value that value becomes the part of the trace file name. So that easily can be identified from the directory. This is a session modifiable parameter and each time when you modify the parameter value the name of the very immediate trace file will get effect of the same.  

Putty Configuration Error: There is no disk in the drive. Please insert a disk into drive

Error Description:

After putting/accessing a DVD in the drive, while opening the putty.exe it is giving the following error message.

PuTTY Configuration: There is no disk in the drive. Please insert a disk into drive D:.

Data Pump Expdp ESTIMATE_ONLY Parameter

This parameter is useful when you wanted get the approximate size of the dump file. Suppose you have only limited space available in the disk and if you wanted to check whether your dump will be fit into the available space then you can use this parameter to check or estimate the size of the dump with doing the actual export. Some facts are here about estimate_only parameter.

Oracle SQL to Check the Database / Instance Name to Which the Current Session Is Connected using a Non DBA user

There are couple of options to find out the database name for the current session. If you are a DBA a privileged user/session you can query any data dictionary views. But it is not the same case for non-dba user session.

Here are the options.

Data Pump Expdp Impdp Metrics=Y Undocumented Parameter

This is an undocumented parameter for the data pump. The Matrics=y option will log the list of objects exported or imported in each category and the time taken for each category objects. All the details will be logged in the logfile. See an example below.

$ expdp dumpfile=tab_exp.dmp logfile=tab_exp.log schemas=sthomas metrics=Y directory=exp_dir

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-25 All Rights Reserved | Site Map | Contact | Disclaimer