Oracle/Unix vachinollu evaranna unnaa... Chalanachithram.com | Topics | Search
Hide Clipart | Log Out | Register | Edit Profile

Last 30 mins | 1 | 2 | 4 hours     Last 1 | 7 Days

Chalanachithram.com DB » TF Industry related » Archive through October 29, 2008 » Oracle/Unix vachinollu evaranna unnaaraa?? « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7624
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:29 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

create directory separate ga chey out of procedure..privilege lekapote dba ni adugu create cheyyamani
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7623
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:29 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Sachin:


anai util work avvaledu..i tried.




enduku work avvadu?it shud work wats the error..bitnbyte at gmail ki mail chey..if u need any help
Top of pagePrevious messageNext messageBottom of page Link to this message

Sachin
Side Hero
Username: Sachin

Post Number: 4364
Registered: 04-2008
Posted From: 69.134.62.17

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:27 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:




anai util work avvaledu..i tried....migilinavi try chesthaa...

anyway thank u all....good night...
:D :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Dlm
Side Hero
Username: Dlm

Post Number: 3725
Registered: 04-2008
Posted From: 98.180.196.219

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:25 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Dlm:

cat deniki annayi? you want to o/p the file contents?


ok got it..
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7622
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:25 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Dlm:

cat deniki annayi? you want to o/p the file contents?




ayana move cheyyalanukuntunna file name and path ni oka temp location lo file create chesi andulo rayamani cheppa..so aa temp file ni cat cheste he will get his actual file that he needs to move.

aa temp location info oracle ki cheppadaniki.. oracle create directory ani create cheyammana..after that loc is registered with oracle, we can write any pl/sql output to a file in that location..
Top of pagePrevious messageNext messageBottom of page Link to this message

Nisarga
Junior Artist
Username: Nisarga

Post Number: 21
Registered: 03-2008
Posted From: 209.202.115.142

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:25 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Dlm:

mama..ataniki pl/sql lo shell scripthttp://www.chalanachithram.com/discus/icons/quote3.gif
call cheyyatam kavali..shel script nunchi pl/sql kaadu...




yeah. i saw that. i don't know how to call an external program for pl/sql :-).
if he has a chance he can do the other way.

if the pl/sql is standalone, i would think it is ok or may be better to separate out the logic of moving/renaming the file.
Top of pagePrevious messageNext messageBottom of page Link to this message

Dlm
Side Hero
Username: Dlm

Post Number: 3723
Registered: 04-2008
Posted From: 98.180.196.219

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:20 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

unix cat kottu on that file name and then move the actual file that u want to move..




cat deniki annayi? you want to o/p the file contents?
Top of pagePrevious messageNext messageBottom of page Link to this message

Dlm
Side Hero
Username: Dlm

Post Number: 3722
Registered: 04-2008
Posted From: 98.180.196.219

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:19 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Sachin:

so plsql lo shell script( which rename/moves file) call cheddam anukuntunnaanu





Nisarga:

#!/usr/bin/ksh

PLSQL_SCRIPT= #comment--give the file name with full path
TARGET_DIR= #comment -- target directory where you want to move the file

#call the pl/sql script

eval "$PLSQL_SCRIPT" #or the script can be directly called instead of using env variable

#check the return status, generally 0 upon successful execution
if [ $? = 0 ];then

TO_FILE=$PLSQL_SCRIPT$extention #you may want to give
fi

mv $PLSQL_SCRIPT $TO_FILE




mama..ataniki pl/sql lo shell script call cheyyatam kavali..shel script nunchi pl/sql kaadu...
Top of pagePrevious messageNext messageBottom of page Link to this message

Sachin
Side Hero
Username: Sachin

Post Number: 4363
Registered: 04-2008
Posted From: 69.134.62.17

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:19 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:




kk annai..thank u i'll try
:D :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7621
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:17 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

ikkada v_out lo write the value of file name..




file name rasaka..unix cat kottu on that file name and then move the actual file that u want to move..ardham kakapote adugu..konchem explain chesat
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7620
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:15 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

use this command to create directory

create or replace directory foo_dir as '/tmp';

and aftre this is created

file_handle UTL_FILE.file_type;
v_file_name VARCHAR2 (100);
v_out VARCHAR2 (1000);

file_handle := UTL_FILE.fopen ('foo_dir', v_file_name, 'a');

UTL_FILE.put_line (file_handle, v_out);

ikkada v_out lo write the value of file name..
Top of pagePrevious messageNext messageBottom of page Link to this message

Dlm
Side Hero
Username: Dlm

Post Number: 3721
Registered: 04-2008
Posted From: 98.180.196.219

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:15 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

shell scripting ithe, I can help...but oracle, I dont have much knowledge
Top of pagePrevious messageNext messageBottom of page Link to this message

Nisarga
Junior Artist
Username: Nisarga

Post Number: 20
Registered: 03-2008
Posted From: 209.202.115.142

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:15 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

if you have the option of calling pl/sql script within the shell script you may want to do something like this:

#!/usr/bin/ksh

PLSQL_SCRIPT= #comment--give the file name with full path
TARGET_DIR= #comment -- target directory where you want to move the file

#call the pl/sql script

eval "$PLSQL_SCRIPT" #or the script can be directly called instead of using env variable

#check the return status, generally 0 upon successful execution
if [ $? = 0 ];then

TO_FILE=$PLSQL_SCRIPT$extention #you may want to give
fi

mv $PLSQL_SCRIPT $TO_FILE

#done
Top of pagePrevious messageNext messageBottom of page Link to this message

Dlm
Side Hero
Username: Dlm

Post Number: 3720
Registered: 04-2008
Posted From: 98.180.196.219

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:13 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Sachin:

annai naaaku aa unix server gurinchi idea ledu.....


uname -a

ee shell lo run chesthunnavo teliyali.. csh ithe very limited functionality. wont run bash scripts there....csh ithe, csh lone raayali

ee shell lo run avuthunnavo teliyali ante echo $SHELL or ps command lo ee shell run avuthundo choodu
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7619
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:12 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

sachin tammud..dbms_output kaadu..use utl_file package to write to a file..write the file name to a file and move it later after the proc executes
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7618
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:10 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

tammud..naaku tochina paddathi..

oracle directory okati create chey and it points to a physical location on unix

nee proc lo filename ni dbms_output lo functions untai put file etc..avi use chesi write the file name to a text file..after the shell is eexecuted move the file in a shell command

basic ga..

use shell command to call ur proc..and then proc writes the file name to a predefined oracle directory(which is nothing but a physical location) and then use mv command in the shell
Top of pagePrevious messageNext messageBottom of page Link to this message

Sachin
Side Hero
Username: Sachin

Post Number: 4362
Registered: 04-2008
Posted From: 69.134.62.17

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:08 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Transcendental:




annai akkada em command pamputhunnaadu..em chesthunnaadu...
:D :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Transcendental
Junior Artist
Username: Transcendental

Post Number: 18
Registered: 10-2008
Posted From: 66.189.40.70

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:05 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Sachin:

annai choosaa okka mukka ardham ayithe ottu...




artham kakapovadaniki yemnundi sending comaznd with dbm_pipe from procedure to shell script
Top of pagePrevious messageNext messageBottom of page Link to this message

Sachin
Side Hero
Username: Sachin

Post Number: 4361
Registered: 04-2008
Posted From: 69.134.62.17

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 10:02 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

tammud..how are u calling htat proc




annai..front end vaallu elaa chesthaaro i donno....nenu manual gaa ececute cheyagaligithe chaalu.....so nenu sql plus lo..exec proc_name ani chestha
:D :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Sachin
Side Hero
Username: Sachin

Post Number: 4360
Registered: 04-2008
Posted From: 69.134.62.17

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:59 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Transcendental:




annai choosaa okka mukka ardham ayithe ottu...
:D :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7617
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:57 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

tammud..how are u calling htat proc
Top of pagePrevious messageNext messageBottom of page Link to this message

One
Side Hero
Username: One

Post Number: 2001
Registered: 09-2008
Posted From: 66.67.114.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:56 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Sachin:


annnai procedure lo oka value(file name) ni nenu script ki input gaa ivvaali


u know how to run this procedure from command line????
Top of pagePrevious messageNext messageBottom of page Link to this message

Transcendental
Junior Artist
Username: Transcendental

Post Number: 17
Registered: 10-2008
Posted From: 66.189.40.70

Rating: 
Votes: 1 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:56 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Sachin:




http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUES TION_ID:16212348050
Top of pagePrevious messageNext messageBottom of page Link to this message

One
Comedian
Username: One

Post Number: 2000
Registered: 09-2008
Posted From: 66.67.114.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:53 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:


yes...just asking....
Top of pagePrevious messageNext messageBottom of page Link to this message

Sachin
Side Hero
Username: Sachin

Post Number: 4359
Registered: 04-2008
Posted From: 69.134.62.17

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:48 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Maverick:

tammud..oka shell script rai..first to call the procedure and after that it should rename the file and move it a other folder of ur choice..




annnai procedure lo oka value(file name) ni nenu script ki input gaa ivvaali
:D :D
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7616
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:48 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


One:

Sun or HP??/




tammud ee pani ki ee details avasaramntava..bourneshell ekadina pani chestundi
Top of pagePrevious messageNext messageBottom of page Link to this message

Sachin
Side Hero
Username: Sachin

Post Number: 4358
Registered: 04-2008
Posted From: 69.134.62.17

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:47 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


One:





annai naaaku aa unix server gurinchi idea ledu.....
:D :D
Top of pagePrevious messageNext messageBottom of page Link to this message

One
Comedian
Username: One

Post Number: 1999
Registered: 09-2008
Posted From: 66.67.114.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:45 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Sun or HP??/
Top of pagePrevious messageNext messageBottom of page Link to this message

Maverick
Side Hero
Username: Maverick

Post Number: 7615
Registered: 01-2008
Posted From: 69.243.164.90

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:45 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

tammud..oka shell script rai..first to call the procedure and after that it should rename the file and move it a other folder of ur choice..
Top of pagePrevious messageNext messageBottom of page Link to this message

One
Comedian
Username: One

Post Number: 1998
Registered: 09-2008
Posted From: 66.67.114.55

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:45 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

so u need shell scipt writer right????
i think i can help u
Top of pagePrevious messageNext messageBottom of page Link to this message

Sachin
Side Hero
Username: Sachin

Post Number: 4357
Registered: 04-2008
Posted From: 69.134.62.17

Rating: N/A
Votes: 0 (Vote!)

Posted on Tuesday, October 28, 2008 - 09:42 pm:   Insert Quote Edit PostDelete PostPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

urgent gaa help kaavaaali......

neno plsql procedure raasthunaanu..adi oka external table lo data ni target ki load chesthadi..once loading avvagane nenu aa file ni rename chesi inko folder lo padeyaaali.....file is on unix server....so plsql lo shell script( which rename/moves file) call cheddam anukuntunnaanu..how can we do that??
:D :D

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x8f2f648){Movie Clipart}
Show / Hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  


Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: