sybase的isql命令初使用
(2009-07-14 15:54:38)
转载 标签: isql
初用
sybase
这几日被Sybase烦透了。。。
isql命令存在于 /sybase/OCS-15_0/bin 路径下。
Sybase登录命令及参数:
usage: ./isql [-b] [-e] [-F] [-p] [-n] [-v] [-W] [-X] [-Y] [-Q]
[-a display_charset] [-A packet_size] [-c cmdend] [-D database]
[-E editor] [-h header] [-H hostname] [-i inputfile]
[-I interfaces_file] [-J client_charset] [-K keytab_file]
[-l login_timeout] [-m errorlevel] [-M labelname labelvalue]
[-o outputfile] [-P password] [-R remote_server_principal]
[-s col_separator] [-S server_name] [-t timeout] [-U username]
[-V [security_options]] [-w column_width] [-y sybase directory]
[-z localename] [-Z security_mechanism] [-x trusted.txt_file]
[--retserverror] [--conceal [wildcard]] [--help]
待续。。。
./isql -U username -P password -S SVC
试图监控一下Sybase资源
1> use master
2> go
1> select * from monProcessStatement
2> go
出错:
Msg 12036, Level 17, State 1:
Server 'SVC', Line 1:
Collection of monitoring data for table 'monProcessStatement' requires that the
'enable monitoring', 'statement statistics active', 'per object statistics
active', 'wait event timing' configuration option(s) be enabled. To set the
necessary configuration, contact a user who has the System Administrator (SA)
role.
经炳华提示,网上google搜索:sp_configuration 'enable monitoring'
相关一解决办法地址http://www.sypron.nl/mda.html
操作:
1> sp_configure "enable monitoring" , 1
2> go
Parameter Name Default Memory Used Config Value
Run Value Unit Type
------------------------------ ----------- ----------- ------------
------------ -------------------- ----------
enable monitoring 0 0 1
1 switch dynamic
(1 row affected)
Configuration option changed. ASE need not be rebooted since the option is
dynamic.
Changing the value of 'enable monitoring' does not increase the amount of memory
Adaptive Server uses.
(return status = 0)
1> sp_configure "statement statistics active", 1
2> go
Parameter Name Default Memory Used Config Value
Run Value Unit Type
------------------------------ ----------- ----------- ------------
------------ -------------------- ----------
statement statistics active 0 0 1
1 switch dynamic
(1 row affected)
1> sp_configure "per object statistics active" , 1
2> go
Parameter Name Default Memory Used Config Value
Run Value Unit Type
------------------------------ ----------- ----------- ------------
------------ -------------------- ----------
per object statistics active 0 0 1
1 switch dynamic
(1 row affected)
执行结果:
1> select * from monProcessStatement
2> go
SPID KPID DBID ProcedureID PlanID BatchID ContextID
LineNumber CpuTime WaitTime MemUsageKB PhysicalReads
LogicalReads PagesModified PacketsSent PacketsReceived
NetworkPacketSize PlansAltered RowsAffected
DBName StartTime
------ ----------- ----------- ----------- ----------- ----------- -----------
----------- ----------- ----------- ----------- -------------
------------ ------------- ----------- ---------------
----------------- ------------ ------------
------------------------------ --------------------------
374 111149190 1 0 0 23 0
1 0 0 26 0