Where does SQL Developer save the DB file?

0

Where do the banks I create in SQL Developer get saved? I would like to be able to choose the location / folder to save the Bank, but I do not know where it is saving.

    
asked by anonymous 27.03.2017 / 22:11

1 answer

1

Basically, oracle saves the data of its schemas within tablespaces , of which within% are%, which are physical files, and sometimes shared between schemas .

To know what datafiles your schema is using, you can run the script:

SELECT owner,tablespace_name
  FROM dba_segments
 WHERE owner = 'SEUSCHEMA'
 GROUP BY tablespace_name,owner

To find out what the tablespace is:

SELECT ddf.file_name
  FROM sys.dba_data_files ddf
 WHERE ddf.tablespace_name = 'NOME_TABLESPACE'

It will return similar to:

  

/u01/app/oracle/oradata/orcl/datafile.dbfname

To choose where to save, you will need to see the directories that available in Oracle:

SELECT *
  FROM dba_directories

To create a new directory in oracle, just use the script:

CREATE OR REPLACE DIRECTORY NOMEDOMEUDIRETORIO AS '/caminho/pasta/meubanco';

So when it's time to create your bank, just choose your new directory.

    
27.03.2017 / 23:06