cancel
Showing results for 
Search instead for 
Did you mean: 

renaming oracle datafiles at the unix level

Former Member
0 Kudos

I have noticed that some of the datafile under /oracle/DV1/sapdata2/ have some strange characters in them

Grrr - DBAs that don't know brtools.....

for example:

drwxr-xr-x 2 oradv1 dba 256 Nov 02 23:22 sr3\177_2

and it shows as sr3_2 unless you use ls -lb which shows the above:

Now can I simply stop the DB and cp -rp sr3\177_2 to sr3_2?

I can actually cp -rp sr3\177_2 to sr3_X and then copy sr3_X to sr3_2 or an mv.

So can I do this without screwing up Oracle and SAP?

What should I do as the \177 characters should not be there?

Thanks Mikie

Accepted Solutions (1)

Accepted Solutions (1)

stefan_koehler
Active Contributor
0 Kudos

Hello Mike,

at first... the naming of the folder is no problem in running SAP ... it is only a "cosmetic" failure.

But to your question.....

1) Shutdown SAP and Oracle (shutdown immediate)

2) Copy (and remove) or move your data files

3) Publish the new file names to oracle the following way:

> startup mount;

> alter database rename file '<OLD_FILENAME>' to '<NEW_FILENAME>';

> shutdown immediate;

> startup ;

After this the database should start "normally" with the new data file names / directory structure. After these steps i would make a backup of the database.

I have done this many times (not only in SAP environment).

For more information of the rename command:

http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_1004.htm#i2079942

Regards

Stefan

Answers (0)