sqlplus host doscmd执行外部命令

看过很多文章讲到:sqlplus>!cp oarlce\oradata\*.* orabak\*.*
可以用于冷备份,但是我试了N遍!也无法用“!”执行sqlplus
外部命令,难道执行sqlplus外部命令另有他法,还是unix与win语法不同?

我已用bat批处理方法,创建了冷备份过程(两机ora安装路径完全一致);
但是在sqlplus中shutdown还要手动执行,是用win的任务计划结合sqlplus完成全部自动化处理哪,还是利用sqlplus+外部win命令实现这一过程,哪种最合理,最有效!请版主指点1——2!

----------------------------------------------------

Remen 2005-10-13 09:12

You can use
sqlplus>host cp oarlce\oradata\*.* orabak\*.*

pearth 2005-10-13 22:06

host cp 是unix的下的还是win下的!

Remen 2005-10-14 11:04

both are ok!
you can try

Remen 2005-10-14 11:06

NT:
SQL> host dir sqlnet.log
驱动器 F 中的卷是 WIN2000_PRO
卷的序列号是 4B2F-6AB1

F:\oracle9i\bin 的目录

2005-10-14  10:43            61,701 sqlnet.log
               1 个文件         61,701 字节
               0 个目录  1,165,893,632 可用字节

SQL>

Unix:
$ sqlplus "/as sysdba"

SQL*Plus: Release 9.2.0.6.0 - Production on Fri Oct 14 10:48:09 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production

SQL> host pwd
/T3/VIS/ora/visdata

SQL>

pearth 2005-10-20 13:28

最近忙了点,马上回去试试!谢谢楼上的!

lihongjun 2005-10-20 18:15

[quote]Originally posted by [i]Remen[/i] at 2005-10-14 11:04:
both are ok!
you can try [/quote]

SQL> host cp
'cp' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

SQL>

ng1990 2005-10-20 18:16

good

Remen 2005-10-21 08:45

[quote]Originally posted by [i]lihongjun[/i] at 2005-10-20 06:15 PM:
SQL> host cp
'cp' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

SQL> [/quote]

Sorry, i made a mistake!
cp can not use in win,only can run in unix or linux!
On windows,you should use copy not cp!

and  you'd better give the full path!

[ Last edited by Remen on 2005-10-21 at 08:48 ]

pearth 2005-10-21 21:23

试过了,OK!

ycfyh 2005-10-24 16:34

let's try

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9460258/viewspace-680878/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9460258/viewspace-680878/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值