sqlplus username/password@[//]host[:port][/service_name] @"xxx.sql"
sqlplus username/password@[//]host[:port][/service_name] @"xxx.sql"
analyze TABLE SCHEMA.TABLE_NAME compute statistics;
SELECT owner,
table_name,
ROUND((num_rows*avg_row_len)) BYTE,
ROUND((num_rows*avg_row_len)/1024) KB,
ROUND((num_rows*avg_row_len)/(1024*1024)) MB
FROM all_tables
WHERE owner = 'SCHEMA' -- Exclude system tables.
AND table_name IN ('TABLE_NAME')
ORDER BY MB DESC;
SELECT
FS.TABLESPACE_NAME "TABLESPACE" ,
(
DF.TOTALSPACE - FS.FREESPACE
) "USED MB" ,
FS.FREESPACE "FREE MB" ,
DF.TOTALSPACE "TOTAL MB" ,
ROUND( 100 *( FS.FREESPACE / DF.TOTALSPACE ) ) "PCT. FREE"
FROM
(
SELECT
TABLESPACE_NAME ,
ROUND( SUM( BYTES ) / 1048576 ) TOTALSPACE
FROM
DBA_DATA_FILES
GROUP BY
TABLESPACE_NAME
) DF ,
(
SELECT
TABLESPACE_NAME ,
ROUND( SUM( BYTES ) / 1048576 ) FREESPACE
FROM
DBA_FREE_SPACE
GROUP BY
TABLESPACE_NAME
) FS
WHERE
DF.TABLESPACE_NAME = FS.TABLESPACE_NAME
AND DF.TABLESPACE_NAME IN(
'NAME1' ,
'NAME2'
)
Java获得环境变量有两个方法。
System.getProperties();
System.getenv();
根据JDK 7中的描述
System.getenv()
Returns an unmodifiable string map view of the current system environment.
public static Map<String,String> getenv()
Returns an unmodifiable string map view of the current system environment. The environment is a system-dependent mapping from names to values which is passed from parent to child processes.
If the system does not support environment variables, an empty map is returned.
The returned map will never contain null keys or values. Attempting to query the presence of a null key or value will throw a NullPointerException. Attempting to query the presence of a key or value which is not of type String will throw a ClassCastException.
The returned map and its collection views may not obey the general contract of the Object.equals(java.lang.Object) and Object.hashCode() methods.
The returned map is typically case-sensitive on all platforms.
If a security manager exists, its checkPermission method is called with a RuntimePermission("getenv.*") permission. This may result in a SecurityException being thrown.
When passing information to a Java subprocess, system properties are generally preferred over environment variables.
Returns:
the environment as a map of variable names to values
Throws:
SecurityException - if a security manager exists and its checkPermission method doesn't allow access to the process environment
Since:
1.5
See Also:
getenv(String), ProcessBuilder.environment()
getProperties()
Determines the current system properties.
public static Properties getProperties()
Determines the current system properties.
First, if there is a security manager, its checkPropertiesAccess method is called with no arguments. This may result in a security exception.
The current set of system properties for use by the getProperty(String) method is returned as a Properties object. If there is no current set of system properties, a set of system properties is first created and initialized. This set of system properties always includes values for the following keys:
Key Description of Associated Value
java.version Java Runtime Environment version
java.vendor Java Runtime Environment vendor
java.vendor.url Java vendor URL
java.home Java installation directory
java.vm.specification.version Java Virtual Machine specification version
java.vm.specification.vendor Java Virtual Machine specification vendor
java.vm.specification.name Java Virtual Machine specification name
java.vm.version Java Virtual Machine implementation version
java.vm.vendor Java Virtual Machine implementation vendor
java.vm.name Java Virtual Machine implementation name
java.specification.version Java Runtime Environment specification version
java.specification.vendor Java Runtime Environment specification vendor
java.specification.name Java Runtime Environment specification name
java.class.version Java class format version number
java.class.path Java class path
java.library.path List of paths to search when loading libraries
java.io.tmpdir Default temp file path
java.compiler Name of JIT compiler to use
java.ext.dirs Path of extension directory or directories
os.name Operating system name
os.arch Operating system architecture
os.version Operating system version
file.separator File separator ("/" on UNIX)
path.separator Path separator (":" on UNIX)
line.separator Line separator ("\n" on UNIX)
user.name User's account name
user.home User's home directory
user.dir User's current working directory
Multiple paths in a system property value are separated by the path separator character of the platform.
Note that even if the security manager does not permit the getProperties operation, it may choose to permit the getProperty(String) operation.
Returns:
the system properties
Throws:
SecurityException - if a security manager exists and its checkPropertiesAccess method doesn't allow access to the system properties.
See Also:
setProperties(java.util.Properties), SecurityException, SecurityManager.checkPropertiesAccess(), Properties
网上很多使用的是getProperties。说获得系统变量,但是其实不正确。getProperties中所谓的"system properties"其实是指"java system",而非"operation system",概念完全不同,使用getProperties获得的其实是虚拟机的变量形如: -Djavaxxxx。
getenv方法才是真正的获得系统环境变量,比如Path之类。其方法命名方式有违Sun命名规范其实。
还有就是在JDK 1.4中该方法其实是Deprecated的,1.3也是。我认为Sun的当初设计思路是想让其屏蔽,或者可控Java对系统变量的访问能力。以下为JavaDoc 1.3, 1.4中对getenv方法的描述
getenv
public static String getenv(String name)
Deprecated. The preferred way to extract system-dependent information is the system properties of the java.lang.System.getProperty methods and the corresponding getTypeName methods of the Boolean, Integer, and Long primitive types. For example:
String classPath = System.getProperty("java.class.path",".");
if (Boolean.getBoolean("myapp.exper.mode"))
enableExpertCommands();
Gets an environment variable. An environment variable is a system-dependent external variable that has a string value.
Parameters:
name - of the environment variable
Returns:
the value of the variable, or null if the variable is not defined.
See Also:
Boolean.getBoolean(java.lang.String), Integer.getInteger(java.lang.String), Integer.getInteger(java.lang.String, int), Integer.getInteger(java.lang.String, java.lang.Integer), Long.getLong(java.lang.String), Long.getLong(java.lang.String, long), Long.getLong(java.lang.String, java.lang.Long), getProperties(), getProperty(java.lang.String), getProperty(java.lang.String, java.lang.String)
意思就是说:希望使用Java的系统变量替代操作系统的变量获取,如果你想访问某个系统的环境变量(operation system properti
1.更新 mic.ini 文件:
路径 <QTP安装目录>\\bin\\mic.ini
找到 [RemoteAgent]这部分
修改以下值
HandleLongTrans=1
重起电脑
2.删除nt_tr.exe服务
命令行模式下。 [开始> 运行 > cmd]
cd C:\\Program Files\\HP\\QuickTest Professional\\binnt_tr.exe -remove
弹出对话框删除成功
重起电脑
Public Function IsExsitTab(tabControlH, tabHeadStr) As Boolean
tabCount = tabControlH.Object.TabPages.Count
For i = 0 to tabCount - 1
Set currentTabPage = tabControlH.Object.TabPages.Item(i)
tabHead = currentTabPage.Text
If tabHead = tabHeadStr Then
IsExsitTab = True
Exit Function
End If
Next
IsExsitTab = False
End Function
关联