Showing posts with label Database connection error. Show all posts
Showing posts with label Database connection error. Show all posts

Wednesday, 24 December 2014

SP2-1503: Unable to initialize Oracle call interface /SP2-0152: ORACLE may not be functioning properly

Error: 

C:\Users\Mizan>E:\OraHome_1\BIN\sqlplus.exe
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly

When logged on to the Windows server as a non-Administrator OS account using Microsoft Terminal Services client (mstsc.exe), starting SQL*Plus fails with

SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly

Reason:

Starting SQL*Plus works when logged on to the Windows server using an Administrator OS account.

Starting SQL*Plus works when logged on locally to the Windows server console using the non-Administrator OS account.
Cause

The issue is related to a Windows Security configuration. The problem is caused by a security policy called "Create Global Objects". The user account that is used to run the program does not have the "Create global objects" user right. This security policy was introduced with Windows 2000 SP4, and determines if applications started during a Terminal Services session can create or access globally accessible memory. By default, members of the Administrators group, the System account, and Services that are started by the Service Control Manager are assigned the "Create global objects" user right.


Solution:

Assign the "Create global objects" user right to the non-Administrator account.

1. Click Start, point to Programs, point to Administrative Tools, and then click Local Security Policy.
2. Expand Local Policies, and then click User Rights Assignment.
3. In the right pane, double-click Create global objects.
4. In the Local Security Policy Setting dialog box, click Add.
5. In the Select Users or Group dialog box, click the user account that you want to add, click Add, and then click OK.
6. Click OK.







Thursday, 18 December 2014

ORA-12526: TNS:listener: all appropriate instances are in restricted mode

Scenario: When try to connect Database using tns name getting the following error

C:\Documents and Settings\Administrator>sqlplus

SQL*Plus: Release 10.2.0.3.0 - Production on Thu Dec 18 19:02:17 2014

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

Enter user-name: cib/cciibb@
ERROR:
ORA-12526: TNS:listener: all appropriate instances are in restricted mode

Reason: You are trying to connect to a database that has been started in restricted mode.

When a database is put in restricted mode for maintenance operations only users with the RESTRICTED SESSION privilege can connect to it (SYSDBAs and SYSOPERs) and only by using a local database connection.


Solution: 

connect Database as sysdba and execute the following command

C:\Users\Administrator>sqlplus

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 18 19:20:11 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter user-name: /as sysdba

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL>ALTER SYSTEM DISABLE RESTRICTED SESSION;

Now try to connect using tnsnames