oracle subagent moved to public tree
authorVictor Kirhenshtein <victor@netxms.org>
Wed, 8 Feb 2012 22:06:39 +0000 (22:06 +0000)
committerVictor Kirhenshtein <victor@netxms.org>
Wed, 8 Feb 2012 22:06:39 +0000 (22:06 +0000)
.gitattributes
configure.ac
doc/manuals/oracle monitoring subagent - user guide.odt [new file with mode: 0644]
netxms.sln
src/agent/subagents/oracle/Makefile.am [new file with mode: 0644]
src/agent/subagents/oracle/main.cpp [new file with mode: 0644]
src/agent/subagents/oracle/oracle.vcproj [new file with mode: 0644]
src/agent/subagents/oracle/oracle_subagent.h [new file with mode: 0644]

index d072aa2..07eba15 100644 (file)
@@ -98,6 +98,7 @@ doc/manuals/netxms_solution_guide.doc -text
 doc/manuals/netxms_user_manual.odt -text
 doc/manuals/netxms_webapi_reference.odt -text
 doc/manuals/nxcp_reference.odt -text
+doc/manuals/oracle[!!-~]monitoring[!!-~]subagent[!!-~]-[!!-~]user[!!-~]guide.odt -text
 doc/misc/agent_parameters.xlsx -text
 doc/misc/dummy -text
 images/092e4b35-4e7c-42df-b9b7-d5805bfac64e -text
@@ -133,6 +134,10 @@ src/agent/subagents/informix/Makefile.am -text
 src/agent/subagents/informix/informix.vcproj -text
 src/agent/subagents/logwatch/logwatch.vcproj -text
 src/agent/subagents/odbcquery/odbcquery.vcproj -text
+src/agent/subagents/oracle/Makefile.am -text
+src/agent/subagents/oracle/main.cpp -text
+src/agent/subagents/oracle/oracle.vcproj -text
+src/agent/subagents/oracle/oracle_subagent.h -text
 src/agent/subagents/ping/ping.vcproj -text
 src/agent/subagents/portCheck/portcheck.vcproj -text
 src/agent/subagents/sms/sms.vcproj -text
index f1f5a79..33c3707 100644 (file)
@@ -4,7 +4,7 @@
 # Configure script
 #
 
-AC_INIT([NetXMS], [1.1.9], [bugs@netxms.org])
+AC_INIT([NetXMS], [1.1.10], [bugs@netxms.org])
 AC_CONFIG_AUX_DIR(config)
 AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE
@@ -331,7 +331,7 @@ AC_ARG_WITH(dist,
 [AS_HELP_STRING(--with-dist,for maintainers only)],
        DB_DRIVERS=" mysql pgsql odbc mssql sqlite oracle db2 informix"
        MODULES="libexpat libtre zlib libnetxms install sqlite snmp libnxsl libnxlp db server agent libnxmap libnxcl client nxscript tools webui"
-       SUBAGENT_DIRS="linux freebsd openbsd netbsd sunos aix ipso hpux odbcquery informix"
+       SUBAGENT_DIRS="linux freebsd openbsd netbsd sunos aix ipso hpux odbcquery informix oracle"
        NXCONFIG="nxconfig"
        TOP_LEVEL_MODULES="sql images"
        CONTRIB_MODULES="mibs backgrounds"
@@ -509,6 +509,7 @@ fi
 check_substr "$COMPONENTS" "oracle"
 if test $? = 0; then
        DB_DRIVERS="$DB_DRIVERS oracle"
+       SUBAGENT_DIRS="$SUBAGENT_DIRS oracle"
 fi
 
 check_substr "$COMPONENTS" "db2"
@@ -1973,6 +1974,7 @@ AC_CONFIG_FILES([
        src/agent/subagents/netbsd/Makefile
        src/agent/subagents/odbcquery/Makefile
        src/agent/subagents/openbsd/Makefile
+       src/agent/subagents/oracle/Makefile
        src/agent/subagents/ping/Makefile
        src/agent/subagents/portCheck/Makefile
        src/agent/subagents/sms/Makefile
diff --git a/doc/manuals/oracle monitoring subagent - user guide.odt b/doc/manuals/oracle monitoring subagent - user guide.odt
new file mode 100644 (file)
index 0000000..57556b1
Binary files /dev/null and b/doc/manuals/oracle monitoring subagent - user guide.odt differ
index 4959df2..bc3a9a1 100644 (file)
@@ -5,27 +5,27 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libexpat", "src\libexpat\li
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnetxms", "src\libnetxms\libnetxms.vcproj", "{B1745870-F3ED-4ACB-B813-0C4F47EF0793}"
        ProjectSection(ProjectDependencies) = postProject
-               {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
                {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
+               {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnetxmsw", "src\libnetxms\libnetxmsw.vcproj", "{AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}"
        ProjectSection(ProjectDependencies) = postProject
-               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
                {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
+               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxlp", "src\libnxlp\libnxlp.vcproj", "{64EFC0C2-C67B-41F6-851D-F11DAB27A60B}"
        ProjectSection(ProjectDependencies) = postProject
-               {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
-               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
+               {6A88EF62-C4F2-4295-A833-549DAE4DF5ED} = {6A88EF62-C4F2-4295-A833-549DAE4DF5ED}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxagentd", "src\agent\core\nxagentd.vcproj", "{57598B02-3295-4FE8-9322-94CE871CC84D}"
        ProjectSection(ProjectDependencies) = postProject
-               {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "subagents", "subagents", "{451F583D-C2DB-4414-870C-7FA0189BE7DD}"
@@ -65,8 +65,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sms", "src\agent\subagents\
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portcheck", "src\agent\subagents\portcheck\portcheck.vcproj", "{F66A27F0-2943-4A16-ACC7-B450314B5163}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ping", "src\agent\subagents\ping\ping.vcproj", "{C5CCF5DE-152E-40F3-AC6C-C5E54BB7C45F}"
@@ -81,8 +81,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "odbcquery", "src\agent\suba
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "logwatch", "src\agent\subagents\logwatch\logwatch.vcproj", "{F8A8749E-E539-4A3B-A21C-2C5C86AE33EA}"
        ProjectSection(ProjectDependencies) = postProject
-               {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ecs", "src\agent\subagents\ecs\ecs.vcproj", "{BBE9028E-725C-45C6-97C9-BFC443F19DB6}"
@@ -104,125 +104,125 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxmapw", "src\libnxmap\l
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxcl", "src\libnxcl\libnxcl.vcproj", "{3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {AB386821-B630-49F5-95C3-677B9DCE1270} = {AB386821-B630-49F5-95C3-677B9DCE1270}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxclw", "src\libnxcl\libnxclw.vcproj", "{3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}"
        ProjectSection(ProjectDependencies) = postProject
-               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{39BF23C9-D903-4C20-8E88-19533A745625}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxalarm", "src\client\nxalarm\nxalarm.vcproj", "{F9FFAAE9-D669-451E-B9EF-18BC8AD37FAB}"
        ProjectSection(ProjectDependencies) = postProject
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxevent", "src\client\nxevent\nxevent.vcproj", "{C7A460E8-12A8-4FC7-9F59-C9C5CE17ED20}"
        ProjectSection(ProjectDependencies) = postProject
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxpush", "src\client\nxpush\nxpush.vcproj", "{B8671BF7-94E1-4615-A8C2-F5C78DB8C515}"
        ProjectSection(ProjectDependencies) = postProject
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsms", "src\client\nxsms\nxsms.vcproj", "{B0A70A32-A8F0-4071-8044-FDA3C834A5C5}"
        ProjectSection(ProjectDependencies) = postProject
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxsnmp", "src\snmp\libnxsnmp\libnxsnmp.vcproj", "{7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}"
        ProjectSection(ProjectDependencies) = postProject
-               {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxzlib", "src\zlib\nxzlib.vcproj", "{E7410EB4-3355-4C83-8E05-D2877581CDA1}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsnmpget", "src\snmp\nxsnmpget\nxsnmpget.vcproj", "{0A4CE471-020A-42C6-91C0-DFEFA7E815E0}"
        ProjectSection(ProjectDependencies) = postProject
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxsnmpw", "src\snmp\libnxsnmp\libnxsnmpw.vcproj", "{7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsnmpset", "src\snmp\nxsnmpset\nxsnmpset.vcproj", "{9EA98E79-EB7D-4F6C-8105-AC7B231ABB10}"
        ProjectSection(ProjectDependencies) = postProject
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsnmpwalk", "src\snmp\nxsnmpwalk\nxsnmpwalk.vcproj", "{5FA3AADC-3AD7-4B17-A581-D5E02DE17727}"
        ProjectSection(ProjectDependencies) = postProject
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxmibc", "src\snmp\nxmibc\nxmibc.vcproj", "{9F722C62-78FD-4D8C-A7C7-2815B09F1943}"
        ProjectSection(ProjectDependencies) = postProject
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FB}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxsrv", "src\server\libnxsrv\libnxsrv.vcproj", "{CB89D905-C8BE-4027-B2D8-F96C245E9160}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxcore", "src\server\core\nxcore.vcproj", "{3B172035-5EEC-45A3-8471-2C390B7ED683}"
        ProjectSection(ProjectDependencies) = postProject
-               {B2988503-1921-4B9F-BBC1-5E5CF62F335E} = {B2988503-1921-4B9F-BBC1-5E5CF62F335E}
-               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
-               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
-               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
+               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
+               {B2988503-1921-4B9F-BBC1-5E5CF62F335E} = {B2988503-1921-4B9F-BBC1-5E5CF62F335E}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nxsl", "nxsl", "{CE0DA89E-CF0C-452C-9C33-75A143355BDC}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libnxsl", "src\libnxsl\libnxsl.vcproj", "{B2988503-1921-4B9F-BBC1-5E5CF62F335E}"
        ProjectSection(ProjectDependencies) = postProject
-               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {406AE5C7-343D-4C88-B8F3-84E46255B830} = {406AE5C7-343D-4C88-B8F3-84E46255B830}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxscript", "src\nxscript\nxscript.vcproj", "{BA263F92-D5A9-4F26-9606-5A1C1495FEA5}"
        ProjectSection(ProjectDependencies) = postProject
-               {B2988503-1921-4B9F-BBC1-5E5CF62F335E} = {B2988503-1921-4B9F-BBC1-5E5CF62F335E}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {B2988503-1921-4B9F-BBC1-5E5CF62F335E} = {B2988503-1921-4B9F-BBC1-5E5CF62F335E}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netxmsd", "src\server\netxmsd\netxmsd.vcproj", "{E417A0C4-41F1-4F87-8C33-8526ECB1F8AF}"
        ProjectSection(ProjectDependencies) = postProject
-               {3B172035-5EEC-45A3-8471-2C390B7ED683} = {3B172035-5EEC-45A3-8471-2C390B7ED683}
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {3B172035-5EEC-45A3-8471-2C390B7ED683} = {3B172035-5EEC-45A3-8471-2C390B7ED683}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{64482674-7B36-4A14-A612-247333174315}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxaction", "src\server\tools\nxaction\nxaction.vcproj", "{BF5CE6BA-C84A-4448-B1B7-1B355AC77D12}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxadm", "src\server\tools\nxadm\nxadm.vcproj", "{67E35735-2115-45FF-9E93-EE67AF5C9C2C}"
@@ -232,32 +232,32 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxadm", "src\server\tools\n
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxget", "src\server\tools\nxget\nxget.vcproj", "{1AC3C8D1-E309-4327-9E17-0E4CE0FC68CF}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxupload", "src\server\tools\nxupload\nxupload.vcproj", "{DA863269-ED58-4910-AA6A-2572A3EE745D}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxdbmgr", "src\server\tools\nxdbmgr\nxdbmgr.vcproj", "{4940613E-A11C-4259-95C8-8D23217EE60E}"
        ProjectSection(ProjectDependencies) = postProject
-               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
-               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
-               {87CAA25D-991E-45E1-BB69-337D45121F19} = {87CAA25D-991E-45E1-BB69-337D45121F19}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {87CAA25D-991E-45E1-BB69-337D45121F19} = {87CAA25D-991E-45E1-BB69-337D45121F19}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
+               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "webui", "webui", "{7C6B32C4-53F9-4378-903E-1DA05748376B}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxhttpd", "src\webui\nxhttpd\nxhttpd.vcproj", "{AC0CB89C-E27A-43FA-A049-1FF4B2FE2121}"
        ProjectSection(ProjectDependencies) = postProject
-               {F5287CFB-0894-4169-B5B5-1AEE4F2FF585} = {F5287CFB-0894-4169-B5B5-1AEE4F2FF585}
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB531}
+               {F5287CFB-0894-4169-B5B5-1AEE4F2FF585} = {F5287CFB-0894-4169-B5B5-1AEE4F2FF585}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "src\webui\libgd\libpng\libpng.vcproj", "{E9F4A68D-4BF2-45AD-BDD6-210AFF857661}"
@@ -273,67 +273,67 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "smsdrv", "smsdrv", "{5818CC
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "generic", "src\server\smsdrv\generic\generic.vcproj", "{41A5009F-4467-4D89-A171-5A919FEFE16E}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxagent", "src\server\smsdrv\nxagent\nxagent.vcproj", "{C317231C-B984-4423-ACF2-C19DE8B6AA3F}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libgd", "src\webui\libgd\gd\libgd.vcproj", "{F5287CFB-0894-4169-B5B5-1AEE4F2FF585}"
        ProjectSection(ProjectDependencies) = postProject
-               {0D98A1CD-48E0-4F11-9151-B53497E1F7DA} = {0D98A1CD-48E0-4F11-9151-B53497E1F7DA}
-               {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
-               {E9F4A68D-4BF2-45AD-BDD6-210AFF857661} = {E9F4A68D-4BF2-45AD-BDD6-210AFF857661}
                {55B7161B-683F-4E7A-96F6-277A1681D6C5} = {55B7161B-683F-4E7A-96F6-277A1681D6C5}
+               {E9F4A68D-4BF2-45AD-BDD6-210AFF857661} = {E9F4A68D-4BF2-45AD-BDD6-210AFF857661}
+               {E7410EB4-3355-4C83-8E05-D2877581CDA1} = {E7410EB4-3355-4C83-8E05-D2877581CDA1}
+               {0D98A1CD-48E0-4F11-9151-B53497E1F7DA} = {0D98A1CD-48E0-4F11-9151-B53497E1F7DA}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "windows", "windows", "{69EC5B74-D466-422E-B8D1-1386B0421D54}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxlexer", "src\client\nxlexer\nxlexer.vcproj", "{F0FAC738-1BC6-46A5-A54A-8D7F2219302D}"
        ProjectSection(ProjectDependencies) = postProject
-               {8E5A517B-93AB-4EA8-BB53-AE6346756343} = {8E5A517B-93AB-4EA8-BB53-AE6346756343}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {8E5A517B-93AB-4EA8-BB53-AE6346756343} = {8E5A517B-93AB-4EA8-BB53-AE6346756343}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scilexer", "src\client\scilexer\scilexer.vcproj", "{8E5A517B-93AB-4EA8-BB53-AE6346756343}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxuilib", "src\client\windows\nxuilib\nxuilib.vcproj", "{BECC966D-AFC8-48F6-97B1-2FE92062D7B4}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxav", "src\client\windows\nxav\nxav.vcproj", "{23F22F68-D562-4E80-8267-9F1DD9398357}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
                {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxnotify", "src\client\windows\nxnotify\nxnotify.vcproj", "{169A4446-A035-4CF7-8377-3C517ADF0C50}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
                {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxcon", "src\client\windows\nxcon\nxcon.vcproj", "{956DD617-0939-4B25-B8D0-E10AA645064E}"
        ProjectSection(ProjectDependencies) = postProject
-               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
-               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
                {BECC966D-AFC8-48F6-97B1-2FE92062D7B4} = {BECC966D-AFC8-48F6-97B1-2FE92062D7B4}
+               {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532} = {3CB9B8C6-E6BF-4002-A61A-7A21FEADB532}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B} = {0A5E80F3-485D-40C8-BE1E-9D7EE744DB8B}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxlptest", "src\nxlptest\nxlptest.vcproj", "{1EA79FC6-F395-43DF-9E3C-2030CA05ED1D}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {64EFC0C2-C67B-41F6-851D-F11DAB27A60B} = {64EFC0C2-C67B-41F6-851D-F11DAB27A60B}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxsqlite", "src\sqlite\nxsqlite.vcproj", "{87CAA25D-991E-45E1-BB69-337D45121F19}"
@@ -384,14 +384,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pgsql", "src\db\dbdrv\pgsql
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sqlite", "src\db\dbdrv\sqlite\sqlite.vcproj", "{AA18FD4D-7B01-4932-BA04-B0F54F001F66}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {87CAA25D-991E-45E1-BB69-337D45121F19} = {87CAA25D-991E-45E1-BB69-337D45121F19}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxconfig", "src\server\tools\nxconfig\nxconfig.vcproj", "{A76CCCF5-D70B-4307-B84C-219289CEAA6D}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxcptest", "src\tools\nxcptest\nxcptest.vcproj", "{418E47B0-3E78-4820-A101-CA9C4439F9AB}"
@@ -408,9 +408,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libipfix", "src\flow_analyz
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxflowd", "src\flow_analyzer\nxflowd\nxflowd.vcproj", "{D7F709ED-7483-49F0-8B17-ABB705606FEA}"
        ProjectSection(ProjectDependencies) = postProject
-               {2DEF303B-5FEF-4F5E-87C4-FB7895058F59} = {2DEF303B-5FEF-4F5E-87C4-FB7895058F59}
-               {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
                {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
+               {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
+               {2DEF303B-5FEF-4F5E-87C4-FB7895058F59} = {2DEF303B-5FEF-4F5E-87C4-FB7895058F59}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db2", "src\db\dbdrv\db2\db2.vcproj", "{297D9A45-B928-4470-91B5-0E07A20C2405}"
@@ -420,8 +420,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "db2", "src\db\dbdrv\db2\db2
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxap", "src\server\tools\nxap\nxap.vcproj", "{36749C31-C8C6-4DD2-A11C-E41ED86927C7}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libtre", "src\libtre\libtre.vcproj", "{406AE5C7-343D-4C88-B8F3-84E46255B830}"
@@ -440,55 +440,55 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "drivers", "drivers", "{5399
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baystack", "src\server\drivers\baystack\baystack.vcproj", "{13A91F2E-A17B-4ABA-B5B2-285807BD7832}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
                {DA651576-4E4F-448C-A0A3-9EDD15C81078} = {DA651576-4E4F-448C-A0A3-9EDD15C81078}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ers8000", "src\server\drivers\ers8000\ers8000.vcproj", "{076E6815-4B6B-4F1E-A36C-CD3DD26EA5AC}"
        ProjectSection(ProjectDependencies) = postProject
-               {DA651576-4E4F-448C-A0A3-9EDD15C81078} = {DA651576-4E4F-448C-A0A3-9EDD15C81078}
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {DA651576-4E4F-448C-A0A3-9EDD15C81078} = {DA651576-4E4F-448C-A0A3-9EDD15C81078}
        EndProjectSection
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{D73BB67D-032B-4FB7-AEB8-5795B246A072}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avaya-ers", "src\server\drivers\lib\avaya-ers\avaya-ers.vcproj", "{DA651576-4E4F-448C-A0A3-9EDD15C81078}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cisco", "src\server\drivers\lib\cisco\cisco.vcproj", "{375F95BD-EFBA-4AA3-8DA3-E79779A12896}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cat2900xl", "src\server\drivers\cat2900xl\cat2900xl.vcproj", "{FEEF505B-75AE-4E52-8177-51FFC4AB2ED2}"
        ProjectSection(ProjectDependencies) = postProject
-               {375F95BD-EFBA-4AA3-8DA3-E79779A12896} = {375F95BD-EFBA-4AA3-8DA3-E79779A12896}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {375F95BD-EFBA-4AA3-8DA3-E79779A12896} = {375F95BD-EFBA-4AA3-8DA3-E79779A12896}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portech", "src\server\smsdrv\portech\portech.vcproj", "{7D0A15A1-7F6E-480D-9926-13BB6DAA0E10}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "netscreen", "src\server\drivers\netscreen\netscreen.vcproj", "{500DE9BF-6FC1-4ACB-91A9-308BA1D37F37}"
        ProjectSection(ProjectDependencies) = postProject
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "informix", "src\db\dbdrv\informix\informix.vcproj", "{7DE4A043-48B8-4D66-8D3F-8CF5C757EEB5}"
@@ -498,29 +498,35 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "informix", "src\db\dbdrv\in
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "informix", "src\agent\subagents\informix\informix.vcproj", "{12F5AF3E-A688-4852-A0ED-921D0E088AC4}"
        ProjectSection(ProjectDependencies) = postProject
-               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
                {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dbemu", "src\server\smsdrv\dbemu\dbemu.vcproj", "{912783D2-CF6F-4040-B564-4E2436EB0827}"
        ProjectSection(ProjectDependencies) = postProject
-               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC} = {96EF0643-89FD-47CD-B82E-9F7D1DAF35EC}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nxinstall", "src\nxinstall\nxinstall.vcproj", "{C177FB94-66E8-424E-BDBE-A96C75D2672C}"
        ProjectSection(ProjectDependencies) = postProject
-               {B2988503-1921-4B9F-BBC1-5E5CF62F335E} = {B2988503-1921-4B9F-BBC1-5E5CF62F335E}
                {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {B2988503-1921-4B9F-BBC1-5E5CF62F335E} = {B2988503-1921-4B9F-BBC1-5E5CF62F335E}
        EndProjectSection
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "catalyst", "src\server\drivers\catalyst\catalyst.vcproj", "{F343CDCB-1DB5-4563-86DF-6AF1596090B2}"
        ProjectSection(ProjectDependencies) = postProject
-               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
-               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
-               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
                {375F95BD-EFBA-4AA3-8DA3-E79779A12896} = {375F95BD-EFBA-4AA3-8DA3-E79779A12896}
+               {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA} = {AEB182ED-7F5C-4F5A-BCE1-9A38E98579BA}
+               {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC} = {7DC90EE4-E31C-4F12-8F1E-81F10E9099FC}
+               {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {CB89D905-C8BE-4027-B2D8-F96C245E9160}
+       EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oracle", "src\agent\subagents\oracle\oracle.vcproj", "{90B762AB-B7BA-42D6-9819-C687AB3F59D0}"
+       ProjectSection(ProjectDependencies) = postProject
+               {F3E29541-3A0E-45EC-8BEC-E193F2401622} = {F3E29541-3A0E-45EC-8BEC-E193F2401622}
+               {B1745870-F3ED-4ACB-B813-0C4F47EF0793} = {B1745870-F3ED-4ACB-B813-0C4F47EF0793}
        EndProjectSection
 EndProject
 Global
@@ -1383,6 +1389,14 @@ Global
                {F343CDCB-1DB5-4563-86DF-6AF1596090B2}.Release|Win32.Build.0 = Release|Win32
                {F343CDCB-1DB5-4563-86DF-6AF1596090B2}.Release|x64.ActiveCfg = Release|x64
                {F343CDCB-1DB5-4563-86DF-6AF1596090B2}.Release|x64.Build.0 = Release|x64
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Win32
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0}.Debug|Win32.ActiveCfg = Debug|Win32
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0}.Debug|Win32.Build.0 = Debug|Win32
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0}.Debug|x64.ActiveCfg = Debug|Win32
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Win32
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0}.Release|Win32.ActiveCfg = Release|Win32
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0}.Release|Win32.Build.0 = Release|Win32
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0}.Release|x64.ActiveCfg = Release|Win32
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE
@@ -1414,6 +1428,7 @@ Global
                {F8A8749E-E539-4A3B-A21C-2C5C86AE33EA} = {451F583D-C2DB-4414-870C-7FA0189BE7DD}
                {BBE9028E-725C-45C6-97C9-BFC443F19DB6} = {451F583D-C2DB-4414-870C-7FA0189BE7DD}
                {12F5AF3E-A688-4852-A0ED-921D0E088AC4} = {451F583D-C2DB-4414-870C-7FA0189BE7DD}
+               {90B762AB-B7BA-42D6-9819-C687AB3F59D0} = {451F583D-C2DB-4414-870C-7FA0189BE7DD}
                {CB89D905-C8BE-4027-B2D8-F96C245E9160} = {B93920F5-65F4-4531-B87E-A5B357AF2476}
                {3B172035-5EEC-45A3-8471-2C390B7ED683} = {B93920F5-65F4-4531-B87E-A5B357AF2476}
                {E417A0C4-41F1-4F87-8C33-8526ECB1F8AF} = {B93920F5-65F4-4531-B87E-A5B357AF2476}
diff --git a/src/agent/subagents/oracle/Makefile.am b/src/agent/subagents/oracle/Makefile.am
new file mode 100644 (file)
index 0000000..e281772
--- /dev/null
@@ -0,0 +1,17 @@
+INCLUDES=-I@top_srcdir@/include
+
+SUBAGENT = oracle
+
+pkglib_LTLIBRARIES = oracle.la
+oracle_la_SOURCES = main.cpp
+oracle_la_LDFLAGS = -module -avoid-version
+oracle_la_LIBADD = ../../../libnetxms/libnetxms.la ../../../db/libnxdb/libnxdb.la
+
+EXTRA_DIST = oracle.vcproj oracle_subagent.h
+
+install-exec-hook:
+       if test "x`uname -s`" = "xAIX" ; then OBJECT_MODE=@OBJECT_MODE@ $(AR) x $(DESTDIR)$(pkglibdir)/$(SUBAGENT).a $(DESTDIR)$(pkglibdir)/$(SUBAGENT).so ; rm -f $(DESTDIR)$(pkglibdir)/$(SUBAGENT).a ; fi
+       mv $(DESTDIR)$(pkglibdir)/$(SUBAGENT).so $(DESTDIR)$(pkglibdir)/$(SUBAGENT).nsm
+       rm -f $(DESTDIR)$(pkglibdir)/$(SUBAGENT).la
+       rm -f $(DESTDIR)$(libdir)/libnsm_$(SUBAGENT).so
+       ln -s $(pkglibdir)/$(SUBAGENT).nsm $(DESTDIR)$(libdir)/libnsm_$(SUBAGENT).so
diff --git a/src/agent/subagents/oracle/main.cpp b/src/agent/subagents/oracle/main.cpp
new file mode 100644 (file)
index 0000000..ae042fd
--- /dev/null
@@ -0,0 +1,439 @@
+/*\r
+** NetXMS subagent for Oracle monitoring\r
+** Copyright (C) 2009-2012 Raden Solutions\r
+**/\r
+\r
+#include "oracle_subagent.h"\r
+\r
+CONDITION g_shutdownCondition;\r
+MUTEX g_paramAccessMutex;\r
+int g_dbCount;\r
+DB_DRIVER g_driverHandle = NULL;\r
+DatabaseInfo g_dbInfo[MAX_DATABASES];\r
+DatabaseData g_dbData[MAX_DATABASES];\r
+\r
+THREAD_RESULT THREAD_CALL queryThread(void *arg);\r
+\r
+DBParameterGroup g_paramGroup[] = {\r
+       {\r
+               700, _T("Oracle.Sessions."),\r
+               _T("select ") DB_NULLARG_MAGIC _T(" ValueName, count(*) Count from v$session"),\r
+               2, { NULL }, 0\r
+       },\r
+       {\r
+               700, _T("Oracle.Cursors."),\r
+               _T("select ") DB_NULLARG_MAGIC _T(" ValueName, sum(a.value) Count from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic#  and s.sid=a.sid and b.name = 'opened cursors current'"),\r
+               2, { NULL }, 0\r
+       },\r
+       {\r
+               700, _T("Oracle.DBInfo."),  // E001_DbInstanceStat\r
+               _T("select ") DB_NULLARG_MAGIC _T(" ValueName, name Name, to_char(created) CreateDate, log_mode LogMode, open_mode OpenMode from v$database"),\r
+               5, { NULL }, 0\r
+       },\r
+       {\r
+               700, _T("Oracle.Instance."),\r
+               _T("select ") DB_NULLARG_MAGIC _T(" ValueName, version Version, status Status, archiver ArchiverStatus, shutdown_pending ShutdownPending from v$instance"),\r
+               5, { NULL }, 0\r
+       },\r
+       {\r
+               1000, _T("Oracle.TableSpaces."),\r
+               _T("select d.tablespace_name ValueName, d.status Status, d.contents Type, to_char(round(used_percent,2)) UsedPct from dba_tablespaces d, dba_tablespace_usage_metrics m where d.tablespace_name=m.tablespace_name"),\r
+               3, { NULL }, 0\r
+       },\r
+       {\r
+               700, _T("Oracle.Dual."),        // E077_DualExssRowStat\r
+               _T("select ") DB_NULLARG_MAGIC _T(" ValueName, decode(count(*),1,0,1) ExcessRows from dual"),\r
+               1, { NULL }, 0\r
+       },\r
+       {\r
+               700, _T("Oracle.Performance."), // E086_PhysReadsRate (HP OV gives per minute), but this query gives current count; Oracle E088_LogicReadsRate \r
+               _T("select ") DB_NULLARG_MAGIC _T(" ValueName, (select s.value PhysReads from v$sysstat s, v$statname n where n.name='physical reads' and n.statistic#=s.statistic#) PhysReads, ")\r
+               _T("(select s.value LogicReads from v$sysstat s, v$statname n where n.name='session logical reads' and n.statistic#=s.statistic#) LogicReads ")\r
+               _T("from DUAL "),\r
+               2, { NULL }, 0\r
+       },\r
+       {\r
+               700, _T("Oracle.CriticalStats."), // E007_TblSpcStatusCnt, E014_DataFStatusCnt, E016_SegmntExtendCnt, E067_RBSegmntStatCnt, E061_AutoArchvStatus, "Grid: Datafiles Need Media Recovery"\r
+               _T("select ") DB_NULLARG_MAGIC _T(" ValueName, (select count(*) TSOFF from DBA_TABLESPACES where status <> 'ONLINE') TSOffCount, ")\r
+               _T("(select count(*) DFOFF from V$DATAFILE where status not in ('ONLINE','SYSTEM')) DFOffCount, ")\r
+               _T("(select count(*) from DBA_SEGMENTS where max_extents = extents) FullSegmentsCount, ")\r
+               _T("(select count(*) from DBA_ROLLBACK_SEGS where status <> 'ONLINE') RBSegsNotOnlineCount, ")\r
+               _T("decode(sign(decode((select upper(log_mode) from v$database),'ARCHIVELOG',1,0)-")\r
+               _T("decode((select upper(value) from v$parameter where upper(name)='LOG_ARCHIVE_START'),'TRUE',1,0)),1, 1, 0) AutoArchivingOff, ")\r
+               _T("(SELECT count(file#) from v$datafile_header where recover ='YES') DatafilesNeedMediaRecovery, ")\r
+               _T("(SELECT count(*) FROM dba_jobs where NVL(failures,0) <> 0) FailedJobs ")\r
+               _T("from DUAL"),                \r
+               5, { NULL }, 0\r
+       },\r
+       0\r
+};\r
+\r
+//\r
+// Handler functions\r
+//\r
+\r
+LONG getParameters(const TCHAR *parameter, const TCHAR *argument, TCHAR *value)\r
+{\r
+       LONG ret = SYSINFO_RC_UNSUPPORTED;\r
+       TCHAR dbId[MAX_STR];\r
+       TCHAR entity[MAX_STR];\r
+\r
+       // Get id of the database requested\r
+       if (!AgentGetParameterArg(parameter, 1, dbId, MAX_STR))\r
+               return ret;\r
+       if (!AgentGetParameterArg(parameter, 2, entity, MAX_STR) || entity[0] == _T('\0'))\r
+               nx_strncpy(entity, DB_NULLARG_MAGIC, MAX_STR);\r
+\r
+       AgentWriteDebugLog(5, _T("%s: ***** got request for params: dbid='%s', param='%s'"), MYNAMESTR, dbId, parameter);\r
+\r
+       // Loop through databases and find an entry in g_dbInfo[] for this id\r
+       for (int i = 0; i <= g_dbCount; i++)\r
+       {\r
+               if (!_tcsnicmp(g_dbInfo[i].id, dbId, MAX_STR))  // found DB\r
+               {\r
+                       // Loop through parameter groups and check whose prefix matches the parameter requested\r
+                       for (int k = 0; g_paramGroup[k].prefix; k++)\r
+                       {\r
+                               if (!_tcsnicmp(g_paramGroup[k].prefix, parameter, _tcslen(g_paramGroup[k].prefix))) // found prefix\r
+                               {\r
+                                       MutexLock(g_dbInfo[i].accessMutex);\r
+                                       // Loop through the values\r
+                                       AgentWriteDebugLog(7, _T("%s: valuecount %d"), MYNAMESTR, g_paramGroup[k].valueCount[i]);\r
+                                       for (int j = 0; j < g_paramGroup[k].valueCount[i]; j++)\r
+                                       {\r
+                                               StringMap* map = (g_paramGroup[k].values[i])[j].attrs;\r
+                                               TCHAR* name = (g_paramGroup[k].values[i])[j].name;\r
+                                               if (!_tcsnicmp(name, entity, MAX_STR))  // found value which matches the parameters argument\r
+                                               {\r
+                                                       TCHAR key[MAX_STR];\r
+                                                       nx_strncpy(key, parameter + _tcslen(g_paramGroup[k].prefix), MAX_STR);\r
+                                                       TCHAR* place = _tcschr(key, _T('('));\r
+                                                       if (place != NULL)\r
+                                                       {\r
+                                                               *place = _T('\0');\r
+                                                               const TCHAR* dbval = map->get(key);\r
+                                                               ret_string(value, dbval);\r
+                                                               ret = SYSINFO_RC_SUCCESS;\r
+                                                       }\r
+                                                       break;\r
+                                               }\r
+                                       }\r
+                                       MutexUnlock(g_dbInfo[i].accessMutex);\r
+\r
+                                       break;\r
+                               }\r
+                       }\r
+                       break;\r
+               }\r
+       }\r
+\r
+       return ret;\r
+}\r
+\r
+\r
+//\r
+// Subagent initialization\r
+//\r
+\r
+static BOOL SubAgentInit(Config *config)\r
+{\r
+       BOOL result = TRUE;\r
+       static DatabaseInfo info;\r
+       int i;\r
+       static NX_CFG_TEMPLATE configTemplate[] = \r
+       {\r
+               { _T("Id"),                                     CT_STRING,      0, 0, MAX_STR, 0,       info.id },      \r
+               { _T("Name"),                           CT_STRING,      0, 0, MAX_STR, 0,       info.name },    \r
+               { _T("Server"),                         CT_STRING,      0, 0, MAX_STR, 0,       info.server },  \r
+               { _T("UserName"),                       CT_STRING,      0, 0, MAX_USERNAME, 0,  info.username },        \r
+               { _T("Password"),                       CT_STRING,      0, 0, MAX_PASSWORD, 0,  info.password },\r
+               { _T(""), CT_END_OF_LIST, 0, 0, 0, 0, NULL }\r
+       };\r
+\r
+       // Init db driver\r
+#ifdef _WIN32\r
+       g_driverHandle = DBLoadDriver(_T("oracle.ddr"), NULL, TRUE, NULL, NULL);\r
+#else\r
+       g_driverHandle = DBLoadDriver(LIBDIR "/libnxddr_oracle.so", NULL, TRUE, NULL, NULL);\r
+#endif\r
+       if (g_driverHandle == NULL)\r
+       {\r
+               AgentWriteLog(EVENTLOG_ERROR_TYPE, _T("%s: failed to load db driver"), MYNAMESTR);\r
+               result = FALSE;\r
+       }\r
+\r
+       if (result)\r
+       {\r
+               g_shutdownCondition = ConditionCreate(TRUE);\r
+       }\r
+\r
+       // Load configuration\r
+       for (g_dbCount = -1, i = 1; result && i <= MAX_DATABASES; i++)\r
+       {\r
+               TCHAR section[MAX_STR];\r
+               memset((void*)&info, 0, sizeof(info));\r
+               _sntprintf(section, MAX_STR, _T("oracle/databases/database#%d"), i);\r
+               if ((result = config->parseTemplate(section, configTemplate)) != TRUE)\r
+               {\r
+                       AgentWriteLog(EVENTLOG_ERROR_TYPE, _T("%s: error parsing configuration template"), MYNAMESTR);\r
+                       return FALSE;\r
+               }\r
+               if (info.name[0] != _T('\0'))\r
+                       memcpy((void*)&g_dbInfo[++g_dbCount], (void*)&info, sizeof(info));\r
+               else\r
+                       continue;\r
+               if (info.username[0] == '\0' || info.password[0] == '\0')\r
+               {\r
+                       AgentWriteLog(EVENTLOG_ERROR_TYPE, _T("%s: error getting username and/or password for "), MYNAMESTR);\r
+                       result = FALSE;\r
+               }\r
+               if (result && (g_dbInfo[g_dbCount].accessMutex = MutexCreate()) == NULL)\r
+               {\r
+                       AgentWriteLog(EVENTLOG_ERROR_TYPE, _T("%s: failed to create mutex (%d)"), MYNAMESTR, i);\r
+                       result = FALSE;\r
+               }\r
+       }\r
+\r
+       // Exit if no usable configuration found\r
+       if (result && g_dbCount < 0)\r
+       {\r
+               AgentWriteLog(EVENTLOG_ERROR_TYPE, _T("%s: no databases to monitor"), MYNAMESTR);\r
+               result = FALSE;\r
+       }\r
+\r
+       // Run query thread for each database configured\r
+       for (i = 0; result && i <= g_dbCount; i++)\r
+       {\r
+               g_dbInfo[i].queryThreadHandle = ThreadCreateEx(queryThread, 0, CAST_TO_POINTER(i, void *));\r
+       }\r
+\r
+       return result;\r
+}\r
+\r
+\r
+//\r
+// Shutdown handler\r
+//\r
+\r
+static void SubAgentShutdown(void)\r
+{\r
+       AgentWriteLog(EVENTLOG_INFORMATION_TYPE, _T("%s: shutting down"), MYNAMESTR);\r
+       ConditionSet(g_shutdownCondition);\r
+       for (int i = 0; i <= g_dbCount; i++)\r
+       {\r
+               ThreadJoin(g_dbInfo[i].queryThreadHandle);\r
+               MutexDestroy(g_dbInfo[i].accessMutex);\r
+       }\r
+       ConditionDestroy(g_shutdownCondition);\r
+}\r
+\r
+//\r
+// Figure out Oracle DBMS version\r
+//\r
+\r
+static int getOracleVersion(DB_HANDLE handle) \r
+{\r
+       TCHAR versionString[32];\r
+\r
+       DB_RESULT result = DBSelect(handle,_T("select version from v$instance"));\r
+       if (result == NULL)     \r
+       {\r
+               AgentWriteLog(EVENTLOG_WARNING_TYPE, _T("%s: query from v$instance failed"));\r
+               return 700;             // assume Oracle 7.0 by default\r
+       }\r
+\r
+       DBGetField(result, 0, 0, versionString, 32);\r
+       int major = 0, minor = 0;\r
+       _stscanf(versionString, _T("%d.%d"), &major, &minor);\r
+       DBFreeResult(result);\r
+\r
+       return major * 100 + minor * 10;\r
+}\r
+\r
+//\r
+// Thread for SQL queries\r
+//\r
+\r
+THREAD_RESULT THREAD_CALL queryThread(void* arg)\r
+{\r
+       int dbIndex = CAST_FROM_POINTER(arg, int);\r
+       DatabaseInfo& db = g_dbInfo[dbIndex];\r
+       const DWORD pollInterval = 60 * 1000L;  // 1 minute\r
+       int waitTimeout;\r
+       QWORD startTimeMs;\r
+       TCHAR errorText[DBDRV_MAX_ERROR_TEXT];\r
+\r
+       while (true)\r
+       {\r
+               db.handle = DBConnect(g_driverHandle, db.name, db.server, db.username, db.password, NULL, errorText);\r
+               if (db.handle != NULL)\r
+               {\r
+                       AgentWriteLog(EVENTLOG_INFORMATION_TYPE, _T("%s: connected to DB"), MYNAMESTR);\r
+                       db.connected = true;\r
+                       db.version = getOracleVersion(db.handle);\r
+               }\r
+\r
+               while (db.connected)\r
+               {\r
+                       startTimeMs = GetCurrentTimeMs();\r
+\r
+                       // Do queries\r
+                       if (!(db.connected = getParametersFromDB(dbIndex)))\r
+                       {\r
+                               break;\r
+                       }\r
+\r
+                       waitTimeout = pollInterval - DWORD(GetCurrentTimeMs() - startTimeMs);\r
+                       if (ConditionWait(g_shutdownCondition, waitTimeout < 0 ? 1 : waitTimeout))\r
+                               goto finish;\r
+               }\r
+\r
+               // Try to reconnect every 30 secs\r
+               if (ConditionWait(g_shutdownCondition, DWORD(30 * 1000)))\r
+                       break;\r
+       }\r
+\r
+finish:\r
+       if (db.connected && db.handle != NULL)\r
+       {\r
+               DBDisconnect(db.handle);\r
+       }\r
+\r
+       return THREAD_OK;\r
+}\r
+\r
+\r
+bool getParametersFromDB( int dbIndex )\r
+{\r
+       bool ret = true;\r
+       DatabaseInfo& info = g_dbInfo[dbIndex];\r
+\r
+       if (!info.connected)\r
+       {\r
+               return false;\r
+       }\r
+\r
+       MutexLock(info.accessMutex);\r
+\r
+       for (int i = 0; g_paramGroup[i].prefix; i++)\r
+       {\r
+               AgentWriteDebugLog(7, _T("%s: got entry for '%s'"), MYNAMESTR, g_paramGroup[i].prefix);\r
+\r
+               if (g_paramGroup[i].version > info.version)     // this parameter group is not supported for this DB\r
+                       continue; \r
+\r
+               // Release previously allocated array of values for this group\r
+               for (int j = 0; j < g_paramGroup[i].valueCount[dbIndex]; j++)\r
+                       delete (g_paramGroup[i].values[dbIndex])[j].attrs;\r
+               safe_free((void*)g_paramGroup[i].values[dbIndex]);\r
+\r
+               DB_RESULT queryResult = DBSelect(info.handle, g_paramGroup[i].query);\r
+               if (queryResult == NULL)\r
+               {\r
+                       ret = false;\r
+                       break;\r
+               }\r
+\r
+               int rows = DBGetNumRows(queryResult);\r
+               g_paramGroup[i].values[dbIndex] = (DBParameter*)malloc(sizeof(DBParameter) * rows);\r
+               g_paramGroup[i].valueCount[dbIndex]             = rows;\r
+               for (int j = 0; j < rows; j++)\r
+               {\r
+                       TCHAR colname[MAX_STR];\r
+                       DBGetField(queryResult, j, 0, (g_paramGroup[i].values[dbIndex])[j].name, MAX_STR);\r
+                       (g_paramGroup[i].values[dbIndex])[j].attrs = new StringMap;\r
+                       for (int k = 1; DBGetColumnName(queryResult, k, colname, MAX_STR); k++) \r
+                       {\r
+                               TCHAR colval[MAX_STR];\r
+                               DBGetField(queryResult, j, k, colval, MAX_STR);\r
+                               // AgentWriteDebugLog(9, _T("%s: getParamsFromDB: colname '%s' ::: colval '%s'"), MYNAMESTR, colname, colval);\r
+                               (g_paramGroup[i].values[dbIndex])[j].attrs->set(colname, colval);\r
+                       }\r
+               }\r
+\r
+               DBFreeResult(queryResult);\r
+       }\r
+\r
+       MutexUnlock(info.accessMutex);\r
+\r
+       return ret;\r
+}\r
+\r
+//\r
+// Subagent information\r
+//\r
+\r
+\r
+static NETXMS_SUBAGENT_PARAM m_parameters[] =\r
+{\r
+       { _T("Oracle.Sessions.Count(*)"), getParameters, "X", DCI_DT_INT, _T("Oracle/Sessions: Number of sessions opened") },\r
+       { _T("Oracle.Cursors.Count(*)"), getParameters, "X", DCI_DT_INT, _T("Oracle/Cursors: Current number of opened cursors systemwide") },\r
+       { _T("Oracle.DBInfo.Name(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Info: Database name") },\r
+       { _T("Oracle.DBInfo.CreateDate(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Info: Database creation date") },\r
+       { _T("Oracle.DBInfo.LogMode(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Info: Database log mode") },\r
+       { _T("Oracle.DBInfo.OpenMode(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Info: Database open mode") },\r
+       { _T("Oracle.TableSpaces.Status(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Tablespaces: Status") },\r
+       { _T("Oracle.TableSpaces.Type(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Tablespaces: Type") },\r
+       { _T("Oracle.TableSpaces.UsedPct(*)"), getParameters, "X", DCI_DT_INT, _T("Oracle/Tablespaces: Percentage used") },\r
+       { _T("Oracle.Instance.Version(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Instance: DBMS Version") },\r
+       { _T("Oracle.Instance.Status(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Instance: Status") },\r
+       { _T("Oracle.Instance.ArchiverStatus(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Instance: Archiver status") },\r
+       { _T("Oracle.Instance.ShutdownPending(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/Instance: Is shutdown pending") },\r
+       { _T("Oracle.CriticalStats.TSOffCount(*)"), getParameters, "X", DCI_DT_INT, _T("Oracle/CriticalStats: Number of offline tablespaces") },\r
+       { _T("Oracle.CriticalStats.DFOffCount(*)"), getParameters, "X", DCI_DT_INT, _T("Oracle/CriticalStats: Number of offline datafiles") },\r
+       { _T("Oracle.CriticalStats.FullSegmentsCount(*)"), getParameters, "X", DCI_DT_INT64, _T("Oracle/CriticalStats: Number of segments that cannot extend") },\r
+       { _T("Oracle.CriticalStats.RBSegsNotOnlineCount(*)"), getParameters, "X", DCI_DT_INT64, _T("Oracle/CriticalStats: Number of rollback segments not online") },\r
+       { _T("Oracle.CriticalStats.AutoArchivingOff(*)"), getParameters, "X", DCI_DT_STRING, _T("Oracle/CriticalStats: Archive logs enabled but auto archiving off ") },\r
+       { _T("Oracle.CriticalStats.DatafilesNeedMediaRecovery(*)"), getParameters, "X", DCI_DT_INT64, _T("Oracle/CriticalStats: Number of datafiles that need media recovery") },\r
+       { _T("Oracle.CriticalStats.FailedJobs(*)"), getParameters, "X", DCI_DT_INT64, _T("Oracle/CriticalStats: Number of failed jobs") },\r
+       { _T("Oracle.Dual.ExcessRows(*)"), getParameters, "X", DCI_DT_INT64, _T("Oracle/Dual: Excessive rows") },\r
+       { _T("Oracle.Performance.PhysReads(*)"),  getParameters, "X", DCI_DT_INT64, _T("Oracle/Performance: Number of physical reads") },\r
+       { _T("Oracle.Performance.LogicReads(*)"), getParameters, "X", DCI_DT_INT64, _T("Oracle/Performance: Number of logical reads") }\r
+};\r
+\r
+/*\r
+static NETXMS_SUBAGENT_ENUM m_enums[] =\r
+{\r
+};\r
+*/\r
+\r
+static NETXMS_SUBAGENT_INFO m_info =\r
+{\r
+       NETXMS_SUBAGENT_INFO_MAGIC,\r
+       _T("ORACLE"), NETXMS_VERSION_STRING,\r
+       SubAgentInit, SubAgentShutdown, NULL,\r
+       sizeof(m_parameters) / sizeof(NETXMS_SUBAGENT_PARAM), m_parameters,\r
+       0,      NULL,\r
+       /*sizeof(m_parameters) / sizeof(NETXMS_SUBAGENT_PARAM),\r
+       m_parameters,\r
+       sizeof(m_enums) / sizeof(NETXMS_SUBAGENT_ENUM),\r
+       m_enums,*/\r
+       0,      NULL\r
+};\r
+\r
+\r
+//\r
+// Entry point for NetXMS agent\r
+//\r
+\r
+DECLARE_SUBAGENT_ENTRY_POINT(ORACLE)\r
+{\r
+       *ppInfo = &m_info;\r
+       return TRUE;\r
+}\r
+\r
+\r
+//\r
+// DLL entry point\r
+//\r
+\r
+#ifdef _WIN32\r
+\r
+BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)\r
+{\r
+       if (dwReason == DLL_PROCESS_ATTACH)\r
+               DisableThreadLibraryCalls(hInstance);\r
+       return TRUE;\r
+}\r
+\r
+#endif\r
diff --git a/src/agent/subagents/oracle/oracle.vcproj b/src/agent/subagents/oracle/oracle.vcproj
new file mode 100644 (file)
index 0000000..c71a0d8
--- /dev/null
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="windows-1251"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="oracle"\r
+       ProjectGUID="{90B762AB-B7BA-42D6-9819-C687AB3F59D0}"\r
+       RootNamespace="oracle"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\..\..\include"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;ORACLE_EXPORTS"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="false"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName).nsm"\r
+                               LinkIncremental="2"\r
+                               AdditionalLibraryDirectories="..\..\..\..\..\..\$(ConfigurationName);..\..\..\..\..\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="2"\r
+                       CharacterSet="2"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="..\..\..\..\include"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;ORACLE_EXPORTS"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="false"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               OutputFile="$(OutDir)\$(ProjectName).nsm"\r
+                               LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="..\..\..\..\..\..\$(ConfigurationName);..\..\..\..\..\$(ConfigurationName)"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="2"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\main.cpp"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\oracle_subagent.h"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r
diff --git a/src/agent/subagents/oracle/oracle_subagent.h b/src/agent/subagents/oracle/oracle_subagent.h
new file mode 100644 (file)
index 0000000..a1dc6c1
--- /dev/null
@@ -0,0 +1,76 @@
+/*\r
+** NetXMS subagent for Oracle monitoring\r
+** Copyright (C) 2009-2012 Raden Solutions\r
+**/\r
+\r
+#ifndef _oracle_subagent_h_\r
+#define _oracle_subagent_h_\r
+\r
+#include <nms_common.h>\r
+#include <nms_util.h>\r
+#include <nms_agent.h>\r
+#include <nxdbapi.h>\r
+\r
+//\r
+// Misc defines\r
+//\r
+\r
+#define MAX_STR                                (255)\r
+#define MAX_QUERY                      (8192)\r
+#define MYNAMESTR                      _T("oracle")\r
+#define DB_NULLARG_MAGIC       _T("8201")\r
+\r
+// Oracle-specific\r
+#define MAX_USERNAME   (30+1)\r
+#define MAX_PASSWORD   (30+1)\r
+\r
+#define MAX_DATABASES  (5)\r
+\r
+\r
+//\r
+// DB-related structs\r
+//\r
+\r
+// struct for the databases configured within the subagent\r
+typedef struct \r
+{\r
+       TCHAR id[MAX_STR];                              // this is how client addresses the database\r
+       TCHAR name[MAX_STR];\r
+       TCHAR server[MAX_STR];\r
+       char username[MAX_USERNAME];\r
+       char password[MAX_PASSWORD];\r
+       THREAD queryThreadHandle;\r
+       DB_HANDLE handle;\r
+       bool connected;\r
+       int version;                                    // in xxx format\r
+       MUTEX accessMutex;\r
+} DatabaseInfo;\r
+\r
+typedef struct {\r
+       TCHAR name[MAX_STR];\r
+       StringMap* attrs;\r
+} DBParameter;\r
+\r
+typedef struct {\r
+       int version;                                            // minimum database version in xxx format for this query\r
+       TCHAR* prefix;                                  // parameter prefix, e.g. "Oracle.Tablespaces."\r
+       TCHAR* query;                                           // the query\r
+       int       queryColumns;                                         // number of columns returned by query\r
+       DBParameter* values[MAX_DATABASES];             // list of values\r
+       int valueCount[MAX_DATABASES];\r
+} DBParameterGroup;\r
+\r
+// struct for stat data obtained from the database\r
+typedef struct\r
+{\r
+       DWORD openCursors;\r
+       DWORD sessions;\r
+} DatabaseData;\r
+\r
+//\r
+// Functions\r
+//\r
+\r
+bool getParametersFromDB(int dbIndex);\r
+\r
+#endif   /* _oracle_subagent_h_ */\r