Create Directory Oracle 9i [message #670719] |
Mon, 23 July 2018 05:38 |
|
oziking
Messages: 6 Registered: July 2018
|
Junior Member |
|
|
Hi
I am new to Oracle and trying to create a directory using sysdba account
i am typing
CREATE OR REPLACE DIRECTORY test_files AS 'E:\oracleWork';
it shows
Directory created.
But its no where to be seen at 'E:\oracleWork'
I passed a command to grant create directory access to sys as well
But still why i cannot see the directory created?
thanks
|
|
|
Re: Create Directory Oracle 9i [message #670720 is a reply to message #670719] |
Mon, 23 July 2018 05:44 |
cookiemonster
Messages: 13960 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Oracle directory objects are basically pointers to real directories on the OS. They exist both as a shortcut and as a way allowing the DBA to control which oracle users can read/write to which OS directory.
They do not in themselves do anything to the OS. They do not create directories on the OS. You need to do that from the OS, not the DB.
|
|
|
|
Re: Create Directory Oracle 9i [message #670724 is a reply to message #670722] |
Mon, 23 July 2018 06:18 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
To use a directory at Oracle/SQL level you must:
1/ Create yourself the OS directory at OS level
2/ Create the Oracle directory at SQL level (CREATE DIRECTORY command) which creates a synonym for SQL to access the OS directory
3/ Grant the privileges you want (READ and/or WRITE) to Oracle/DB accounts
Note: SQL can access this OS directory only if OS owner of the instance has the appropriate privileges on this OS directory (not the DB account or the OS user using this account).
[Updated on: Mon, 23 July 2018 06:20] Report message to a moderator
|
|
|
Re: Create Directory Oracle 9i [message #670725 is a reply to message #670724] |
Mon, 23 July 2018 06:38 |
|
oziking
Messages: 6 Registered: July 2018
|
Junior Member |
|
|
thanks a lot
Help me in this also please
i am writing a bat file to take dumps daily
@echo off
REM ****Set up Logging ****
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c%%a%%b)
For /f "tokens=1-2 delims=/:" %%a in ("%TIME%") do (set mytime=%%a%%b)
set mytime=%mytime: =0%
set dumpfile="abc_%mydate%_%mytime%.dmp"
set logfile="abc_%mydate%_%mytime%.log"
set ORACLE_SID=abc
exp abc/abc directory=DATA_PUMP_DIR file=%dumpfile%
if i run it without directory=DATA_PUMP_DIR it works
If i run it with directory path it says unknown parameter?
whats the reason?
[Updated on: Mon, 23 July 2018 06:41] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|