so ! = host?
Let me test this real quick/.....
Main Topics
Browse All TopicsHere's what I got (just a snip it)
Alter tablespace USER_DATA begin Backup;
Host Copy D:\orant\database\usr1orcl
Alter Tablespace USER_DATA end backup;
When I run this I get an error on the h in host, ora-00900 invalid SQL statement
I've tried !host !copy (I am guessing at this point....) What the heck am I doing wrong? Oracle documentation for backups under NT leaves much to be desired....
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Some things I've tried...
in SQL*Plus:
entering line by line to see results, does not copy the file.... Executes the statement but with no result.
Run as script, errors on the alter tablespace, says that the ; is an invalid char, remove that and it says the line was not ended correctly
In SQL Worksheet:
Run line by line,Errors on the word HOST
Run as PL/Sql script, Runs and looks fine, just doesn't do anything. No files copied to destination.
I did set privledges for the destination and am logging in as sys.
The current code snip it I am using is:
Alter Tablespace USER_DATA begin Backup;
Host Copy d:\orant\database\usr1orcl
Alter Tablespace USER_DATA end Backup;
Any suggestions?
Merith,
You can create a dynamic SQL to generate the codes that you need to run; the run the code to do the backup. I have an unix korn shell script to do hot back up for multiple Oracle instances. Here is the help file for the script:
Usage: ./orabackup [options] [oratab or SID:ORACLE_HOME]
options:
-a <B|H|L> specifies action options: B - both hot and logical backup;
H - hot backup only; L - logical (export) backup only.
The default is "B".
-b <bakdir> specifies backup directory. The default is "/u00/oradata/baks".
-e <expdir> specifies export directory. The default is "/u00/oradata/exps".
-l <logdir> specifies log directory. The default is "/u00/oradata/logs".
-d <device|file> specifies output device: tape or output file. The
default is "/dev/rmt/0n". The option "file" means to backup database
to a tar file under directory "/u00/oradata/baks" with its name associated
to the time when this program is run.
-s <tablespace|table|owners> specifies tablespaces for hot backup,
tables or owners for logical backup. The default is null, which
means all.
-t specifies a test mode. The default is not in test mode("N").
-v whether to echo message onto screen. The default is silent mode
("N").
-z compresses datafiles before they are moved to tapes. The default is
no compression("N").
[all|oratab|SID:ORACLE_HOM
be backed up.
Notes:
1. This program uses three steps to conduct backup: 1) generate a
list of datafiles for each Oracle database first; 2) It generates
a program to be run in svrmgrl; 3) It uses svrmgrl to put
tablespace in backup mode one by one and UNIX tar command to backup
datafiles to a tar file or a tape device.
2. It provides options: 1) to conduct a logic backup, i.e., using exp
to do a full database export; 2) to compress datafiles before
backed up or compress dump files after they have been exported;
3) to backup partial database (currently not implemented).
3. It provides options to define log, backup and export directories.
Business Accounts
Answer for Membership
by: geotigerPosted on 2000-09-11 at 10:49:12ID: 4264503
There should be a "to" in the COPY command. It should be
.ora d:\backup;
.ora d:\backup;
Host Copy D:\orant\database\usr1orcl
or
! Copy D:\orant\database\usr1orcl