Skip to main content

Posts

Get Data in Rows and aggregates into columns

The new  PIVOT  operator   in 11g  takes data in separate rows, aggregates it and converts it into columns:- For example we have data in such a format:-  SQL> Select * from (.....) Name Time_Diff Pivot_For A 0 0:0:0.0 First A 0 0:0:2.428 Second A 0 0:0:5.548 Third A 0 0:1:1.991 Fourth B 0 0:2:0.0 First B 0 0:0:3.428 Second B 0 0:0:5.248 Third B 0 0:2:3.991 Fourth C 0 1:2:0.0 First C 0 2:0:3.428 Second C 0 3:0:5.248 Third C 0 0:45:3.991 Fourth To aggregate Data in columns we can use Pivot operator in Oracle as follows:- SQL> Select * from (.....) PIVOT(           Max(Time_Diff)           FOR  Pivot_For in ('First' as First, 'Second' as Second,           'Third' as Third, 'Fourth' as Fourth) ...

ORA-12520: TNS:listener could not find available handler for requested type of server

Cause:- The most frequent cause is the smaller value of the parameter "PROCESSES" set in Oracle, which needs to be increased in order to solve this issue PROCESSES  specifies the maximum number of operating system user processes that can simultaneously connect to Oracle Value of this parameter can be fetched using query:- SQL> show parameter process SQL>SELECT name, value  FROM gv$parameter  WHERE isdefault = 'FALSE';  Solution:- Login as a system DBA ( conn  sys  as sysdba ) SQL>  alter system set processes=200 scope=spfile Restart the oracle database and the newly entered value for processes parameter will come into effect.

ORA-28001: the password has expired

Crosscheck by value of accout_status field in dba_users view. sql> select username,account_status from dba_users; Execute the following query Sql > select * from dba_profiles; the output of this query will show, Default Password expire lifetime  PASSWORD_LIFE_TIME field is responsible for expiring of password after x days. execute following command to disable this feature: Sql> ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; Now crosscheck for disabling of this feature. Sql > select * from dba_profiles; Now change the password of locked user and unlock using following. sql> alter user [user_name] identified by [password]; sql> alter user [User_name] account unlock; Crosscheck by value of accout_status field in dba_users view. sql> select username,account_status from dba_users; The value of account_status filed should by " OPEN " for corresponding user.

3 tier architecture application or MVC application are different or same

Answer :- http://en.wikipedia.org/wiki/Multitier_architecture#Comparison_with_the_MVC_architecture Comparison with the MVC architecture At first glance, the three tiers may seem similar to the model-view-controller (MVC) concept; however, topologically they are different. A fundamental rule in a three tier architecture is the client tier never communicates directly with the data tier; in a three-tier model all communication must pass through the middle tier. Conceptually the three-tier architecture is linear. However, the MVC architecture is triangular: the view sends updates to the controller, the controller updates the model, and the view gets updated directly from the model. From a historical perspective the three-tier architecture concept emerged in the 1990s from observations of distributed systems (e.g., web applications) where the client, middle ware and data tiers ran on physically separate platforms. Whereas MVC comes from the previous decade (by work at Xerox PARC in th...