DB version 11.2.0,.3
RAC 2 nodes
when i create tablespace by this command
CRETE TABLESPACE APPS_TEST;
Then i get list of datafile by asmcmd (ls command) one datafile is generated.
when i create tablespace by using path
CREATE TABLESPACE APPS_TEST DATAFILE '+DATA/DEV/DATAFILE/apps_test01' SIZE 100M;
Then i get list of datafile by asmcmd (ls command) two datafiles is generated.
WHAT IS WRONG?
The 1st time when you have created the tablespace (without specifying the path), Oracle has generated an OMF file (Oracle Managed File). Here Oracle generates an unique number to the datafiles of the tablespace.
Refer this http://docs.oracle.com/cd/B10501_01/server.920/a96521/omf.htm
The second command which you have used to create the tablespace (by specifying the path), you yourself have mentioned the name of the datafile that Oracle has to create for the tablespace, and hence Oracle is showing the name that you had specified at the time of creation.
+DATA/dev/datafile/apps_test01 APPS_TEST AVAILABLE
Then this is the datafile of your APPS_TEST tablespace. The data would be stored on this file.
Not sure about the other file you showed in the "ls" command of the ASMCMD. May be you created the tablespace earlier using OMF and then dropped the tablespace but the datafile not being removed from the diskgroup. But this might not be your concern.
The datafile of the tablespace APPS_TEST where the data is being written is " +DATA/dev/datafile/apps_test01".
Please consider closing the thread by marking it as answered and providing appropriate points.
Just to complete the above explanation.
Oracle will always create datafiles in ASM in the latter format (e.g: APPS_TEST.279.799077181).
When you specify a custom name for your datafile, that name will be just an ASM alias (like a symlink) for the above file.
If you issue 'ls -l' in asmcmd, you will see that apps_test01 is just an alias referencing ( => ) APPS_TEST.279.799077181