转 http://jingyan.baidu.com/article/425e69e6b142d1be15fc16dc.html
-
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。C:UsersAdministrator>TNSPING
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 19-8月 -
2017 11:52:53Copyright (c) 1997, 2005, Oracle. All rights reserved.
TNS-03502: 参数不足。用法: tnsping <address> [<count>]
C:UsersAdministrator>TNSPING HZXM
TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 19-8月 -
2017 11:53:07Copyright (c) 1997, 2005, Oracle. All rights reserved.
已使用的参数文件:
D:oracle10.2.0db_1 etworkadminsqlnet.ora
已使用 TNSNAMES 适配器来解析别名
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = 192.168.254.11)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SER
VICE_NAME = hzxm)))
OK (30 毫秒)C:UsersAdministrator>SET
ALLUSERSPROFILE=C:ProgramData
APPDATA=C:UsersAdministratorAppDataRoaming
CLASSPATH=.;C:Program FilesJavajdk1.6.0_43libdt.jar;C:Program FilesJavaj
dk1.6.0_43lib ools.jar;
CLIENTNAME=M490_2
CommonProgramFiles=C:Program FilesCommon Files
CommonProgramFiles(x86)=C:Program Files (x86)Common Files
CommonProgramW6432=C:Program FilesCommon Files
COMPUTERNAME=DBSERVER2
ComSpec=C:Windowssystem32cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=UsersAdministrator
JAVA_HOME=C:Program FilesJavajdk1.6.0_43
LOCALAPPDATA=C:UsersAdministratorAppDataLocal
LOGONSERVER=\DBSERVER2
NUMBER_OF_PROCESSORS=32
ORACLE_HOME=D:oracle10.2.0db_1
ORACLE_SID=HZXM
OS=Windows_NT
Path=D:oracle10.2.0client_2in;D:oracle10.2.0db_1in;C:Program FilesJa
vajdk1.6.0_43in;C:Windowssystem32;C:Windows;C:WindowsSystem32Wbem;C:Wi
ndowsSystem32WindowsPowerShellv1.0
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PERL5LIB=D:oracle10.2.0db_1perl5.8.3libMSWin32-x86;D:oracle10.2.0db_1
perl5.8.3lib;D:oracle10.2.0db_1perl5.8.3libMSWin32-x86;D:oracle10.2.0
db_1perlsite5.8.3;D:oracle10.2.0db_1perlsite5.8.3lib;D:oracle10.2.0
db_1sysmanadminscripts;
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 63 Stepping 2, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=3f02
ProgramData=C:ProgramData
ProgramFiles=C:Program Files
ProgramFiles(x86)=C:Program Files (x86)
ProgramW6432=C:Program Files
PROMPT=$P$G
PSModulePath=C:Windowssystem32WindowsPowerShellv1.0Modules
PUBLIC=C:UsersPublic
SESSIONNAME=RDP-Tcp#0
SystemDrive=C:
SystemRoot=C:Windows
TEMP=C:UsersADMINI~1AppDataLocalTemp2
TMP=C:UsersADMINI~1AppDataLocalTemp2
USERDOMAIN=DBSERVER2
USERNAME=Administrator
USERPROFILE=C:UsersAdministrator
windir=C:WindowsC:UsersAdministrator>SQLPLUS /NOLOG
SQL*Plus: Release 10.2.0.1.0 - Production on 星期六 8月 19 11:53:56 2017
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> CONNECT / AS SYSDBA
已连接。
SQL> select * from v$flass_recovery_area_usage
2 ;
select * from v$flass_recovery_area_usage
*
第 1 行出现错误:
ORA-00942: 表或视图不存在
SQL> select * from v$flash_recovery_area_usage;FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG 99.93 0 913
BACKUPPIECE 0 0 0
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0已选择6行。
SQL> select sum(percent_space_used)*3/100 from v$flash_recovery_area_usage;
SUM(PERCENT_SPACE_USED)*3/100
-----------------------------
2.9979SQL> show parameter recover;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string D:oracle10.2.0flash_recover
y_area
db_recovery_file_dest_size big integer 40G
recovery_parallelism integer 0
SQL> rman target sys/pass
SP2-0734: 未知的命令开头 "rman targe..." - 忽略了剩余的行。
SQL> rman target sys/pass/
SP2-0734: 未知的命令开头 "rman targe..." - 忽略了剩余的行。
SQL> rman target sys/pass;
SP2-0734: 未知的命令开头 "rman targe..." - 忽略了剩余的行。
SQL> rman
SP2-0042: 未知命令 "rman" - 其余行忽略。
SP2-0044: 要获取已知命令的列表, 请输入 HELP;
输入 EXIT 可退出。
SQL> RMAN;
SP2-0042: 未知命令 "RMAN" - 其余行忽略。
SQL> select * from v$flash_recovery_area_usage;FILE_TYPE PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
------------ ------------------ ------------------------- ---------------
CONTROLFILE 0 0 0
ONLINELOG 0 0 0
ARCHIVELOG .33 0 3
BACKUPPIECE 0 0 0
IMAGECOPY 0 0 0
FLASHBACKLOG 0 0 0已选择6行。
SQL>
-
删除无用的archivelog。进入rman,命令如下图:查看有多少无用的log文件,命令如下图:进行删除动作!
-
我的这个动作是连今天的log都会删除,要删什么时候的log还是要看系统自身。
- 删过期的log!一下的命令是删除过期的log,没有指定日期。
删除之后显示的占用空间只有0.33%,