cancel
Showing results for 
Search instead for 
Did you mean: 

I cannot add datafile using SAPDBA

Former Member
0 Kudos

Hi all,

When I am trying to add a data file to tablespace through SAPDBA,I am getting a error “/oracle/(sid)/sapdata3 file has no write permission. I am getting this error for all tablespace.It is showing the error code 13.

Please help me how can I proceed.(our SAP is 4.7E and DB is Oracle 9.2.0)

Regards

Nani

Accepted Solutions (0)

Answers (1)

Answers (1)

andreas_herzog
Active Contributor
0 Kudos

-> which user is starting sapdba? you should try ora<sid>

-> which authorizations are set for /oracle/<SID>/sapdata3?

-> did you implement OP$ mechanism?

GreetZ, AH

Former Member
0 Kudos

The error is showing like below

______________________________________________________________________________

Alter tablespace PSAPDQG add data file

______________________________________________________________________________

a - Show existing data files: 11 old files

b - New path: '/oracle/DQG/sapdata4/dqg_12/dqg.data12'

c - New size: 2097152 K

SAPDBA: No write access to directory

'/oracle/DQG/sapdata4'!

errno = 13

Permission denied

Press <return> to continue ...

I have logged on as ora(sid). and the file permissions are like below

  1. cd /oracle/DQG/

  2. ls -lt

total 68

drwxr-xr-x 3 oradqg dba 13312 Jun 17 17:29 sapreorg

drwxr-xr-x 2 oradqg dba 3072 Jun 17 15:20 sapbackup

drwxr-xr-x 2 oradqg dba 8192 Jun 17 04:04 sapcheck

drwxr-xr-x 3 root root 96 Oct 29 2006 mirrlogA

drwxr-xr-x 3 root root 96 Oct 29 2006 origlogB

drwxr-xr-x 9 root root 1024 Oct 29 2006 sapdata3

drwxr-xr-x 11 root root 1024 Oct 29 2006 sapdata4

drwxr-xr-x 63 oradqg dba 2048 Apr 15 2006 920_64

drwxrwxrwx 2 root sys 1024 Feb 18 2006 cdromprd

drwxr-x--x 11 oradqg dba 1024 Aug 23 2004 sapdata1

drwxr-xr-x 3 oradqg dba 2048 Jun 3 2004 oraarch

drwxrwxr-x 6 oradqg dba 1024 Jun 1 2004 oui

drwxr-xr-x 3 oradqg dba 96 May 31 2004 mirrlogB

drwxr-xr-x 4 oradqg dba 96 May 31 2004 origlogA

drwxrwxr-x 3 oradqg dba 96 May 31 2004 jre

drwxr-x--x 9 oradqg dba 1024 May 31 2004 sapdata2

drwxr-xr-x 4 oradqg dba 96 May 31 2004 saptrace

drwxr-xr-x 3 oradqg dba 96 May 31 2004 saparch

drwxr-xr-x 2 root root 96 May 31 2004 lost+found

#

Ok I observed that file system permissions are different.

1.Is there any logfile to see who has changed the files permission and when?

2.Presently how can I solve the problem?

Regards

Nani

markus_doehr2
Active Contributor
0 Kudos

I´d do a

cd /oracle/DQG

chown -Rf oradqg:dba *

This will replace all the permissions with the correct ones.

This can happen if anyone sets ORACLE_HOME, ORACLE_SID as user root manually and adds/changes files or if you did a recover/restore as user "root".

--

Markus

Former Member
0 Kudos

Hi markus,

1.With which user (sidadm or orasid or root) should I change permission?

2.How can I execute this command?I need to stop SAP .saposcol ,listener and Database?

3.Is there any possibility of getting errors after changing the permissions?

Regards

Nani

Former Member
0 Kudos

Hi nani,

1.With which user (sidadm or orasid or root) should I change permission?

As your sapdata is owned by root , you have to login as root and change permission to 755 and put sapdatas in group dba dba and owner <ora>sid.

eg:

chpass 755 sapdata* ( or use the command which Makus gave you )

chown <ora>sid:dba sapdba

2.How can I execute this command?I need to stop SAP .saposcol ,listener and Database?

no need to stop saposcol and listner.

3.Is there any possibility of getting errors after changing the permissions?

Noake sure you have enough space in sapdata

Thanks

Prince Jose

Former Member
0 Kudos

Hi Nani,

It is clear that you have permission issue at OS level, From the log you have provided, the following directories need to change its ownership to ora<sid>

drwxr-xr-x 3 root root 96 Oct 29 2006 mirrlogA

drwxr-xr-x 3 root root 96 Oct 29 2006 origlogB

drwxr-xr-x 9 root root 1024 Oct 29 2006 sapdata3

drwxr-xr-x 11 root root 1024 Oct 29 2006 sapdata4

Do the following as root user:

chown ora<sid>:dba mirrlogA origlogB sapdata3 sapdata4

and run SAPDBA, it should work fine.

Regards,

Nisch

Former Member
0 Kudos

Hi Nisch,

At the time of datafile permission changing what the required status about database?

can I change permissions when DB is online?

Thanks for your previous reply

Regards

Nani

Former Member
0 Kudos

Hi Nani,

It will be safe if you get a downtime to run this task. I believe that change in ownership will not affect the database operation and it could be done online, but its always safe to test it in a demo / test enviroment before you do this activity in production.

Regards,

Nisch