21 Mayıs 2014 Çarşamba

Oracle Linux Server Red Hat Nash Version Screen Resolution Problem

My colleague in my company assignmed to search about resolution problem on screen about Oracle Linux Server which is Red Hat Nash 5.1.19.6 version.  I have solved problem. The main cause was the configuration between graphic adapter and linux graphic settings. So the solution is to change kernel settings.

To do this, you need to restart your computer before bios setup showing page and you need to keep pushing F8 (It might differentiate from computer to computer,it was SHIFT button at another computer mentioned in an article which i read). After that you will choose kernel option  with 'E' button.because there will be three options. 'E' button means EDIT. Then you need to find code ending with 'rhgb quiet'.After i removed and added 'nomodeset' code, i boot server again then THERE YOU GO!


                                                          This was the first situation


                                           
                                                                      Result :)

13 Mayıs 2014 Salı

USE OF SOME PL/SQL FUNCTIONS IN SQL



ID1         ID2                  GNDR

5416             WOMEN WOMEN
5418     2290753          WOMEN

Here we have an instance table above and its name is GENDER also its coloumns names are ID1,ID2,GND4

LTRIM() function removes all specified characters from left side of first value shown inside function

SELECT LTRIM(gndr,'W') from GENDER;

Result;

OMEN WOMEN
OMEN

SELECT LTRIM (gndr,'WO') FROM GENDER

Result;
MEN WOMEN
MEN


RTRIM() function removes all specified characters from right side of first value shown inside function

SELECT RTRIM(gndr,'W') from GENDER;

Result;
OMEN WOMEN
OMEN


SELECT RTRIM (gndr,'EN') FROM GENDER

Result;
WOMEN WOM
WOM


NVL() function decides about returning value if specified value is null


SELECT NVL(ID2,0') FROM GENDER;

Result;

0
2290753

TRUNC() function to truncate some values from right side;

SELECT SYSDATE FROM DUAL;
Result;
will be
13/05/2014 15:59:55

SELECT TRUNC(SYSDATE) FROM DUAL;

Result;

13/05/2014

TRUNC() function also is used for some other reasons;

SELECT TRUNC(135.45,1) FROM DUAL;
Result;
135,4

SELECT TRUNC(135.45,0) FROM DUAL;

Result;
135

SELECT TRUNC(135.45,2) FROM DUAL;

Result;
135,45

SELECT TRUNC(135.45,-1) FROM DUAL;

Result;
130

SELECT TRUNC(135.45,-2) FROM DUAL;

Result;
100

SELECT TRUNC(135.45,-3) FROM DUAL;

Result;
0

9 Mayıs 2014 Cuma

Secured Entities and Tables in Oracle

When i study on Human Resources tables in my company's database, i have encountered some thing new inside a view which i guessed that it was a table :)
Its name is HR_ORGANIZATION_UNITS but here is a significant detail; this is not a table. This is a view and it does have a APPS prefix which is used for views in oracle.What caused me searching this is similarities with HR.HR_ALL_ORGANIZATION_UNITS table I asked why these both tables have same names and contents.Here is wrong aprroach.The first one is not table.Once again it is a view. So when i search it from oracle documentation web site i faced security subject. Oracle has some restrictions on restricted users on some tables having these entities.

Some oracle documentation findings which might be usefull;

'Restricted security profiles can optionally make use of read-only, or reporting users. These are separate Oracle User,one per restricted security profile, that have read-only access to Oracle tables and view. Reporting users do not have execute privilege on Oracle HRMS PL/SQL packages, and do not have direct access to the secured Oracle HRMS tables.'

  • Organizations
  • People
  • Assignments
  • Positions
  • Vacancies
  • Payrolls
All other entities are unrestricted;that is restricted security profiles can access all records of tables,views and sequences associated with these entities.


The following Oracle HRMS tables are secured:

  • HR_ALL_ORGANIZATION_UNITS
  • PER_ALL_POSITIONS
  • HR_ALL_POSITIONS_F
  • PER_ALL_VACANCIES
  • PER_ALL_PEOPLE_F
  • PER_ALL_ASSIGNMENTS_F
  • PAY_ALL_PAYROLLS_F
Some of these tables (namely PER_ALL_PEOPLE_F,PER_ALL_ASSIGNMENTS_F,HR_ALL_POSITIONS_F and PAY_ALL_PAYROLLS_F)are datetracked. The following table details the views that are based on the
secured tables listed above.


HR_ORGANIZATION_UNITSSecure view of Organization table
HR_ALL_ORGANIZATION_UNITSOrganization table
PER_ORGANIZATION_UNITSSecure view of Organization view (HR Orgs only)
PER_ALL_ORGANIZATION_UNITSUnsecured view of Organization view (HR Orgs only)
HR_ALL_POSITIONSUnrestricted view of datetracked Positions table, effective at session date
HR_ALL_POSITIONS_FDatetracked Positions table
HR_POSITIONSSecure view of datetracked Positions table, effective at session date
HR_POSITIONS_FSecure view of datetracked Positions table
HR_POSITIONS_XSecure view of datetracked Positions table, effective at system date
PER_POSITIONSSecure view of non-datetracked Positions table
PER_ALL_POSITIONSNon-datetracked Positions table
PER_VACANCIESSecure view of Vacancies table
PER_ALL_VACANCIESVacancies table
PER_ASSIGNMENTSSecure view of Assignments table, effective at session date
PER_ASSIGNMENTS_FSecure view of Assignments table
PER_ASSIGNMENTS_XSecure view of Assignments table, effective at system date
PER_ALL_ASSIGNMENTSUnrestricted view of Assignments table, effective at session date
PER_ALL_ASSIGNMENTS_FAssignments table
PER_PEOPLESecure view of Person table, effective at session date
PER_PEOPLE_FSecure view of Person table
PER_PEOPLE_XSecure view of Person table, effective at system date
PER_ALL_PEOPLEUnrestricted view of Person table, effective at session date
PER_ALL_PEOPLE_FPerson table
PAY_PAYROLLSSecure view of Payrolls table, effective at session date
PAY_PAYROLLS_FSecure view of Payrolls table
PAY_PAYROLLS_XSecure view of Payrolls table, effective at system date
PAY_ALL_PAYROLLSUnrestricted view of Payrolls table, effective at session date
PAY_ALL_PAYROLLS_FPayrolls table