Tuesday, November 24, 2015

Oracle ORA-00020 : Maximum Number of Processes(XXX) Exceeded.

Hi,

When connecting to oracle sometimes, user may face this error:

Maximum Number of Processes(XXX) Exceeded.

The reason is the process in the server are in use.

Solution:

<![if !supportLists]>1.    <![endif]>Is to increase the value of Processes in initialization parameter.

Or

<![if !supportLists]>2.    <![endif]>Kill the long time ideal session to free the processes. From oracle and in unix if needed


--List of processes not connected to sessions (Oracle8i):
***********************************************
select 'kill -9 '|| SPID || ';'  from v$process where program!= 'PSEUDO'and addr not in (select paddr from v$session)and addr not in (select paddr from v$bgprocess)and addr not in (select paddr from v$shared_server);

Thanks & Regards

Fauzi


Friday, November 20, 2015

The remote server returned an error: (407) Proxy Authentication Required.



Hello,

I was writing an asp.net utility(console application) to fetch an image from a URL. During development i faced the following message:

The remote server returned an error: (407) Proxy Authentication Required.

The solution is we need to place a app.config file to the project and add the following nodes





defaultProxy useDefaultCredentials="true"

Hope it helps...

Thursday, March 13, 2014

Startup The Database In Archivelog Mode / NoArchivelog Mode

Startup The Database In Archivelog Mode


Steps Required To Take A Database Not In Archive Log Mode And Alter It To Archive Log Mode

SELECT log_mode
FROM v$database;

SHUTDOWN;

STARTUP MOUNT EXCLUSIVE;

ALTER DATABASE ARCHIVELOG;

ALTER DATABASE OPEN;

SELECT log_mode
FROM v$database;

 

Startup The Database In NoArchivelog Mode


Steps Required To Take A Database In Archive Log Mode And Alter It To No Archive Log Mode

SELECT log_mode
FROM v$database;

SHUTDOWN;

STARTUP MOUNT EXCLUSIVE;

ALTER DATABASE NOARCHIVELOG;

ALTER DATABASE OPEN;

SELECT log_mode
FROM v$database;

 

Source: http://psoug.org/reference/archivelog.html

Thursday, February 6, 2014

allowDefinition='MachineToApplication' beyond application level

When am trying to build a web application through visual studio 2010, I was getting the following error message.

·         "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. 
This error can be caused by a virtual directory not being configured as an application in IIS. "

 

The solution is to check whether the is any other sub folder which is having web.config file. After removing it, The build was successful.

 

Best Regards

 

Sunday, November 17, 2013

Grants given to objects through Roles for a Schema & without Roles (Direct)

Hi Folks,

 

The following queries are very much useful to get the list of Grants given to Roles for a particular schema objects & to List the direct grants given to users.

 

Grants given to objects through Roles for a Schema

**************************************************

SELECT TP.OWNER,TP.GRANTEE,RP.GRANTEE, TP.TABLE_NAME, TP.PRIVILEGE FROM DBA_TAB_PRIVS TP, DBA_ROLE_PRIVS RP WHERE TP.GRANTEE = RP.GRANTED_ROLE AND TP.OWNER='Schema Name'

ORDER BY 1,2,3 

 

 

Individual Grants given to objects without using Roles:

********************************************************

SELECT TP.OWNER,TP.GRANTEE,TP.TABLE_NAME, TP.PRIVILEGE FROM dba_tab_privs TP

where TP.OWNER='<Schema Name>' AND GRANTEE NOT IN (Select ROLE from DBA_ROLES) ORDER BY 2,3,4

 

Thanks & Regards

Fauzi

 

Oracle: History of SQL Statements in Oracle 11g

Hello,

 

The following sql query is very much help full to get the history of sql queries run on the server.

 

SQL:

select a.USER_ID, a.SESSION_ID,b.sql_text from DBA_HIST_ACTIVE_SESS_HISTORY a, dba_hist_sqltext b where a.sql_id=b.sql_id

 

Thanks & Regards

Fauzi

 

 

Monday, November 11, 2013

Oralce Query to Get Last Sunday or Frieday of the month

The following query is very much useful:

 

 

SELECT next_day(last_day(sysdate)-7,'Friday') from dual

 

SELECT next_day(last_day(sysdate)-7,'Sunday') from dual

 

Thanks & Regards

Fauzi