oracle异常关闭,启动:ORA-24324: service handle not initialized

oracle关闭异常,再次启动时错误信息如下:

SQL> shutdown immediate;
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-01089: immediate shutdown in progress - no operations are permitted
SQL> startup mount;
ORA-01031: insufficient privileges

SQL> conn xxx;  
Enter password: 
ERROR:
ORA-01089: immediate shutdown in progress - no operations are permitted
Process ID: 0
Session ID: 0 Serial number: 0


Warning: You are no longer connected to ORACLE.
  • 解决办法:
  • 解决办法:

    [oracle@localhost ~]$ sqlplus / as sysdba;
    
    SQL*Plus: Release 11.2.0.4.0 Production on Fri Nov 17 15:44:52 2017
    
    Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    
    Connected.
    SQL> shutdown abort
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    
    Total System Global Area 2438529024 bytes
    Fixed Size          2255672 bytes
    Variable Size         671089864 bytes
    Database Buffers     1744830464 bytes
    Redo Buffers           20353024 bytes
    Database mounted.
    Database opened.
阅读更多

oci高手请进,ORA-24324: service handle not initialized

10-11

为什么会出现ORA-24324: service handle not initialized?rn数据库没问题,我用sqlplus登陆执行Sql没问题。rnrnOCIEnv* env;rn OCIError* err;rnrn OCIServer* srv;rn OCISvcCtx* svc;rn OCISession* ses;rn rn OCIStmt* stmtp;//语句句柄rn OCIDefine* hDefine;//定义句柄—用于数组变量rnrn text username[30];rn text password[30];rn text dbname [30];rn text sSQL[1024];rn text output[100];rnrn sword r;rnrn if (argc < 2) rn printf("usage %s username/password[@dbname]\n");rn exit (-1);rn rnrn parse_connect_string(argv[1],username, password, dbname);rnrn env = 0;rn err = 0;rn srv = 0;rn svc = 0;rn ses = 0;rn stmtp = 0;rn hDefine = 0;rnrn r=OCIEnvCreate( &env, OCI_DEFAULT, 0, 0, 0, 0, 0, 0); rn if (r != OCI_SUCCESS) rn printf("OCIEnvCreate failed!\n");rn goto clean_up;rn rn OCIHandleAlloc(env, (dvoid**)&err, OCI_HTYPE_ERROR, 0, 0);rn OCIHandleAlloc(env, (dvoid**)&srv, OCI_HTYPE_SERVER, 0, 0);rn OCIHandleAlloc(env, (dvoid**)&svc, OCI_HTYPE_SVCCTX, 0, 0);rn OCIHandleAlloc(env, (dvoid**)&ses, OCI_HTYPE_SESSION, 0, 0);rn OCIHandleAlloc(env, (dvoid**)&stmtp,OCI_HTYPE_STMT, 0, 0);rn r=OCIServerAttach(srv, err, dbname, strlen(dbname), (ub4) OCI_DEFAULT);rn if (r != OCI_SUCCESS) rn checkerr(err, r);rn goto clean_up;rn rn printf ("OCIServerAttach is done\n");rn /* set attribute server context in the service context */rn OCIAttrSet(svc, OCI_HTYPE_SVCCTX, srv, 0, OCI_ATTR_SERVER, err);rnrn OCIAttrSet(ses, OCI_HTYPE_SESSION, username, strlen(username), OCI_ATTR_USERNAME, err); rn OCIAttrSet(ses, OCI_HTYPE_SESSION, password, strlen(password), OCI_ATTR_PASSWORD, err); rnrn r=OCISessionBegin (svc, err, ses, OCI_CRED_RDBMS, OCI_DEFAULT);rn checkerr(err, r);rn printf ("OCISessionBegin is done\n");rn rn sprintf(sSQL, "select table_name from user_tables"); rn r = OCIStmtPrepare(stmtp,err,sSQL, strlen(sSQL), OCI_NTV_SYNTAX, OCI_DEFAULT);rn if(r != OCI_SUCCESS && r != OCI_SUCCESS_WITH_INFO)rn checkerr(err, r);rn goto clean_up;rn rn printf ("OCIStmtPrepare is done\n");rn r = OCIStmtExecute(svc, stmtp, err, 0, 0, NULL, NULL, OCI_DEFAULT); rn checkerr(err, r);rn printf ("OCIStmtExecute is done\n");rn rn hDefine = NULL; rn r = OCIDefineByPos(stmtp, &hDefine, err, 1, output, sizeof(output), SQLT_CHR, NULL, NULL, NULL, OCI_DEFAULT);rn checkerr(err, r);rn printf ("OCIDefineByPos is done\n");rn r=OCIStmtFetch(stmtp,err,1,OCI_FETCH_NEXT,OCI_DEFAULT);rn checkerr(err, r);rn printf("buf = %.*s\n", output);rnrn执行结果如下:rnOCIServerAttach is donernOCISessionBegin is donernOCIStmtPrepare is donernError - ORA-24324: service handle not initializedrnrnOCIStmtExecute is donernOCIDefineByPos is donernError - ORA-24338: statement handle not executedrnrnbuf = (null)rn

ORA-24314: service handle not initialized 数据库服务器启动不了,求救!

08-20

ORA-24314: service handle not initialized rn各位大侠,我的Oracle以前是好的,但可能安装哪个补丁时影响了,现在一启动就出现这样的提示:rn[oracle@localhost oracle]$ dbstartrnrnSQL*Plus: Release 9.0.1.0.0 - Production on Fri Aug 20 09:35:52 2004rnrn(c) Copyright 2001 Oracle Corporation. All rights reserved.rnrnSQL> ERROR:rnORA-24314: service handle not initializedrnrnrnSQL> ORA-12545: Connect failed because target host or object does not existrnSQL> rnDatabase "appora" warm started.rn---------------------------------------------rnlsnrctl的提示:rnrn$ lsnrctl startrnrnLSNRCTL for Linux: Version 9.0.1.0.0 - Production on 20-AUG-2004 09:29:11rnrnCopyright (c) 1991, 2001, Oracle Corporation. All rights reserved.rnrnStarting /opt/oracle/product/9i/bin/tnslsnr: please wait...rnrnTNS-12545: Connect failed because target host or object does not existrnTNS-12560: TNSrotocol adapter errorrnTNS-00515: Connect failed because target host or object does not existrnLinux Error: 2: No such file or directoryrnrn---------------------------------------------rnlistener.ora , tnsnames.ora,sqlnet.ora等配置文件都检查过(放到配置相同的另一个服务器可以使用),没问题的 rnrn请指教啊,感谢!rnrn

没有更多推荐了,返回首页