cancel
Showing results for 
Search instead for 
Did you mean: 

sap system message: DB error: SQL error 376 occurred

Former Member
0 Kudos

Hi All,

In solution Manager 7.0 NW2004s Operating system Windows 2003 server, Oracle 10g

When I try to access through SAP GUI I got this error:

From SAP GUI

sap system message: DB error: SQL error 376 occurred

Check O/S SAP System Log

Database error 376 at SEL access to table USR02

Restart server now works fine... I got same problem yesterday, almost everyday I restart server...

Please anyone help me

Thank

angeline

Accepted Solutions (1)

Accepted Solutions (1)

stefan_koehler
Active Contributor
0 Kudos

Hello Angeline,

at first you need to understand what a "Database error 376 at SEL access to table USR02" is.

The corresponding oracle error:


Error:  ORA 376  
Text:   file <name> cannot be read at this time 
-------------------------------------------------------------------------------
Cause:  An attempt was made to read from a file that is not readable.
        The most likely cause is that the file is off line.
Action: Check the state of the file.
        Bring the file online, if necessary.

You will also see such errors in the alert.log file too.

So what can cause this problem? As you said that you got this problem every day i would guess that this is a backup issue (caused by locking mechanism on windows). Please check if some filesystem backup is running at the same time when you encounter this error.

Regards

Stefan

Former Member
0 Kudos

Thank you very much for all give me very good information;

Basically I can't even on server, Dispature is stopped, I restart instance but same thing... checked all Oracle services are running in Automatic mode...

I just reboot machine... lets see what gonna be heppnd

Thanks

Former Member
0 Kudos

Hi again

Basically dispature is stopped!!! please help me

here is dev_w0 log

-


trc file: "dev_w0", trc level: 1, release: "700"

-


*

  • ACTIVE TRACE LEVEL 1

  • ACTIVE TRACE COMPONENTS all, MJ

*

B

B Wed Jan 06 08:51:53 2010

B create_con (con_name=R/3)

B Loading DB library 'D:\usr\sap\SOL\DVEBMGS00\exe\dboraslib.dll' ...

B Library 'D:\usr\sap\SOL\DVEBMGS00\exe\dboraslib.dll' loaded

B Version of 'D:\usr\sap\SOL\DVEBMGS00\exe\dboraslib.dll' is "700.08", patchlevel (0.144)

B New connection 0 created

M sysno 00

M sid SOL

M systemid 562 (PC with Windows NT)

M relno 7000

M patchlevel 0

M patchno 146

M intno 20050900

M make: multithreaded, Unicode, 64 bit, optimized

M pid 5028

M

M kernel runs with dp version 232000(ext=109000) (@(#) DPLIB-INT-VERSION-232000-UC)

M length of sys_adm_ext is 576 bytes

M ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 5028) [dpxxdisp.c 1305]

I MtxInit: 30000 0 0

M DpSysAdmExtCreate: ABAP is active

M DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active

M

M Wed Jan 06 08:51:54 2010

M DpShMCreate: sizeof(wp_adm) 25168 (1480)

M DpShMCreate: sizeof(tm_adm) 5652128 (28120)

M DpShMCreate: sizeof(wp_ca_adm) 24000 (80)

M DpShMCreate: sizeof(appc_ca_adm) 8000 (80)

M DpCommTableSize: max/headSize/ftSize/tableSize=500/16/552064/552080

M DpShMCreate: sizeof(comm_adm) 552080 (1088)

M DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0

M DpShMCreate: sizeof(slock_adm) 0 (104)

M DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0

M DpShMCreate: sizeof(file_adm) 0 (72)

M DpShMCreate: sizeof(vmc_adm) 0 (1864)

M DpShMCreate: sizeof(wall_adm) (41664/36752/64/192)

M DpShMCreate: sizeof(gw_adm) 48

M DpShMCreate: SHM_DP_ADM_KEY (addr: 0000000010E80050, size: 6348592)

M DpShMCreate: allocated sys_adm at 0000000010E80050

M DpShMCreate: allocated wp_adm at 0000000010E82150

M DpShMCreate: allocated tm_adm_list at 0000000010E883A0

M DpShMCreate: allocated tm_adm at 0000000010E88400

M DpShMCreate: allocated wp_ca_adm at 00000000113EC2A0

M DpShMCreate: allocated appc_ca_adm at 00000000113F2060

M DpShMCreate: allocated comm_adm at 00000000113F3FA0

M DpShMCreate: system runs without slock table

M DpShMCreate: system runs without file table

M DpShMCreate: allocated vmc_adm_list at 000000001147AC30

M DpShMCreate: allocated gw_adm at 000000001147ACB0

M DpShMCreate: system runs without vmc_adm

M DpShMCreate: allocated ca_info at 000000001147ACE0

M DpShMCreate: allocated wall_adm at 000000001147ACF0

M

M Wed Jan 06 08:51:55 2010

M ThTaskStatus: rdisp/reset_online_during_debug 0

X EmInit: MmSetImplementation( 2 ).

X MM global diagnostic options set: 0

X <ES> client 0 initializing ....

X Using implementation view

X <EsNT> Using memory model view.

M <EsNT> Memory Reset disabled as NT default

X ES initialized.

M

M Wed Jan 06 08:51:56 2010

M ThInit: running on host CWE-SOL-MAN

M

M Wed Jan 06 08:51:59 2010

M calling db_connect ...

C Prepending D:\usr\sap\SOL\DVEBMGS00\exe to Path.

C Oracle Client Version: '10.2.0.2.0'

C Client NLS settings: AMERICAN_AMERICA.UTF8

C Logon as OPS$-user to get SAPSR3's password

C Connecting as /@SOL on connection 0 (nls_hdl 0) ... (dbsl 700 250407)

C Nls CharacterSet NationalCharSet C EnvHp ErrHp ErrHpBatch

C 0 UTF8 1 00000000128420C0 000000000A786380 000000000A78BBA8

C Attaching to DB Server SOL (con_hdl=0,svchp=000000000A78BA68,srvhp=0000000012861118)

C

C Wed Jan 06 08:52:03 2010

C Starting user session (con_hdl=0,svchp=000000000A78BA68,srvhp=0000000012861118,usrhp=000000000A786B98)

C

C Wed Jan 06 08:52:04 2010

C Now '/@SOL' is connected (con_hdl 0, nls_hdl 0).

C Got SAPSR3's password from OPS$-user

C Disconnecting from connection 0 ...

C Closing user session (con_hdl=0,svchp=000000000A78BA68,usrhp=000000000A786B98)

C Now I'm disconnected from ORACLE

C Connecting as SAPSR3/<pwd>@SOL on connection 0 (nls_hdl 0) ... (dbsl 700 250407)

C Nls CharacterSet NationalCharSet C EnvHp ErrHp ErrHpBatch

C 0 UTF8 1 00000000128420C0 000000000A786380 000000000A78BBA8

C Starting user session (con_hdl=0,svchp=000000000A78BA68,srvhp=0000000012861118,usrhp=000000000A786B98)

C Now 'SAPSR3/<pwd>@SOL' is connected (con_hdl 0, nls_hdl 0).

C Database NLS settings: AMERICAN_AMERICA.UTF8

C DB instance SOL is running on CWE-SOL-MAN with ORACLE version 10.2.0.2.0 since JAN 06, 2010, 08:51:16

B Connection 0 opened (DBSL handle 0)

B Wp Hdl ConName ConId ConState TX PRM RCT TIM MAX OPT Date Time DBHost

B 000 000 R/3 000000000 ACTIVE NO YES NO 000 255 255 20100106 085159 CWE-SOL-MAN

C OCI-call failed with -1=OCI_ERROR

C SQL error 376: 'ORA-00376: file 7 cannot be read at this time

C ORA-01110: data file 7: 'F:\ORACLE\SOL\SAPDATA2\SR3_4\SR3.DATA4''

C *** ERROR => Error 376 in stmt_fetch() from oci_execute_stmt(), orpc=0

[dbsloci.c 12720]

C *** ERROR => ORA-376 occurred when executing SQL stmt (parse error offset=0)

[dbsloci.c 12739]

C sc_p=000000001277E0C0,no=0,idc_p=0000000000000000,con=0,act=1,slen=26,smax=256,#vars=0,stmt=000000000A79AB20,table=SVERS

C SELECT VERSION FROM SVERS ;

C sc_p=000000001277E0C0,no=0,idc_p=0000000000000000,con=0,act=1,slen=26,smax=256,#vars=0,stmt=000000000A79AB20,table=SVERS

C prep=0,lit=0,nsql=0,lobret=0,#exec=1,dbcnt=0,upsh_p=0000000000000000,ocistmth_p=000000001286AA58

C IN : cols=0,rmax=1,xcnt=0,rpc=0,rowi=0,rtot=0,upto=-1,rsize=0,vmax=0,bound=0,iobuf_p=0000000000000000,vda_p=0000000000000000

C lobs=0,lmax=0,lpcnt=0,larr=0000000000000000,lcurr_p=0000000000000000,rret=0

C OUT: cols=1,rmax=1,xcnt=1,rpc=0,rowi=0,rtot=0,upto=-1,rsize=144,vmax=32,bound=1,iobuf_p=0000000007DFF1A0,vda_p=000000000A711DA0

C lobs=0,lmax=0,lpcnt=0,larr=0000000000000000,lcurr_p=0000000000000000,rret=0

C SELECT VERSION FROM SVERS ;

B ***LOG BZA=> table SVERS does not exist on database [dblink#5 @ 1299] [dblink 1299 ]

M ***LOG R19=> ThInit, db_connect ( DB-Connect 004096) [thxxhead.c 1440]

M in_ThErrHandle: 1

M *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c 10468]

M

M Info for wp 0

M

M stat = WP_RUN

M waiting_for = NO_WAITING

M reqtype = DP_RQ_DIAWP

M act_reqtype = NO_REQTYPE

M rq_info = 0

M tid = -1

M mode = 255

M len = -1

M rq_id = 65535

M rq_source =

M last_tid = 0

M last_mode = 0

M semaphore = 0

M act_cs_count = 0

M csTrack = 0

M csTrackRwExcl = 0

M csTrackRwShrd = 0

M mode_cleaned_counter = 0

M control_flag = 0

M int_checked_resource(RFC) = 0

M ext_checked_resource(RFC) = 0

M int_checked_resource(HTTP) = 0

M ext_checked_resource(HTTP) = 0

M report = > <

M action = 0

M tab_name = > <

M attachedVm = no VM

M

M *****************************************************************************

M *

M * LOCATION SAP-Server CWE-SOL-MAN_SOL_00 on host CWE-SOL-MAN (wp 0)

M * ERROR ThInit: db_connect

M *

M * TIME Wed Jan 06 08:52:04 2010

M * RELEASE 700

M * COMPONENT Taskhandler

M * VERSION 1

M * RC 13

M * MODULE thxxhead.c

M * LINE 10688

M * COUNTER 1

M *

M *****************************************************************************

M

M PfStatDisconnect: disconnect statistics

M Entering TH_CALLHOOKS

M ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP

M *** ERROR => ThrSaveSPAFields: no valid thr_wpadm [thxxrun1.c 724]

M *** ERROR => ThCallHooks: event handler ThrSaveSPAFields for event BEFORE_DUMP failed [thxxtool3.c 261]

M Entering ThSetStatError

M ThIErrHandle: do not call ThrCoreInfo (no_core_info=0, in_dynp_env=0)

M Entering ThReadDetachMode

M call ThrShutDown (1)...

M ***LOG Q02=> wp_halt, WPStop (Workproc 0 5028) [dpnttool.c 327]

stefan_koehler
Active Contributor
0 Kudos

Hello Angeline,

in general the ORA-00376 still persists, because of we haven't fixed it until yet.

Let's take a look at the work process trace file (you would see the same information in the alert.log file)


C OCI-call failed with -1=OCI_ERROR 
C SQL error 376: 'ORA-00376: file 7 cannot be read at this time 
C ORA-01110: data file 7: 'F:\ORACLE\SOL\SAPDATA2\SR3_4\SR3.DATA4'' 
C *** ERROR => Error 376 in stmt_fetch() from oci_execute_stmt()

Your data file 7 still has the status RECOVER or OFFLINE.

You need to fix this and find the reason for that (already mentioned one cause for that).

Now just perform the following steps to fix this issue and get your database and SAP up again.


shell> sqlplus / as sysdba
SQL> SELECT FILE#, STATUS FROM V$DATAFILE;
--> Now take a look at the result and perform the following two commands for every 
--> data file which has the status RECOVER / OFFLINE
SQL> recover datafile #NUMBER;
SQL> alter database datafile #NUMBER online; 

After you have performed these steps just restart your database and try to start SAP again.

Regards

Stefan

Former Member
0 Kudos

Hi Stefen,

Problem has been resolved, thank a lot

Former Member
0 Kudos

Stefan:

Thanks, t helped me tonight bringing SAP prod backup after DB error 376. Cluster node failed, in the process needed recover. Thanks again

Answers (2)

Answers (2)

markus_doehr2
Active Contributor
0 Kudos

What patchlevel are you running?

What do you see in the syslog (SM21)?

Markus

former_member204746
Active Contributor
0 Kudos

The error you are getting means:

ORA-00376: File can not be read at this time

check SAP note 328785.