SQL Language (MOSC)

MOSC Banner

How to generate a OS xcopy command in one line not in two line in a spooled file

edited Feb 18, 2010 5:29AM in SQL Language (MOSC) 4 commentsAnswered
 Hello,

I write a sql script to generate a OS xcopy command in a spooled file but the output formate is not correct. The following is what I write:

set feedback off
set heading off

spool fullxcopy_backupfiles.cmd
 
select 'xcopy '||   name || '   e:\oracle\backup\fullbackup\flexprod /Y'
from
 v$datafile where status='ONLINE';
 
 select 'xcopy ' || member || '   e:\oracle\backup\fullbackup\flexprod /Y'
 from v$logfile where type='ONLINE';

 
 select 'xcopy ' ||name || '  e:\oracle\backup\fullbackup\flexprod /Y'
from v$tempfile where status='ONLINE';

 SELECT 'xcopy ' ||NAME || '   e:\oracle\backup\fullbackup\flexprod /Y'

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center