开发者

Oracle: changing the DB_RECOVERY_FILE_DEST without pre-existing folder?

开发者 https://www.devze.com 2022-12-10 07:59 出处:网络
I\'m working on a web interface for modifying Oracle database backup settings. One of the options I want to give users is where to set the flash recovery area. As far as I know, the only way to change

I'm working on a web interface for modifying Oracle database backup settings. One of the options I want to give users is where to set the flash recovery area. As far as I know, the only way to change this is by executing something like:

ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='C:\file\path' SCOPE=BOTH SID='*';

The problem is that if the file path is some path that doesn't already exist on the system, it isn't created automatically, and this script fails开发者_开发技巧. Does anyone know if there is a way to instruct Oracle to make that directory for me or if there is a PL/SQL script I can use to create a directory on the physical disk (I.E. not a CREATE DIRECTORY call)?


If you really want to do this, write a Java stored procedure (stored as an Oracle object) that calls the mkdir function on a file object. You'll need to use dbms_java.grant_permission to grant java.io.FilePermission privileges.

0

精彩评论

暂无评论...
验证码 换一张
取 消