sybdiag is a Java-based tool that collects comprehensive SAP ASE configuration and environment data. Technical Support uses this information to diagnose server issues, thus expediting customer cases.
sybdiag -U username [-P password] -S [server_name | host:port] [-I interfaces_file] [-L log_file] [-N num_threads] [-O output_directory] [-R resource_file] [-T feature_list] [-h] [-m message_level] [-D user_data_directory [-v]
Whether you specify this parameter or not, sybdiag creates a default log file called sybdiag.log in the .zip output file.
If you specify -S with no argument, sybdiag looks for a server named SYBASE. If you do not specify -S, sybdiag looks for the server specified by your DSQUERY environment variable.
host:port specifies the machine name and the port number.
osdata – operating system data.
asecore – SAP ASE configuration data.
aseadd – SAP ASE monitoring data.
keyfile – information about SAP ASE and operating system files.
0 – no messages.
1 – fatal errors only.
2 – all errors.
3 – warnings and all errors.
4 – informational messages, warnings, and all errors.
5 – debug and informational messages, warnings, and all errors.
sybdiag -Usa -P -Stestserver
Collecting data for "Adaptive Server Version" (ase_version) ... Completed data collection for "Adaptive Server Version" (ase_version). Collecting data for "Server License" (ase_license) ... Completed data collection for "Server License" (ase_license). Collecting data for "Adaptive Server Configuration" (ase_cfg) ... Completed data collection for "Adaptive Server Configuration" (ase_cfg). Collecting data for "Adaptive Server Non-default Configuration" (ase_nondefault_cfg) ... Completed data collection for "Adaptive Server Non-default Configuration" (ase_nondefault_cfg). ...Lines deleted... Collecting data for "Adaptive Server LDAP Configuration File" (ase_libtcl) ... Completed data collection for "Adaptive Server LDAP Configuration File" (ase_libtcl). Collecting data for "Adaptive Server LDAP Configuration File (64bit)" (ase_libtcl64) ... Completed data collection for "Adaptive Server LDAP Configuration File (64bit)" (ase_libtcl64). Collecting data for "Virtual Memory Statistics" (os_vmstat) ... Collecting data for "Adaptive Server General Performance Information" (ase_sysmon) ... Collecting data for "I/O Statistics" (os_iostat) ... Collecting data for "CPU Statistics" (os_mpstat) ... Completed data collection for "Virtual Memory Statistics" (os_vmstat). Completed data collection for "I/O Statistics" (os_iostat). Completed data collection for "CPU Statistics" (os_mpstat). Completed data collection for "Adaptive Server General Performance Information" (ase_sysmon). Data collection statistics: 43 task(s) succeeded, 0 task(s) skipped, and 0 task(s) failed. The collected data is stored as /work/ASEInstall/ASE-15_0/bin/sybdiag-testserver-20110312024652.zip Data collection completed.
sybdiag -Usa -P -Ssmmdi:9966 -Tasecore
Collecting data for "Adaptive Server Version" (ase_version) ... Completed data collection for "Adaptive Server Version" (ase_version). Collecting data for "Server License" (ase_license) ... Completed data collection for "Server License" (ase_license). Collecting data for "Adaptive Server Configuration" (ase_cfg) ... Completed data collection for "Adaptive Server Configuration" (ase_cfg). Collecting data for "Adaptive Server Non-default Configuration" (ase_nondefault_cfg) ... Completed data collection for "Adaptive Server Non-default Configuration" (ase_nondefault_cfg). Collecting data for "Remote Server Configuration" (ase_remote_server)... Completed data collection for "Remote Server Configuration" (ase_remote_server). Collecting data for "Adaptive Server Script Version" (ase_script_version) ... Completed data collection for "Adaptive Server Script Version" (ase_script_version). Collecting data for "Adaptive Server Configuration Monitor" (ase_mon_cfg) ... Completed data collection for "Adaptive Server Configuration Monitor" (ase_mon_cfg). Collecting data for "Adaptive Server Cache Configuration" (ase_cache_cfg) ... Completed data collection for "Adaptive Server Cache Configuration" (ase_cache_cfg). Collecting data for "Adaptive Server Pool Configuration" (ase_pool_cfg) ... Completed data collection for "Adaptive Server Pool Configuration" (ase_pool_cfg). Collecting data for "Adaptive Server Shared Memory Dump Configuration" (ase_shmdumpconfig) ... Completed data collection for "Adaptive Server Shared Memory Dump Configuration" (ase_shmdumpconfig). Collecting data for "Adaptive Server Traceflags and Switches" (ase_switches) ... Completed data collection for "Adaptive Server Traceflags and Switches" (ase_switches). Data collection statistics: 11 task(s) succeeded, 0 task(s) skipped, and 0 task(s) failed. The collected data is stored as /work/ASEInstall/ASE-15_0/bin/sybdiag smmdi_9966-20110502202909.zip Data collection completed.
sp_role "grant", sa_role, sybdiag_user go sp_role "grant", mon_role, sybdiag_user go
You may need other permissions to access database objects if your system administrator has changed the default access restrictions. If you have insufficient permission to access certain database objects, you see an error message that lists the database objects that you cannot access.
To gather all environment data, you must have authorized access to operating system and device files.
SAP ASE error log
SAP ASE configuration file
Environment scripts such as SYBASE.csh, SYBASE.sh or SYBASE.bat
You must have write permissions on an output directory specified by the -O parameter.