Home » Infrastructure » Windows » Create Directory Oracle 9i (Windows Server 2003)
Create Directory Oracle 9i [message #670719] Mon, 23 July 2018 05:38 Go to next message
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 Go to previous messageGo to next message
cookiemonster
Messages: 13917
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 #670722 is a reply to message #670720] Mon, 23 July 2018 06:01 Go to previous messageGo to next message
oziking
Messages: 6
Registered: July 2018
Junior Member
thanks for a prompt reply cookiemonster
you mean i must create a folder at destination first, myself and then assign permissions on for read and write via DB?
Re: Create Directory Oracle 9i [message #670724 is a reply to message #670722] Mon, 23 July 2018 06:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
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 Go to previous messageGo to next message
oziking
Messages: 6
Registered: July 2018
Junior Member
thanks a lot Smile
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

Re: Create Directory Oracle 9i [message #670726 is a reply to message #670725] Mon, 23 July 2018 07:10 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
Data Pump does not exist in your 9.x database. You need to look up the docs for the old exp/imp utilities.
Re: Create Directory Oracle 9i [message #670727 is a reply to message #670726] Mon, 23 July 2018 07:12 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
And to do the Moderator bit:

Welcome to the forum. Please read the OraFAQ Forum Guide and How to use code tags and make your code easier to read
Re: Create Directory Oracle 9i [message #670728 is a reply to message #670727] Mon, 23 July 2018 07:13 Go to previous messageGo to next message
oziking
Messages: 6
Registered: July 2018
Junior Member
yes i realized that data pump is not there
thus i used exp utility
but why for Directory its showing unknown parameter?

[Updated on: Mon, 23 July 2018 07:15]

Report message to a moderator

Re: Create Directory Oracle 9i [message #670729 is a reply to message #670728] Mon, 23 July 2018 07:30 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
oziking wrote on Mon, 23 July 2018 05:13
yes i realized that data pump is not there
thus i used exp utility
but why for Directory its showing unknown parameter?
read results from OS command below

exp help=yes
Re: Create Directory Oracle 9i [message #670730 is a reply to message #670729] Mon, 23 July 2018 07:32 Go to previous messageGo to next message
oziking
Messages: 6
Registered: July 2018
Junior Member
in that directory function is not defined
so i guess its not supported in exp.exe function of Oracle 9i

[Updated on: Mon, 23 July 2018 07:32]

Report message to a moderator

Re: Create Directory Oracle 9i [message #670731 is a reply to message #670730] Mon, 23 July 2018 07:58 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
oziking wrote on Mon, 23 July 2018 05:32
in that directory function is not defined
so i guess its not supported in exp.exe function of Oracle 9i
correct
Re: Create Directory Oracle 9i [message #670732 is a reply to message #670730] Mon, 23 July 2018 08:24 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Database directories are a feature of 10g onwards. As other have said, you specify the actual filename, not a database directory.
Re: Create Directory Oracle 9i [message #670737 is a reply to message #670732] Mon, 23 July 2018 11:12 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Database directories existed in 9i but was of no use to export/import as Data Pump didn't exist.

Re: Create Directory Oracle 9i [message #670738 is a reply to message #670728] Mon, 23 July 2018 12:07 Go to previous messageGo to next message
EdStevens
Messages: 1376
Registered: September 2013
Senior Member
oziking wrote on Mon, 23 July 2018 07:13
yes i realized that data pump is not there
thus i used exp utility
but why for Directory its showing unknown parameter?
Go to the Oracle Database documentation portal at https://docs.oracle.com/en/database/oracle/oracle-database/index.html
Bookmark that page.
Under the Oracle Database heading, open the drop-list of versions, and select "Earlier Releases".

Select the appropirate 9i release (9.1 or 9.2)

Under the appropriate heading, click the 'view library' link.

Click the "list of books" link.

Scroll down to the "Utilities" manual.

Click the "Contents" link for the chosen manual.

Re: Create Directory Oracle 9i [message #670739 is a reply to message #670719] Mon, 23 July 2018 15:03 Go to previous messageGo to next message
oziking
Messages: 6
Registered: July 2018
Junior Member
Thanks a lot everyone
its such a nice and active community here
really happy to be a part of you all
Appreciated Smile
Re: Create Directory Oracle 9i [message #670747 is a reply to message #670737] Tue, 24 July 2018 02:52 Go to previous message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
You are right of course, Michel. Thanks for the correction.
Previous Topic: Server Reboot not making DB ON.
Next Topic: Archiving to a shared directory
Goto Forum:
  


Current Time: Thu Mar 28 11:33:25 CDT 2024