SQL & PL/SQL :: Copy Some Archivelog Files Between 2 Database Server
Sep 27, 2011
I wanted to copy some archive log files between 2 DB Server.Steps:
1) Edited the Local and Remote DB's TNSNAMES file and modifyied like below.
bookstore =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.80.100.28)(PORT = 1521))
)
(CONNECT_DATA =
(SID = BOOKSTORE)
)
)
2) Created a Source Directory --> DR1
3) Created a Target Directory --> DR2
4) Created a DB Link
CREATE DATABASE LINK LINK1 CONNECT TO <username of the Remote DB> IDENTIFIED BY <Password> USING '<Remote DB Name taken in the TNSFILE>.
5) In the Local Server I had written the below command.
create or replace procedure proc1 is
cursor c1 is select recid,substr(name,37) "ARCH_FILE" from v$archived_log;
var1 c1%rowtype;
begin
open c1;
fetch c1 into var1;
[code]...
It is working, but not coping the Files from Local To the Remote.
View 22 Replies
ADVERTISEMENT
May 1, 2013
I have got backup pieces in ASM, I guess about more than 100 files. Now, I need to copy all of them from ASM to FileSystem, there are 2 methods still now:
1- Copy from ASM to FileSystem using cp command.
2- Copy from ASM to FileSystem using DBMS_FILE_TRANSFER.
But:
In the first method, when I copy one file, I took more than 1 minute, so the following script would take me more than 1 days (I guess so).
#!/bin/ksh
#
# This script copies files from FRA on ASM to local disk
#
ORACLE_SID=+ASM2
ASMLS=/vasgatedb/app/vsgbkp/asm_ls.txt ##{ASM files list}
[Code]...
The second method, DBMS_FILE_TRANSFER took me less than 1 second to copy one file completely.
sys@VSGDB> set timing on
sys@VSGDB> exec dbms_file_transfer.COPY_FILE('asm_dir','level_0_vsgdb_9998_813844797.bkp','fs_dir','level_0_vsgdb_9998_813844797.bkp');
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.38
Of course, I wish I used the second method as soon as possible, however, said I below, I've got about ~200 files, and I could not copy one by one file.
View 3 Replies
View Related
Feb 2, 2012
how can i copy to a RAC database which managered by ASM to another new host? just as clone.
View 6 Replies
View Related
Sep 9, 2008
I want to copy files from one location to another in forms6i on when button pressed.i m using the following code.
DECLARE
cpf_source VARCHAR2(500) := 'c: est.txt';
cpf_target VARCHAR2(500) := 'c:data';
begin
WIN_API_UTILITY.copy_file(cpf_source,cpf_target,TRUE);
end;
But i press the button it generates FRM-40734,
internal Error : PL/SQL error occurred.
View 5 Replies
View Related
Mar 15, 2011
I am on a font manager project. One of the features is to install the new font file. My understanding by "install" is to copy the file to the system directory Windows/fonts (correct me if I am wrong in this part). When I tried to use the java copy file api to do so, not surprisingly I got the access denied exception.
1. How can I do a "force-copy" of file into the system directory?
2. If that's not proper way, how can I create a "shortcut" like a softlink of the file into the system directory?
View -1 Replies
View Related
Oct 15, 2013
There is a question come up in my mind that can we perform the copy/delete/move of ASM files to the host filesystem while the ASM instance is down. For instance... To copy the file ASM file through AMCMD utility when the ASM instance is running.
ASMCMD> cp spfilenode.ora /u01copying +DATA/NODE/spfilenode.ora -> /u01/spfilenode.ora
Now my question is, Can I copy/delete/move that file on OS filesystems when the ASM instance is down.
View 3 Replies
View Related
Dec 4, 2012
I need to copy one table which is having NCLOB column into our new DB(11g) from old DB (10g). As this table having huge records (1 crore) it is difficult to use direct insert statement (INSERT INTO ... SELECT * FROM @remotedb). I don't have DBA privilege to use loader.
View 3 Replies
View Related
Feb 23, 2012
i've 0racle 9i database, i wanted to know the easiest way how to copy that database on another computer throw local network,
View 15 Replies
View Related
Feb 2, 2012
I have a forms that generate a file from database into database server and copy it to client machine by the follow process:
IF webutil_file_transfer.Is_AS_readable(V_server_way || V_file_name) THEN
l_success := webutil_file_transfer.AS_to_Client
(clientFile => :V_screen_way
[code]...
But is showing the erro ora-105100 in one client machine
View 9 Replies
View Related
Feb 9, 2013
Database Version - 10.2.0.4.0
OS - Red Hat Linux
We have configured oracle one way stream between two databases. Source database is capturing the changes (No downstream configured). Configuration was working fine but destination database was lagging behind very much i.e about 15 days behind the source database. We are ok with this but the problem is now that , as per client request we have restored previous backup and open the database with resetlog option in source database. After resetlog , archivelog sequence has been changed and stream is not working.
Can I apply the previous archivelog (before resetlog archivelogs ) in destination database anyway.Source database is a production database.
View 1 Replies
View Related
Jun 10, 2013
I turned on ARCHIVELOG in my main database, anticipating GoldenGate replications and standing up a physical standby database. However, during the process I forgot to create a new SPFILE for my database, meaning that the next time the database cycled, the archive log destination would revert to the Oracle default (rather than the mount point I had set up to receive them) $ORACLE_BASE/fast_recovery_area
. I discovered this because my database hung..... In looking at the ALERT LOG, I discovered that the logs were going to fast_recovery_area, and it had run out of room. OK, so I did an alter system set db_recovery_file_dest_size= 5G scope=both; at which point in time I was notified that no active SPFILE existed! I moved out all of the logfiles that were in the fast_recovery_area, but the database seemed to still think that it was full.
I've managed to get everything fixed and put back together, but my remaining question is: After I freed up all sorts of space in the fast_recovery_area, why did/does the database still think that area is full?
View 3 Replies
View Related
Dec 7, 2010
I am trying to upload a database backup on a machine. Since the structure of files is different from server, how can i start the database.
Do i need to create a new control file? If yes, how can i run the sql command "Alter database backup controlfile to trace" in nomount mode.
View 3 Replies
View Related
Apr 2, 2013
i have one question regarding archivelog and backup if i take just backup excluding archivelogs like = RMAN>backup database; (not plus archivelog ) now when even i recover database using backup , will it also recover changes that was in archives?
View 7 Replies
View Related
Jul 22, 2011
I have 780(12*65) csv files generated from 65 databases.Now I have to load this 780 csv files into 12 tables created in my database for some monitoring and reporting purpose.to call the sql loader I am plannig to create 780 lines like below.
sqlldr abc@tns/pwd control='E:htmlctlhtml_broken_jobs_rpt.ctl' log='E:htmlreportloghtml_broken_jobs_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_db_size_rpt.ctl' log='E:htmlreportloghtml_db_size_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_fragmentation_rpt.ctl' log='E:htmlreportloghtml_fragmentation_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_index_stats_rpt.ctl' log='E:htmlreportloghtml_index_stats_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_invalid_object_rpt.ctl' log='E:htmlreportloghtml_invalid_object_rpt.log'
sqlldr abc@tns/pwd control='E:htmlctlhtml_long_running_queries_rpt.ctl' log='E:htmlreportloghtml_long_running_queries_rpt.log'
we know creating 780 control files is the difficult task.So I have created only 12 control files. is there any mechanism to pass a varible (planning to declare it in the sqlldr line) to the infile clause like below in sql loader?
infile "E:htmlreportoutput&a_html_broken_jobs_rpt.csv"
here a is the variable name. it will change every 12 csv files once.
or
is there anyother way to achive this?
View 8 Replies
View Related
Jul 4, 2012
I need to write a procedure to migrate files from Collaboration plum tree server to oracle database server into a table using a BLOB column .
View 2 Replies
View Related
Jun 20, 2012
I managed to upload images to a database server, resize them, copy to the application server and everything worked just fine - the Apex page successfully displayed images. Since last week, things have broken. This is how: there's a directory object which points to application server's directory:
SQL> select * from all_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
------- ------------------------------ -----------------------------------
SYS SLIKE_4005_UPLOAD d:gisslike_4005_upload --> on a database server
SYS SLIKE_4005 \my-iasd$homegisslike_4005 --> on an application server
SQL>
I can use a directory located on a database server:
D:GISSlike_4005_upload>dir photo_resize.*
Volume in drive D is RAID
Volume Serial Number is 88F2-69D2
Directory of D:GISSlike_4005_upload
[code]....
How come it doesn't work? I was absent last week, database server was restarted for some reason (there were Windows' updates which required restarting). After that, all applications (lucky us, just two of them, but in multiple procedures/functions) return FALSE for UTL_FILE.FGETATTR.
We recreated directory objects, but that didn't work (UNC or not, no difference). I Googled quite a lot, read Metalink notes - nothing I did solved the problem.
what these OS updates were about; maybe they are not to be blamed at all. Both servers (database & application) run MS Windows Server 2003 Standard Edition Service Pack 2. In the meantime, a colleague developed a workaround (it uses UTL_HTTP) which works, but it is MUCH slower than the previous UTL_FILE.FGETATTR option.
Why don't we keep these images on the database server (instead of the application server)?I was told that Apache is incapable of accessing mapped network directories so we used what we could.
View 13 Replies
View Related
Jun 4, 2013
Just now my database is hang due to the archivelog full. I try to use RMAN to delete the expired one and free space but encounter the error:
RMAN>crosscheck archivelog all;
archive log filename=/geodata/oraclelog/archive_log/ORAGF45/archivelog/2013_06_04/o1_mf_1_1444_8tsxvwc2_.arc recid=1350 stamp=817182450
validation succeeded for archived log
archive log filename=/geodata/oraclelog/archive_log/ORAGF45/archivelog/2013_06_04/o1_mf_1_1445_8ttx2q6j_.arc recid=1351 stamp=817214416
[code].......
So I try to back it up first by using the below command:
RMAN> backup archivelog all;
Starting backup at 04-JUN-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
[code]......
I know that I have to extend the db_recovery_file_dest directory for "limit exceed" error but how can I safely delete the archivelog in order to bring up the database?
View 3 Replies
View Related
Oct 11, 2012
How can I know if database files are on file system or raw files?
View 4 Replies
View Related
Jul 15, 2013
I created a standby database yesterday and everything is working correctly. I need to make some tweaks, however, and one of those is the directory that the standby database expects the archivelogs to be.
I found that the archivelogs were being shipped to $ORACLE_HOME/dbs and named arch*.arc. Interestingly a log switch ships the archivelog minus the "arch" at the front and all archivelogs now do not have that format. I moved the archivelogs to the correct location and renamed them. I have been able to set the correct location using standby_archive_dest and can see that the archivelogs are shipped to there.
Also, v$archived_log shows the correct path and filename. The problem I have is that when I come to apply the archivelogs it still seems to think that they should be in $ORACLE_HOME/dbs and named with "arch" at the front. what parameter I need to change to tell oracle the correct path and filename to use when applying the archivelogs?
View 9 Replies
View Related
Aug 20, 2008
How to make the automatic deletion of all the archivelogs when it is applied successfully on the standby database? We have 1 primary database and 1 standby database using oracle physical dataguard.
In the primary database, we have daily backup job so that the applied archivelogs are deleted automatically, no problem
But in the standby database ( physical standby) I have to go there and delete manually because I don't issue backup on this database. Is there any solution for this problem.
View 3 Replies
View Related
Sep 16, 2011
I'm new on 11g, due to my limit storage with mounted internal disk, so I think, may I can store archivelog in ASM without FRA? However, I did not find any document to verify.
View 5 Replies
View Related
May 25, 2010
We have oracle 10gR2 RAC with ASM running on HP-UX. The archivelogs are located in a NFS filesystem and we want to move this into ASM.
View 1 Replies
View Related
Feb 11, 2013
How can I copy Team Development from database to another database
View 3 Replies
View Related
Jul 13, 2010
While trying to copy a database, i used the command: RECOVER DATABASE USING BACKUP CONTROLFILE until cancel; it gave:
ORA-00279: change 7866782806751 generated at 07/12/2010 19:39:23 needed for thread 1
ORA-00289: suggestion : /moteurs/oracle/r11110/R11110/archivelog/2010_07_13/o1_mf_1_1158_%u_.arc
ORA-00280: change 7866782806751 for thread 1 is in sequence #1158
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/data01/oracle/r11110/data/SYSTEM01.dbf'
ORA-01112: media recovery not started what can i do in this case of issue?
View 5 Replies
View Related
Feb 23, 2011
Can I copy rman to use a different database with a different ID
View 6 Replies
View Related
Feb 10, 2011
I want to do the recovery of my database using the archive log files but one of the archive log in between is missing,
View 17 Replies
View Related
Feb 22, 2011
Would like to know if I can replicate Production database (10.2.0.2) to Test (10.2.0.4).
tell me the process to do that on windows environment.
I wonder if I can do it with two different oracle versions?
View 4 Replies
View Related
Feb 24, 2013
I am using oracle 11g XE.
My server hard disc crashed yesteday and i don't have any backups / I am able to recover the .dbf by using a recovery tool.
is it possible to use this .dbf into new server and recover my data.
View 3 Replies
View Related
Mar 24, 2011
I need to copy all the database objects from one database to another database.I have 32 bit windows environment I tried export and put it in a dump file but dump file size exceeds the limit, my database size is about 300 GB.
What would be efficient way to replicate all the database objects move to another box ..?
View 22 Replies
View Related
May 21, 2011
i have one database name tom on my one pc its name is rose1 now i have to place this my tom database to on my another pc its name is rose2.
i do not want to use rman.
How can i place this tom database from rose1 pc to rose2 pc and my this tom database is in archive mode and my this tom database is in rose1 pc and my rose1 os is windows xp 32bit and i want to transfer this database to on my rose2 pc and the os of rose2 pc is windows 7 64 bit.
View 4 Replies
View Related