reading files of exceuting and different directories them
D:\ > cd PROC_PKG_FUNCMkdir FUNCTION
Mkdir PACKAGES
mkdir PACKAGES_BODY
mkdir PROCEDURES
TYPES of mkdir
mkdir TYPES_BODY
SQL > create directory as "D:\PROC_PKG_FUNC\FUNCTIONS" FEATURES
Created directory.
SQL > create PACKAGES directory as 'D:\PROC_PKG_FUNC\PACKAGES ';
Created directory.
SQL > create directory as "D:\PROC_PKG_FUNC\PROCEDURES" PROCEDURES
Created directory.
SQL > create directory PACKAGES_BODY as 'D:\PROC_PKG_FUNC\PACKAGES_BODY ';
Created directory.
SQL > create new TYPES of directory as 'D:\PROC_PKG_FUNC\TYPES ';
Created directory.
SQL > create directory TYPES_BODY as 'D:\PROC_PKG_FUNC\TYPES_BODY ';
Created directory.
Suppose that,
There is a directory D:\PROC_PKG_FUNC in my local computer where the database server exists.
And in this directory there are different directories such PACKAGES, PACKAGES_BODY, PROCEDURES, TYPES, FUNCTIONS, TYPES_BODY, now, I created all remote objects to diagrams in these folders with utl_file, with the help of the following package
SQL > CREATE or REPLACE PROCEDURE Get_Db_Ddl_Scripts as
2 v_file Utl_File.FILE_TYPE;
3 v_file_dir VARCHAR2 (50);
4 i_first_line NUMBER: = 1;
5 BEGIN
6
7 v_file_dir: = "PROC_PKG_FUNC";
8
9. FOR REC_OBJ IN
10 (SELECT DISTINCT NAME, TYPE, DECODE (TYPE, 'FUNCTION', 'FEATURES, 'PACKAGE' ', PA))
CKAGES', 'PACKAGE BODY', 'PACKAGES_BODY', 'PROCEDURE', ' PROCEDURES, 'TYPE', 'TYPES ', '.
BODY of TYPE ',' TYPES_BODY') v_file_dir
11. FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE OWNER = 'FRISKDEVI41B. '
12 AND TYPE ('FUNCTION, PROCEDURE, 'PACKAGE ', ' PACKAGE BODY', ' TYPE'))
LOOP 13
14 v_file: = Utl_File.FOPEN (card = > REC_OBJ.v_file_dir,)
15 filename = > REC_OBJ.NAME | ".sql",.
16 open_mode = > 'w ',.
max_linesize 17 = > 32767);
18 i_first_line: = 1;
19. FOR REC IN (SELECT TEXT FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE NAME = REC_
OBJ.NAME AND TYPE = REC_OBJ. TYPE AND OWNER = 'FRISKDEVI41B' ORDER BY LINE)
LOOP 20
21 IF i_first_line = 1 THEN
22 Utl_File.PUT_LINE (v_file, "CREATE or REPLACE" |) REPLACE (REC. TEXT, CHR (10), N)
ULL));
23 ELSE Utl_File.PUT_LINE (v_file, REPLACE (REC. TEXT, CHR (10), NULL));
24 END IF;
25 i_first_line: = i_first_line + 1;
26 END OF LOOP;
27 Utl_File.FCLOSE (v_file);
28
29 END LOOP;
30
ENDS 31;
32.
Created procedure.
SQL > exec Get_Db_Ddl_Scripts;
PL/SQL procedure successfully completed.
So the files are created in the location.
now I want to do, is I want to read each file and run in my current schema to create these objects in my local, is - scehma it possible? Help needed. _
ORCHYP wrote:
Once these files are written in the respective folders, you can open them with utl_file('read') in the current schema, and very well you can run.
Try it once
Try as many times as you want, you will not run files with utl_file, that's for sure. ?:|
Using something like DBMS_SCHEDULER you a one off job for each script, issue that this package can call commands of the o/s.
However, what is the point?
In the code above, you can only accumulate your DDL commands or anyone within your code and, rather than write scripts, use the EXECUTE IMMEDIATE command to run the DDL on the database.
Of course may not be the best thing to do, but we have very little information about what it is that is trying to achieve, and no reason why all functions, packages etc. are not just put together in a single script that is run from the command line in the first place. Why try and write PL/SQL to do?
Tags: Database
Similar Questions
-
Adobe Error 1305 error reading file... and you have access to it?
Adobe Error 1305 error reading file... and you have access to it? Can someone help me with this? I am trying to install Acrobat Pro XI
See if any of the instructions in the following link contribute to solve the problem:
http://helpx.Adobe.com/Creative-Suite/KB/error-1305-try-install-product.html
-
BlackBerry smartphone how to read files, spreadsheet, PDF, and MS Work
I'm new to the world of BlackBerry. Is someone to tell me how can I read MS Spreadsheet, work and my BB8330 PDF? I need to buy or download software or come with the BB? Thank you
If your device is equipped with software 4.5.x.x you will get automatically the documents to go which is delivered with the "Word to go" and "slideshow to go" If you open one of them, click on the menu button and selecting Save, then after the registry you go to the same menu and choose update now... This will update you and gove you "leaves to go."
in regards to the PDF, you will need to buy the premium version or activate on a BES (through labor)
-
Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the move tool. They have become a composite of two layers which could be developed further with the mask tool.
Hello
Please go to the preferences > workspace and uncheck the option 'open the document in the tabs '.
Now you can click on file and choose file > open and open the two images in two different windows which can be arranged side by side.
Thank you
-
I just looked at problems with importing files from nikon D810 in LR 5.7 it pop a window saying it can't read the files to work on an imac 27 "yosemite on my mac pro running after several times he finally managed to read files and import them into LR, I never had this problem before there was a sort of update that could from cause?
What is the destination folder that the date be underneath? In the top right it says users who suggests, you try to put the photos on top of your username instead of under your username. Maybe that's the problem. So change your folder in the drop-down list at the bottom right of what it should be rather than users, and if you're going to show us the destination of your photos at least scroll through the list of folders down right so that we can see which is the white highlight.
Here is how mine looks like if I want to put my photos imported under my subfolder users - Steve - photos by date:
-
I try to install the update of PS CS6 can read files camera raw Nikon D800. The exe file fails and says trying to install the application manager. I did it and the update still does not work. Now what?
update by downloading the files directly and then apply them: http://www.adobe.com/downloads/updates/
If this fails, attach a screenshot of the error message if it is in English. otherwise, quote it.
-
Please forgive me for not knowing how to use this forum, I am an old man and not good at computers, I called Adobe, they said it was my only hope!
Sorry to repeat
Everything was fine until my Windows 10, lost the start feature, so I had to go back to Windows 7, in this process, I lost my Adobe Reader software, I tried about ten times with different versions and different locations, all with the same error message that is download "the feature you are trying to use is on an unavailable network resource"... are looking for It seems that it does not find when I search there, and I no longer seem to have the AcroRead.msi... the most difficult file, I try, I get deeper and deeper into things I don't know... I am looking for a simple solution!
When it gets to this point, it is probably better to start from scratch.
First of all, download, install and run Adobe Reader cleaning tool to get rid of all remains little. Here is a link to the tool: Download Adobe Reader and Acrobat tool - Adobe Labs
Then go to the following link to download the full installer for the reader.
-
I have vista how can I convert files to PDF and save them to my desktop
Hello
Can someone tell me how to convert files to PDF and save them as PDF files on the desktop computer to send email
There are many ways. If you use a MS Office product, they have options to save in pdf format, if using Adobe Acrobat Reader, you can subscribe to services export to PDF and use Adobe Acrobat (the full version) is made to create pdf files, you can then use that. There are other options, but it's a start.
-
I just reinstalled Adobe Acrobat X 1 and I can't save files PDF that is sent to me. I just get "this document cannot be saved. There is a problem reading this document (21)"and then when I click OK I get 'not enough for the image' help!
More information on this issue can be found here:
https://forums.Adobe.com/thread/1672655
A "quick" fix that worked for me was to uninstall Adobe... and download Adobe Reader 11.0 installation base.
Then download each individual updates and run them sequentially.
I installed back to the last update of security which is version 08 and were able to register under normal operations.
You will need to disable the automatic updates to keep up with the 08 version, until Adobe fixes this problem in a future release.
http://www.Adobe.com/support/downloads/product.jsp?product=10&platform=Windows
Adobe Reader 11.0 - installer multilingual (MUI) AdbeRdr11000_mui_Std
Adobe Reader 11.0.01 update - installer multilingual (MUI) AdbeRdrUpd11001_MUI.msp
Adobe Reader 11.0.02 update - all languages AdbeRdrSecUpd11002.msp
Adobe Reader 11.0.03 update - installer multilingual (MUI) AdbeRdrUpd11003_MUI.msp
Adobe Reader 11.0.04 update - installer multilingual (MUI) AdbeRdrUpd11004_MUI.msp
Adobe Reader 11.0.05 - all languages AdbeRdrSecUpd11005.msp security update
Adobe Reader 11.0.06 update - installer multilingual (MUI) AdbeRdrUpd11006_MUI.msp
Adobe Reader 11.0.07 update - installer multilingual (MUI) AdbeRdrUpd11007_MUI.msp
Adobe Reader 11.0.08 - all languages AdbeRdrSecUpd11008.msp security update
-
I downloaded my new "Century Gothic" font type and works well with live view, but also a google chrome. As soon as I download my index.html file my changes disappear and always see them in dreamweaver, but not on my real Web site. any help will be great. Thank you!
I use and Filezilla to connect to our FTP site.
I see on line 42 of style.css
do-family: 'Courier New', Courier, monospace;
I see on line 180
do-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
and I see FontAwesome used in several places.
I can only conclude that Courier New is the applied font.
If you have a different version of style.css on your local system?
-
Reading lines and then comparing them
Hello
I want to read two lines of a file, and then compare them. At the present time, I have implemented:
I understand that this code returns the same line, but I was just hoping that maybe someone could point me in the right direction. Thanks in advance.String line = null; String currentLine = null; String prevLine = null; BufferedReader bf = new BufferedReader(new FileReader(fileA)); while ((line=bf.readLine()) != null) { currentLine = line; prevLine = line; }
prevLine = currentLine; currentLine = line;
Be sure to check for null in the comparison.
DB
-
I used Microsoft for years. How can I use my files and store and add to them with the I mac
I used Microsoft for years. How can I now access my stored info and edit and add to my files with my Apple I Mac. Having problems to work with files in the mac
I used microsoft years how can I access my stored info and edit and add to them on the Mac.
This can help you get started > https://www.apple.com/support/macbasics/
Additional help here > https://support.apple.com/en-us/HT201732
A good resource for help on your Mac is easy to access. Click on an empty area anywhere on your screen. You should see Finder > file > edit > view > go > window > help at the top of your screen.
Click on help > Mac Help then type in a keyword for what you need to help in the search field top right of the Help window.
-
At the same time, I made five new ringtones of the song of the birds and their synchronized successfully to my iPhone. Now, I did one more and I cannot get transfers, although it see the upward in my iTunes library on my iMac. It's less than 30 seconds and he appears as the correct type (ringtone). I have followed closely at least six different sets of instructions to make this transfer, and none of them worked. I am running the latest operating system, the most recent iOs and the most updated iTunes on both systems. Help, please.
< re-titled by host >
Hello saelon,.
Looks like you have problems of synchronization a ringtone from iTunes on your iPhone. I know how fun it can be to create and use custom ringtones, so I can understand why you would reach for help when he's not working for you.
To find out how to properly synchronize your ringtones to your iPhone, see the article: syncing your iPhone, iPad or iPod touch with iTunes on your computer via a USB - Apple Support
If you still have problems of synchronization of this tone, it could be that the tone is not appear in the iTunes ringtones section and/or is not selected to synchronize. This applies specifically in numbers 4 and 5 of the article above the synchronization.
If your custom ringtones do not appear in the "Tones" section in iTunes, it is possible that they are not in the correct format. If you do not already have, the program that we recommend for creating ringtones for your iPhone is GarageBand, it's available for iOS and Mac OS X. check the resources below for more information on this:
GarageBand 11: Create an iPhone ringtone
Thank you for using communities of Apple Support.
Have a great day!
-
Audiobook management: how to mark files as audiobook and keep them like that?
I have a lot of audio books. Those who were read from the CD and thus find themselves in the music section. ⌘ + I > Options > audio books allows me to move these files in the audiobook section.
The questions, is this flag is not retained once these files are deleted from iTunes and then added. The files that I've marked as "Audiobook" earlier is now back in the section music.
I find it extremely frustrating and confusing. Is it possible to keep the files correctly marked so that they are automatically added to the article when added audio books?
The files have extension to .m4b?
-
I'm trying to import my IE Favorites and have read the instructions, but the import button in the file in gray and will not let me import. Any ideas?
Try using the import option in the Bookmark Manager (also known as the name of the library)
- In Firefox, select the bookmarks menu, then "organize bookmarks" open library
- In the library, select "Import and backup" then "Import HTML.
- You should get I hope that the ability to import from Internet Explorer.
Maybe you are looking for
-
I'm trying to let him stay on Firefox will: use of custom settings for history. But when I close the window and come back, he's back on the Firefox will: remember the story. I don't know how to save my changes to keep it on the custom settings.
-
Is there a program that well to remove all my duplicate personal folders?
I don't know what happened, but now I have 10 copies of each, my itunes is all crazy
-
Explorer Windows ceased to operate the line solution check and restart
When open my download file on this time windows Explorer stopped working online and check out what I want to do? Signature of the problem: Problem event name: APPCRASH Application name: explorer.exe Application version: 6.0.6001.18164 Application tim
-
I always get script errors on the bottom it says you want to keep running on this page scripts Yes or not I click No.
-
How to convert the B/R channel on near infrared videos?
HelloContext:Using a defiltered DSLR equipped with near infrared infrared filter (590 or 665 nm) for example, we can take pictures of the IR. Then by a simple postprocesseing using an image editor, we can swap the red and blue channels to restore the