{"id":199518,"date":"2013-11-01T13:37:03","date_gmt":"2013-11-01T09:37:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=199518"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=199518","title":{"rendered":"<span class=\"post_title\">\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432 Oracle \u0434\u0430\u043d\u043d\u044b\u0435 SNMP-\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/196828\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u0443\u044e \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0411\u0414 Oracle. \u0421\u0443\u0434\u044f \u043f\u043e \u043e\u0431\u0438\u043b\u0438\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0432\u0448\u0438\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432, \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u0436\u0438\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441, \u043d\u043e, \u0441\u0443\u0434\u044f \u043f\u043e \u0442\u0435\u043c-\u0436\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c (\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0432\u0448\u0435\u0439 <a href=\"http:\/\/habrahabr.ru\/post\/197718\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL) \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043d\u044f\u0442\u0430 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u044f \u043d\u0430 \u0442\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u0432\u0438\u043d\u043e\u0432\u0430\u0442 \u0432 \u044d\u0442\u043e\u043c \u044f \u0441\u0430\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u043e\u0442\u043e\u0440\u0432\u0430\u043b\u0441\u044f \u043e\u0442 \u0436\u0438\u0437\u043d\u0438 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u0431\u044b\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u043c (\u044d\u0442\u043e, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u0447\u0438\u043d \u0432\u044b\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f).<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u044f \u0445\u043e\u0447\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 SNMP-\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0443\u0434\u0435\u043b\u044f\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0422\u0430\u043a\u0436\u0435, \u044f \u0443\u0434\u0435\u043b\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u0435\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435, \u044f \u0445\u043e\u0447\u0443 \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c <a href=\"http:\/\/habrahabr.ru\/users\/denkrep\/\" class=\"user_link\">DenKrep<\/a>, <a href=\"http:\/\/habrahabr.ru\/users\/xlix123\/\" class=\"user_link\">xlix123<\/a>, <a href=\"http:\/\/habrahabr.ru\/users\/zhekappp\/\" class=\"user_link\">zhekappp<\/a> \u0438 \u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u043c \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0430\u043c, \u0434\u0430\u0432\u0448\u0438\u043c \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0414\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u044d\u0442\u043e?<\/h4>\n<p>  \u0425\u043e\u0447\u0443 \u0441\u0440\u0430\u0437\u0443 \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u043d\u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a\u0430\u043a:<\/p>\n<ol>\n<li>\u0421 \u043a\u0430\u043a\u043e\u0439 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Oracle?<\/li>\n<li>\u0427\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 Oracle \u0438\u043b\u0438 PostgreSQL?<\/li>\n<li>\u041d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0411\u0414?<\/li>\n<\/ol>\n<p>  \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u0438 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0438\u043c, \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 (\u0432\u043e \u0432\u0441\u044f\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432 \u043e\u0442\u0440\u044b\u0432\u0435 \u043e\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438). \u042f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0441\u043e\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e \u043d\u0438 \u0441\u043b\u043e\u0432\u0430 \u043e \u0442\u043e\u043c, \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u00ab\u0436\u0435\u043b\u0435\u0437\u0435\u00bb \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 Oracle. \u041d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u044d\u0442\u043e \u043d\u0435 \u0432\u0430\u0436\u043d\u043e. \u041d\u043e \u0447\u0442\u043e \u0436\u0435 \u0442\u043e\u0433\u0434\u0430 \u0432\u0430\u0436\u043d\u043e?<\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 SNMP-\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0439, \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b:<\/p>\n<ol>\n<li>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 (\u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u043f\u043e\u0447\u0435\u043c\u0443, \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435)<\/li>\n<li>\u0414\u0430\u043d\u043d\u044b\u0435 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043d\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0411\u0414 (\u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0435\u0434\u0438\u043d\u0443\u044e \u0411\u0414)<\/li>\n<li>\u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0438 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0447\u0442\u043e\u0431\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0440\u0435\u0430\u043a\u0446\u0438\u0438 \u043d\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438)<\/li>\n<li>\u0414\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u0435\u0440\u044f \u0447\u0430\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u0430\u0432\u0430\u0440\u0438\u044f, \u043c\u044b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c \u044d\u0442\u043e \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0446\u0438\u043a\u043b\u0435 \u043e\u043f\u0440\u043e\u0441\u0430, \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043f\u043e\u0442\u0435\u0440\u0435 \u0447\u0430\u0441\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e)<\/li>\n<li>\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0433\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e<\/li>\n<\/ol>\n<p>  \u042f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0446\u0435\u043b\u044c\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0438\u0441\u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<h4>\u041f\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0434\u0430\u0447\u0438<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f SNMP? \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0432 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0441 OID, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f GET-\u0437\u0430\u043f\u0440\u043e\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u0432 OID = 1.3.6.1.2.1.1.3.0, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0436\u043d\u043e\u0439 \u0434\u043b\u044f \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043a\u0430\u043a <a href=\"http:\/\/tools.cisco.com\/Support\/SNMP\/do\/BrowseOID.do?local=en&amp;translate=Translate&amp;objectInput=sysUpTime\">sysUpTime<\/a>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e SNMP, \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435. \u042d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438 \u0441\u0442\u0440\u043e\u043a\u0438.<\/p>\n<p>  \u041d\u043e SNMP \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043e\u043c \u043a \u043d\u0430\u0431\u043e\u0440\u0443 \u0441\u043a\u0430\u043b\u044f\u0440\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0412 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u043c. \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c OID \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0446\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430. \u042d\u0442\u043e\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u0430.<\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043f\u0440\u043e\u0441\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 (1.3.6.1.2.1.2), \u0432 \u0440\u043e\u043b\u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043d\u043e, \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c IP-\u0430\u0434\u0440\u0435c \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c\u043e\u0435 <a href=\"http:\/\/www.ietf.org\/rfc\/rfc1157.txt\">\u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439<\/a>. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0438\u043d\u0434\u0435\u043a\u0441 \u043e\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0439 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f GET-\u0437\u0430\u043f\u0440\u043e\u0441. <\/p>\n<p>  \u0414\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c GETNEXT-\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0435 OID \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432 \u043b\u0435\u043a\u0441\u0438\u043a\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0437\u0430 OID-\u043e\u043c, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435. \u0422\u0430\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u044f OID-\u0441\u0442\u043e\u043b\u0431\u0446\u0430, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u0431\u043e\u0439 \u043f\u0440\u0435\u0444\u0438\u043a\u0441 OID-\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0435\u0439 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c OID, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u043f\u043e\u043a\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e. <\/p>\n<p>  \u0412 \u0446\u0435\u043b\u044f\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 (\u043f\u0443\u0442\u0435\u043c \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043e\u0442\u0441\u044b\u043b\u0430\u0435\u043c\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432), \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c OID-\u044b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043e\u0434\u043d\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u043e 2 \u0432\u0435\u0440\u0441\u0438\u0438 SNMP \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f BULK-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041e\u0434\u0438\u043d BULK-\u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430\u043c\u0435\u043d\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0445 \u0434\u0440\u0443\u0433 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u043c GETNEXT-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0437\u0430 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 (\u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435 BULK). \u041e\u0431\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u043e\u043c \u044f \u0443\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/196308\/\">\u0440\u0430\u043d\u0435\u0435<\/a>.<\/p>\n<p>  \u041f\u043e\u0432\u0442\u043e\u0440\u044f\u044e \u044f \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043d\u0435 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b! \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u0434\u0435-\u0442\u043e \u0432 \u0411\u0414) \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0441 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u043c OID-\u043e\u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e. \u0421\u0442\u0440\u043e\u043a\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0438\u043d\u0434\u0435\u043a\u0441 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u0441\u044f! \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0437\u0430\u0434\u0430\u0447 \u0441\u0438\u0441\u0442\u0435\u043c\u044b SNMP-\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446.<\/p>\n<p>  \u041a\u0430\u043a \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u0411\u0414? \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/963\/e2f\/ab2\/963e2fab2084f880bd59f0de127703ae.png\" alt=\"image\"\/><\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043a \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c (ae_resource). \u0420\u0435\u0441\u0443\u0440\u0441\u044b, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0431\u0443\u0434\u0443\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0432 \u0434\u0432\u0443\u0445\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u0443\u044e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044e. \u041d\u0430 \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0440\u0435\u0441\u0443\u0440\u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430. \u0421 \u043d\u0438\u043c, \u043f\u043e owner_id, \u0431\u0443\u0434\u0443\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b (\u0442\u043e\u0442 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0430 \u043d\u0435 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435, \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c type_id \u0438\u0437 \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0430 ae_resource_type). \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f device_id, \u0443 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u0438 \u0432\u0441\u0435\u0445 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0442\u044c \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b ae_resource \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044f start_date \u0438 end_date. \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u2014 \u043d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430. \u041c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044f \u0438\u043c \u0434\u0430\u0442\u0443 \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0432 start_date \u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f end_date. \u0414\u043b\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u0435 name (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 ifDescr \u2014 1.3.6.1.2.1.2.2.1.2). \u0418\u043d\u0434\u0435\u043a\u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0432 \u043f\u043e\u043b\u0435 res_num (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0440\u0435\u0441\u0443\u0440\u0441 \u0441\u043e \u0441\u0442\u0430\u0440\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043a\u0440\u044b\u0442, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e, \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441).<\/p>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u0432 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u2014 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c (\u0445\u043e\u0442\u044f \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0437\u0430\u043d\u044f\u043b\u0430-\u0431\u044b \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438). \u041d\u043e \u0443\u0436 \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0447\u0435\u043c\u0443-\u0431\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u043b\u044c\u0437\u0443? \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0445 \u0432 \u0411\u0414 (\u0447\u0442\u043e \u0431\u043b\u0430\u0433\u043e\u0442\u0432\u043e\u0440\u043d\u043e \u043e\u0442\u0440\u0430\u0437\u0438\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0430 \u0435\u0435 \u043e\u0431\u044a\u0435\u043c\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438), \u0435\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041d\u043e \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438? \u0412 \u044d\u0442\u043e\u043c \u043d\u0430\u043c \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/576\/b68\/cde\/576b68cde0cefb6c074a6e0bee13787f.png\" alt=\"image\"\/><\/p>\n<p>  \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u043e\u043c\u0435\u043d\u043e\u043c (ae_domain). \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 (regexp) \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043b\u0438\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041f\u0435\u0440\u0435\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435\u043c \u0432 \u0411\u0414, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043e \u043a \u043a\u0430\u043a\u043e\u043c\u0443-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0434\u043e\u043c\u0435\u043d\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0432 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443). \u041f\u0440\u0430\u0432\u0438\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c\u0441\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0435\u0439 ae_domain_convert.<\/p>\n<p>  \u041a\u0430\u043a\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438? \u042d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0434\u043e\u043c\u0435\u043d\u0430. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0441\u0447\u0438\u0442\u0430\u0442\u044c\u0441\u044f \u043b\u044e\u0431\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c, \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0411\u0414 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0431\u0443\u0434\u0435\u0442). \u0414\u043b\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b \u0437\u0430\u0434\u0430\u0442\u044c \u043e\u0441\u043e\u0431\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 sysUpTime (\u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f) \u2014 \u043c\u043e\u043d\u043e\u0442\u043e\u043d\u043d\u043e \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u044e\u0449\u0430\u044f \u0447\u0438\u0441\u043b\u043e\u0432\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0430. \u0423\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0445\u043e\u0441\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f. \u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u043e\u0441\u043e\u0431\u043e\u0439 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432 \u0411\u0414 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0435\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438), \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0432 \u0411\u0414 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435, \u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 (\u0442\u043e \u0435\u0441\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u044b\u0439 uptime).<\/p>\n<p>  \u0412 ae_threshold \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u043e\u0433\u0438, \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 (\u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438) \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0432\u0435\u0434\u0435\u043c \u043e\u0441\u043e\u0431\u044b\u0439 \u0442\u0438\u043f \u043f\u043e\u0440\u043e\u0433\u0430 (delta), \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c. \u0417\u0430\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0440\u043e\u0433\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u043e\u0432 \u0442\u0440\u0430\u0444\u0438\u043a\u0430, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a ifInOctets (1.3.6.1.2.1.2.2.1.10).<\/p>\n<p>  \u0426\u0435\u043b\u0438\u043a\u043e\u043c, \u0441\u0445\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0445\u0435\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/408\/add\/251\/408add251b7ae333504c5a0f8f550678.png\" alt=\"image\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043a\u0440\u0438\u043f\u0442<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">create sequence ae_platform_model_seq start with 100;  create table ae_platform_model (   id             number                              not null,   name           varchar2(30)                        not null,   description    varchar2(300) );  comment on table ae_platform_model is '\u041c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f';  create unique index ae_platform_model_pk on ae_platform_model(id);  alter table ae_platform_model add   constraint pk_ae_platform_model primary key(id);  create sequence ae_device_seq cache 100;  create table ae_device (   id             number                              not null,   model_id       number                              not null,   start_date     date        default sysdate         not null,   end_date       date        default null   );  comment on table ae_device is '\u041e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435';  create unique index ae_device_pk on ae_device(id);  create index ae_device_fk on ae_device(device_id);  create index ae_device_model_fk on ae_device(model_id);  create index ae_device_zone_fk on ae_device(zone_id);  alter table ae_device add   constraint pk_ae_device primary key(id);  alter table ae_device add   constraint fk_ae_device_model foreign key (model_id)      references ae_platform_model(id);  create sequence ae_resource_class_seq start with 100;  create table ae_resource_class (   id             number                              not null,   owner_id       number,   is_logical     number(1)                           not null,   name           varchar2(30)                        not null,   description    varchar2(300) );  comment on table ae_resource_class is '\u041a\u043b\u0430\u0441\u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430';  comment on column ae_resource_class.is_logical is '\u041f\u0440\u0438\u0437\u043d\u0430\u043a \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430';  create unique index ae_resource_class_pk on ae_resource_class(id);  create index ae_resource_class_fk on ae_resource_class(owner_id);  alter table ae_resource_class   add constraint ae_resource_class_ck check (is_logical in (0, 1));  alter table ae_resource_class add   constraint pk_ae_resource_class primary key(id);  create sequence ae_resource_type_seq start with 100;  create table ae_resource_type (   id             number                              not null,   owner_id       number,   parent_id      number,   class_id       number                              not null,   name           varchar2(30)                        not null,   description    varchar2(300) );  comment on table ae_resource_type is '\u0422\u0438\u043f \u0440\u0435\u0441\u0443\u0440\u0441\u0430';  create unique index ae_resource_type_pk on ae_resource_type(id);  create index ae_resource_type_owner_fk on ae_resource_type(owner_id);  create index ae_resource_type_parent_fk on ae_resource_type(parent_id);  alter table ae_resource_type add   constraint pk_ae_resource_type primary key(id);  alter table ae_resource_type add   constraint fk_ae_resource_type foreign key (class_id)      references ae_resource_class(id);  alter table ae_resource_type add   constraint fk_ae_resource_type_owner foreign key (owner_id)      references ae_resource_type(id);  alter table ae_resource_type add   constraint fk_ae_resource_type_parent foreign key (parent_id)      references ae_resource_type(id);  create sequence ae_resource_seq cache 100;  create table ae_resource (   id             number                              not null,   device_id      number                              not null,   owner_id       number           default null,               type_id        number                              not null,   name           varchar2(1000)                      not null,   res_num        varchar2(300)                       not null,   res_id         number,   tmp_id         number,   start_date     date        default sysdate         not null,   end_date       date        default null   );  create unique index ae_resource_pk on ae_resource(id);  create index ae_res_dev_fk on ae_resource(device_id);  create index ae_res_dev_type_fk on ae_resource(type_id);  create index ae_res_dev_res_fk on ae_resource(res_id);  create index ae_res_dev_res_tmp_fk on ae_resource(tmp_id);  alter table ae_resource add   constraint pk_ae_resource primary key(id);  alter table ae_resource add   constraint fk_ae_res_device foreign key (device_id)      references ae_device(id);  alter table ae_resource add   constraint fk_ae_res_dev_parent foreign key (owner_id)      references ae_resource(id);  alter table ae_resource add   constraint fk_ae_res_dev_type foreign key (type_id)      references ae_resource_type(id);  create table ae_policy_type (   id                 number                           not null,   name               varchar2(30)                     not null,   description        varchar2(100) );  comment on table ae_policy_type is '\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c';  create unique index ae_policy_type_pk on ae_policy_type(id);  create unique index ae_policy_type_uk on ae_policy_type(name);  alter table ae_policy_type add   constraint pk_ae_policy_type primary key(id);  create table ae_state_policy (   id                 number                           not null,   type_id            number                           not null,   name               varchar2(30)                     not null,   description        varchar2(100) );  comment on table ae_state_policy is '\u0421\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c';  create unique index ae_state_policy_pk on ae_state_policy(id);  create index ae_state_policy_fk on ae_state_policy(type_id);  alter table ae_state_policy add   constraint pk_ae_state_policy primary key(id);  alter table ae_state_policy add   constraint fk_ae_state_policy foreign key (type_id)      references ae_policy_type(id);  create table ae_threshold_type (   id             number                              not null,   name           varchar2(30)                        not null,   description    varchar2(300) );  create unique index ae_threshold_type_pk on ae_threshold_type(id);  alter table ae_threshold_type add   constraint pk_ae_threshold_type primary key(id);  create sequence ae_threshold_seq start with 100;  create table ae_threshold (   id             number                              not null,   type_id        number                              not null,   policy_id      number                              not null,   value          varchar2(100)                       not null );  create unique index ae_threshold_pk on ae_threshold(id);  create index ae_threshold_direction_fk on ae_threshold(type_id);  create index ae_threshold_profile_fk on ae_threshold(policy_id);  alter table ae_threshold add   constraint pk_ae_threshold primary key(id);  alter table ae_threshold add   constraint fk_ae_threshold_type foreign key (type_id)      references ae_threshold_type(id);  alter table ae_threshold add   constraint fk_ae_threshold_policy foreign key (policy_id)      references ae_state_policy(id);  create sequence ae_domain_convert_seq start with 100;  create table ae_domain (   id             number                              not null,   policy_id      number            default null,   regexp         varchar2(100),   is_case_sens   number(1)         default 0         not null,   description    varchar2(100) );  create unique index ae_domain_pk on ae_domain(id);  create index ae_domain_fk on ae_domain(policy_id);  alter table ae_domain   add constraint ae_domain_ck check (is_case_sens in (0, 1));  alter table ae_domain add   constraint pk_ae_domain primary key(id);  alter table ae_domain add   constraint fk_ae_domain foreign key (policy_id)      references ae_state_policy(id);  create sequence ae_parameter_seq start with 1000;  create table ae_parameter (   id             number                              not null,   domain_id      number                              not null,   parent_id      number,   name           varchar2(30)                        not null,     description    varchar2(100) );  create unique index ae_parameter_pk on ae_parameter(id);  create unique index ae_parameter_uk on ae_parameter(name);  create index ae_parameter_domain_fk on ae_parameter(domain_id);  create index ae_parameter_parent_fk on ae_parameter(parent_id);  alter table ae_parameter add   constraint pk_ae_parameter primary key(id);  alter table ae_parameter add   constraint fk_ae_parameter_domain foreign key (domain_id)      references ae_domain(id);  alter table ae_parameter add   constraint fk_ae_parameter foreign key (parent_id)      references ae_parameter(id);  create sequence ae_state_seq cache 100;  create table ae_state (   id             number                              not null,   res_id         number                              not null,   param_id       number                              not null,   value          varchar2(300),   datetime       timestamp default current_timestamp not null );  comment on table ae_state is '\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430';  comment on column ae_state.datetime is '\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f';  create unique index ae_state_pk on ae_state(id);  create index ae_state_res_fk on ae_state(res_id);  create index ae_state_param_fk on ae_state(param_id);  alter table ae_state add   constraint pk_ae_state primary key(id);  alter table ae_state add   constraint fk_ae_state_res foreign key (res_id)      references ae_resource(id);  alter table ae_state add   constraint fk_ae_state_param foreign key (param_id)      references ae_parameter(id);  create sequence ae_state_log_seq cache 100;  create table ae_state_log (   id             number                              not null,   res_id         number                              not null,   param_id       number                              not null,   value          varchar2(300),   datetime       timestamp default current_timestamp not null ) pctfree 0   partition by range (datetime) ( partition ae_state_log_p1 values less than (maxvalue) );    comment on table ae_state_log is '\u0425\u0440\u043e\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430';  create unique index ae_state_log_pk on ae_state_log(datetime, id) local;  alter table ae_state_log add   constraint pk_ae_state_log primary key(datetime, id);  create sequence ae_profile_type_seq;  create table ae_profile_type (   id             number                              not null,   name           varchar2(30)                        not null,   description    varchar2(100) );  create unique index ae_profile_type_pk on ae_profile_type(id);  create unique index ae_profile_type_uk on ae_profile_type(name);  alter table ae_profile_type add   constraint pk_ae_profile_type primary key(id);  create sequence ae_profile_seq;  create table ae_profile (   id             number                              not null,   type_id        number                              not null,   is_default     number(1)         default 0         not null,   model_id       number                              not null,   script_id      number            default null,   name           varchar2(30)                        not null,   description    varchar2(100) );  create unique index ae_profile_pk on ae_profile(id);  create index ae_profile_type_fk on ae_profile(type_id);  create index ae_profile_model_fk on ae_profile(model_id);  create index ae_profile_script_fk on ae_profile(script_id);  alter table ae_profile   add constraint ae_profile_ck check (is_default in (0, 1));  alter table ae_profile add   constraint pk_ae_profile primary key(id);  alter table ae_profile add   constraint fk_ae_profile_type foreign key (type_id)      references ae_profile_type(id);  create sequence ae_profile_detail_seq;  create table ae_profile_detail (   id             number                              not null,   type_id        number                              not null,   profile_id     number                              not null,   model_id       number                              not null,   param_id       number                              not null );  create unique index ae_profile_detail_pk on ae_profile_detail(id);  create index ae_profile_detail_fk on ae_profile_detail(profile_id);  create index ae_profile_detail_type_fk on ae_profile_detail(type_id);  create index ae_profile_detail_model_fk on ae_profile_detail(model_id);  create index ae_profile_detail_param_fk on ae_profile_detail(param_id);  alter table ae_profile_detail add   constraint pk_ae_profile_detail primary key(id);  alter table ae_profile_detail add   constraint fk_ae_profile_detail foreign key (profile_id)      references ae_profile(id);  alter table ae_profile_detail add   constraint fk_ae_profile_detail_type foreign key (type_id)      references ae_resource_type(id);  alter table ae_profile_detail add   constraint fk_ae_profile_detail_model foreign key (model_id)      references ae_platform_model(id);  create global temporary table ae_state_tmp (   id             number                              not null,   device_id      number                              not null,   profile_id     number                              not null,   param_id       number                              not null,   num            varchar2(300),   value          varchar2(300),   datetime       timestamp default current_timestamp not null ) on commit delete rows;  create index ae_state_tmp_ix on ae_state_tmp(device_id, profile_id, param_id, num); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u043e\u0447\u043d\u0438\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">Insert into AE_POLICY_TYPE    (ID, NAME, DESCRIPTION)  Values    (1, 'default', NULL); Insert into AE_POLICY_TYPE    (ID, NAME, DESCRIPTION)  Values    (2, 'uptime', NULL); Insert into AE_POLICY_TYPE    (ID, NAME, DESCRIPTION)  Values    (3, 'threshold', NULL); COMMIT;  Insert into AE_STATE_POLICY    (ID, NAME, DESCRIPTION, TYPE_ID)  Values    (1, 'default', NULL, 1); Insert into AE_STATE_POLICY    (ID, NAME, DESCRIPTION, TYPE_ID)  Values    (2, 'uptime', NULL, 2); COMMIT;  Insert into AE_DOMAIN    (ID, REGEXP, IS_CASE_SENS, DESCRIPTION, POLICY_ID)  Values    (10, '((\\d+)\\D*,\\s*)?(\\d+):(\\d+):(\\d+)(\\.\\d+)?', 0, 'SNMP uptime', 1); Insert into AE_DOMAIN    (ID, REGEXP, IS_CASE_SENS, DESCRIPTION, POLICY_ID)  Values    (11, '\\d+', 0, 'SNMP \u0447\u0438\u0441\u043b\u043e', 1); Insert into AE_DOMAIN    (ID, REGEXP, IS_CASE_SENS, DESCRIPTION, POLICY_ID)  Values    (12, '([a-fA-F\\d])+', 0, 'SNMP \u0441\u0442\u0440\u043e\u043a\u0430', 1); Insert into AE_DOMAIN    (ID, REGEXP, IS_CASE_SENS, DESCRIPTION, POLICY_ID)  Values    (13, '.*', 0, 'SNMP \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430', 1); Insert into AE_DOMAIN    (ID, REGEXP, IS_CASE_SENS, DESCRIPTION, POLICY_ID)  Values    (14, '\\d+', 0, 'SNMP uptime (\u0447\u0438\u0441\u043b\u043e\u0432\u0430\u044f \u0444\u043e\u0440\u043c\u0430)', 2); COMMIT;  Insert into AE_PARAMETER    (ID, DOMAIN_ID, PARENT_ID, NAME, DESCRIPTION)  Values    (101, 14, NULL, 'uptime', 'SNMP Uptime'); Insert into AE_PARAMETER    (ID, DOMAIN_ID, PARENT_ID, NAME, DESCRIPTION)  Values    (102, 11, NULL, 'ifIndex', '\u0418\u043d\u0434\u0435\u043a\u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430'); Insert into AE_PARAMETER    (ID, DOMAIN_ID, PARENT_ID, NAME, DESCRIPTION)  Values    (103, 13, NULL, 'ifName', '\u0418\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430'); Insert into AE_PARAMETER    (ID, DOMAIN_ID, PARENT_ID, NAME, DESCRIPTION)  Values    (104, 11, NULL, 'ifInOctets', '\u0412\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a'); Insert into AE_PARAMETER    (ID, DOMAIN_ID, PARENT_ID, NAME, DESCRIPTION)  Values    (105, 11, NULL, 'ifOutOctets', '\u0418\u0441\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0442\u0440\u0430\u0444\u0438\u043a'); COMMIT;  Insert into AE_PLATFORM_MODEL    (ID, NAME, DESCRIPTION)  Values    (1, 'test', NULL); COMMIT;  Insert into AE_PROFILE_TYPE    (ID, NAME, DESCRIPTION)  Values    (1, 'mon', '\u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433'); COMMIT;  Insert into AE_PROFILE    (ID, TYPE_ID, IS_DEFAULT, MODEL_ID, SCRIPT_ID,      NAME, DESCRIPTION)  Values    (1, 1, 1, 1, NULL,      'test', NULL); COMMIT;  Insert into AE_RESOURCE_CLASS    (ID, IS_LOGICAL, NAME, DESCRIPTION, OWNER_ID)  Values    (1, 0, '\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e', NULL, NULL); Insert into AE_RESOURCE_CLASS    (ID, IS_LOGICAL, NAME, DESCRIPTION, OWNER_ID)  Values    (2, 0, '\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441', NULL, 1); COMMIT;  Insert into AE_RESOURCE_TYPE    (ID, CLASS_ID, NAME, DESCRIPTION, OWNER_ID,      PARENT_ID)  Values    (1, 1, 'Host', NULL, NULL,      NULL); Insert into AE_RESOURCE_TYPE    (ID, CLASS_ID, NAME, DESCRIPTION, OWNER_ID,      PARENT_ID)  Values    (2, 2, 'Interface', NULL, 1,      NULL); COMMIT;  Insert into AE_PROFILE_DETAIL    (ID, TYPE_ID, PROFILE_ID, MODEL_ID, PARAM_ID)  Values    (4, 2, 1, 1, 104); Insert into AE_PROFILE_DETAIL    (ID, TYPE_ID, PROFILE_ID, MODEL_ID, PARAM_ID)  Values    (5, 2, 1, 1, 105); Insert into AE_PROFILE_DETAIL    (ID, TYPE_ID, PROFILE_ID, MODEL_ID, PARAM_ID)  Values    (6, 1, 1, 1, 1); Insert into AE_PROFILE_DETAIL    (ID, TYPE_ID, PROFILE_ID, MODEL_ID, PARAM_ID)  Values    (1, 1, 1, 1, 101); Insert into AE_PROFILE_DETAIL    (ID, TYPE_ID, PROFILE_ID, MODEL_ID, PARAM_ID)  Values    (2, 2, 1, 1, 102); Insert into AE_PROFILE_DETAIL    (ID, TYPE_ID, PROFILE_ID, MODEL_ID, PARAM_ID)  Values    (3, 2, 1, 1, 103); COMMIT;  Insert into AE_DEVICE    (ID, MODEL_ID, START_DATE, END_DATE)  Values    (0, 1, TO_DATE('10\/30\/2013 15:37:16', 'MM\/DD\/YYYY HH24:MI:SS'), NULL); COMMIT;  Insert into AE_RESOURCE    (ID, DEVICE_ID, OWNER_ID, TYPE_ID, NAME,      RES_NUM, RES_ID, START_DATE, END_DATE, TMP_ID)  Values    (1, 0, NULL, 1, '127.0.0.1',      '0', NULL, TO_DATE('10\/30\/2013 15:24:44', 'MM\/DD\/YYYY HH24:MI:SS'), NULL, NULL); COMMIT;  Insert into AE_THRESHOLD_TYPE    (ID, NAME, DESCRIPTION)  Values    (1, 'increase', '\u0423\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435'); Insert into AE_THRESHOLD_TYPE    (ID, NAME, DESCRIPTION)  Values    (2, 'decrease', '\u0423\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u0435'); Insert into AE_THRESHOLD_TYPE    (ID, NAME, DESCRIPTION)  Values    (3, 'delta', '\u041f\u0440\u0438\u0440\u0430\u0449\u0435\u043d\u0438\u0435'); COMMIT;  Insert into AE_THRESHOLD    (ID, TYPE_ID, POLICY_ID, VALUE)  Values    (1, 3, 1, '100'); COMMIT; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package com.amfitel.m2000.ae.tests.jdbc;  import oracle.jdbc.driver.OracleCallableStatement; import oracle.sql.*;  import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException;  public class Test { \t \tprivate final static String CLASS_NAME = &quot;oracle.jdbc.driver.OracleDriver&quot;; \tprivate final static String USER_CONN  = &quot;jdbc:oracle:thin:@192.168.124.5:1523:new11&quot;; \tprivate final static String USER_NAME  = &quot;ais&quot;; \tprivate final static String USER_PASS  = &quot;ais&quot;; \t \tprivate final static boolean AUTO_COMMIT_MODE = false; \tprivate final static int     BULK_SIZE        = 100; \tprivate final static int     ALL_SIZE         = 1000;  \tprivate final static String  TRACE_ON_SQL     = \t\t\t&quot;ALTER SESSION SET EVENTS '10046 trace name context forever, level 12'&quot;;  \tprivate final static Long   DEVICE_ID         = 0L; \tprivate final static Long   PROFILE_ID        = 1L; \tprivate final static Long   UPTIME_PARAM_ID   = 101L; \tprivate final static Long   IFNAME_PARAM_ID   = 103L; \tprivate final static Long   INOCT_PARAM_ID    = 104L; \tprivate final static String FAKE_NUM_VALUE    = &quot;0&quot;; \t \tprivate Connection c = null;  \tprivate void start() throws ClassNotFoundException, SQLException { \t\tClass.forName(CLASS_NAME); \t\tc = DriverManager.getConnection(USER_CONN, USER_NAME, USER_PASS); \t\tc.setAutoCommit(AUTO_COMMIT_MODE); \t\tCallableStatement st = c.prepareCall(TRACE_ON_SQL); \t\ttry { \t\t\tst.execute(); \t\t} finally { \t\t\tst.close(); \t\t} \t} \t \tprivate void stop() throws SQLException  { \t\tif (c != null) { \t\t\tc.close(); \t\t} \t}  \tpublic static void main(String[] args) { \t\tTest t = new Test(); \t\ttry { \t\t\ttry { \t\t\t\tt.start(); \t\t\t\tt.test_plsql();  \t\t\t\t\/\/ \u0417\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434  \t\t\t} finally { \t\t\t\tt.stop(); \t\t\t} \t\t} catch (Exception e) { \t\t\tSystem.out.println(e.toString()); \t\t} \t} } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u0442\u043e\u0432\u043a\u0443 \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">  <\/div>\n<\/div>\n<p>  \u0414\u043b\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u043a\u0443 event 10046 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0442\u0440\u0435\u0439\u0441\u043e\u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 <a href=\"http:\/\/docs.oracle.com\/cd\/B10500_01\/server.920\/a96533\/sqltrace.htm\">tkprof<\/a>.<\/p>\n<h4>\u0421\u0430\u043c\u044b\u0439 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 (plsql)<\/h4>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438. \u041f\u043e\u043c\u0438\u043c\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0446\u0435\u043d\u043a\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043c \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">PL\/SQL-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">CREATE OR REPLACE package AIS.ae_monitoring as     procedure    addValue( p_device    in  number                          , p_profile   in  number                          , p_param     in  number                          , p_num       in  varchar2                          , p_val       in  varchar2 ); end ae_monitoring; \/  CREATE OR REPLACE package body AIS.ae_monitoring as      g_ifName_parameter    constant number default 103;     g_default_policy      constant number default 1;     g_uptime_policy       constant number default 2;     g_threshold_policy    constant number default 3;     g_increase_type       constant number default 1;     g_decrease_type       constant number default 2;     g_delta_type          constant number default 3;      procedure addValue( p_device    in  number                       , p_profile   in  number                       , p_param     in  number                       , p_num       in  varchar2                       , p_val       in  varchar2 ) as     cursor    c_res(p_type number) is     select    r.id, r.name     from      ae_resource r     where     r.device_id = p_device     and       r.res_num = p_num     and       r.type_id = p_type     and       r.start_date &lt;= sysdate and sysdate &lt;= nvl(r.end_date, sysdate + 1);     cursor    c_state(p_resid number) is     select    s.value     from      ae_state s     where     s.res_id = p_resid     and       s.param_id = p_param;     l_resid   ae_resource.id%type            default null;     l_resname ae_resource.name%type          default null;     l_oldval  ae_state.value%type            default null;     l_restype ae_profile_detail.type_id%type default null;     l_owntype ae_resource_type.owner_id%type default null;     l_owner   ae_resource.id%type            default null;     l_policy  ae_state_policy.type_id%type   default null;     l_polid   ae_state_policy.id%type        default null;     l_count   number                         default 0;     begin        -- \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0438\u043f \u0440\u0435\u0441\u0443\u0440\u0441\u0430       select d.type_id, r.owner_id       into   l_restype, l_owntype       from   ae_profile_detail d       inner  join ae_resource_type r on (r.id = d.type_id)       where  d.profile_id = p_profile       and    d.param_id = p_param;        -- \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c ID \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0430       if not l_owntype is null then          select r.id into l_owner          from   ae_resource r          where  r.device_id = p_device          and    r.type_id = l_owntype;       end if;        -- \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430       if p_param = g_ifName_parameter then          open c_res(l_restype);          fetch c_res into l_resid, l_resname;          if c_res%notfound or l_resname &lt;&gt; p_val then              -- \u0417\u0430\u043a\u0440\u044b\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430             update ae_resource set end_date = sysdate             where id = l_resid;              -- \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430             insert into ae_resource(id, device_id, owner_id, type_id, res_num, name)             values (ae_resource_seq.nextval, p_device, l_owner, l_restype, p_num, p_val);           end if;          close c_res;          return;       end if;        -- \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c ID \u0440\u0435\u0441\u0443\u0440\u0441\u0430       open c_res(l_restype);       fetch c_res into l_resid, l_resname;       if c_res%notfound then          -- \u0415\u0441\u043b\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430          insert into ae_resource(id, device_id, owner_id, type_id, res_num, name)          values (ae_resource_seq.nextval, p_device, l_owner, l_restype, p_num, p_val)          returning id into l_resid;       end if;        -- \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430       open c_state(l_resid);       fetch c_state into l_oldval;       if c_state%notfound then          l_oldval := null;       end if;       close c_state;        -- \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439       select l.type_id, l.id       into   l_policy, l_polid       from   ae_parameter p       inner  join ae_domain d on (d.id = p.domain_id)       inner  join ae_state_policy l on (l.id = d.policy_id)       where  p.id = p_param;        -- \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0440\u043e\u0433\u043e\u0432       select count(*)       into   l_count       from   ae_threshold t       where  t.policy_id = l_polid       and (( t.type_id = g_increase_type and l_oldval &lt;= t.value and p_val &gt;= t.value ) or            ( t.type_id = g_decrease_type and l_oldval &gt;= t.value and p_val &lt;= t.value ) or            ( t.type_id = g_delta_type and abs(p_val - l_oldval) &gt;= t.value ));        -- \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u044c \u0432 ae_state_log \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439       if l_oldval is null or l_count &gt; 0 or          ( l_policy = g_uptime_policy and p_val &lt; l_oldval) or          ( l_policy = g_default_policy and p_val &lt;&gt; l_oldval) then          insert into ae_state_log(id, res_id, param_id, value)          values (ae_state_log_seq.nextval, l_resid, p_param, decode(l_policy, g_uptime_policy, nvl(l_oldval, p_val), p_val));       end if;        -- \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c ae_state       update ae_state set value = p_val                       ,   datetime = current_timestamp       where  res_id = l_resid and param_id = p_param;       if sql%rowcount = 0 then          insert into ae_state(id, param_id, res_id, value)          values (ae_state_seq.nextval, p_param, l_resid, p_val);       end if;        close c_res;     exception       when others then         if c_res%isopen then close c_res; end if;         if c_state%isopen then close c_state; end if;         raise;     end;  end ae_monitoring; \/ <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Java-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\tprivate final static String  ADD_VAL_SQL      =  \t\t\t&quot;begin ae_monitoring.addValue(?,?,?,?,?); end;&quot;;  \tprivate void test_plsql() throws SQLException { \t\tSystem.out.println(&quot;test_plsql:&quot;); \t\tCallableStatement st = c.prepareCall(ADD_VAL_SQL); \t\tLong timestamp = System.currentTimeMillis(); \t\tLong uptime = 0L; \t\tLong inoct  = 0L; \t\ttry { \t\t\tfor (int i = 1; i &lt;= ALL_SIZE; i++) { \t\t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c uptime \t\t\t\tst.setLong(1,   DEVICE_ID); \t\t\t\tst.setLong(2,   PROFILE_ID); \t\t\t\tst.setLong(3,   UPTIME_PARAM_ID); \t\t\t\tst.setString(4, FAKE_NUM_VALUE); \t\t\t\tst.setString(5, uptime.toString()); \t\t\t\tst.execute(); \t\t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \t\t\t\tst.setLong(1,   DEVICE_ID); \t\t\t\tst.setLong(2,   PROFILE_ID); \t\t\t\tst.setLong(3,   IFNAME_PARAM_ID); \t\t\t\tst.setString(4, Integer.toString((i % 100) + 1)); \t\t\t\tst.setString(5, Integer.toString((i % 100) + 1)); \t\t\t\tst.execute(); \t\t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \t\t\t\tst.setLong(1,   DEVICE_ID); \t\t\t\tst.setLong(2,   PROFILE_ID); \t\t\t\tst.setLong(3,   INOCT_PARAM_ID); \t\t\t\tst.setString(4, Integer.toString((i % 100) + 1)); \t\t\t\tst.setString(5, inoct.toString()); \t\t\t\tst.execute();  \t\t\t\t\/\/ \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438 \t\t\t\tuptime += 100L; \t\t\t\tif (uptime &gt;= 1000) { \t\t\t\t\tuptime = 0L; \t\t\t\t} \t\t\t\tinoct += 10L; \t\t\t} \t\t} finally { \t\t\tst.close(); \t\t} \t\tLong delta_1 = System.currentTimeMillis() - timestamp; \t\tSystem.out.println((ALL_SIZE * 1000L) \/ delta_1); \t\ttimestamp = System.currentTimeMillis(); \t\tc.commit(); \t\tLong delta_2 = System.currentTimeMillis() - timestamp; \t\tSystem.out.println(delta_2); \t\tSystem.out.println((ALL_SIZE * 1000L) \/ (delta_1 - delta_2)); \t} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0439 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u044d\u0442\u0438\u043c \u043a\u043e\u0434\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0432 \u0411\u0414 \u0434\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430.<\/p>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u044b:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.00 0 0 0 0 Execute 3000 4.23 4.13 7 102942 6615 3000 Fetch 0 0.00 0.00 0 0 0 0 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 3001 4.23 4.13 7 102942 6615 3000  Misses in library cache during parse: 1 Misses in library cache during execute: 1  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   SQL*Net message to client 3002 0.00 0.00   SQL*Net message from client 3002 5.92 7.12   latch: library cache 4 0.00 0.00   log file sync 1 0.00 0.00   OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 69 0.00 0.00 0 0 0 0 Execute 17261 2.42 2.36 7 9042 6615 3160 Fetch 14000 0.38 0.37 0 93900 0 13899 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 31330 2.81 2.74 7 102942 6615 17059  Misses in library cache during parse: 10 Misses in library cache during execute: 10  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   db file sequential read 7 0.00 0.00 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0442\u0440\u0430\u0442\u0438\u043c \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 (temporary)<\/h4>\n<p>  \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0434\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0431\u043e\u0440\u044c\u0431\u044b \u0441 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u043c\u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u0430\u043c\u0438 \u2014 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043a \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u0430 \u0437\u0430\u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e \u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438, \u0430 \u0432\u0441\u0435 \u0441\u0440\u0430\u0437\u0443. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u0434\u043b\u044f \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 <a href=\"http:\/\/www.oracle-base.com\/articles\/misc\/temporary-tables.php\">GTT<\/a> \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0433\u043e\u0434\u043d\u043e, \u0432\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435 \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u0436\u0443\u0440\u043d\u0430\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>  \u0414\u043b\u044f \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c DML, \u0430 \u043d\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0445\u0440\u0430\u043d\u0438\u043c\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/www.tutorialspoint.com\/jdbc\/jdbc-batch-processing.htm\">JDBC batch<\/a>, \u0434\u043b\u044f \u0441\u043d\u0438\u0436\u0435\u043d\u0438\u044f \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.<\/p>\n<p>  \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u043e\u0441\u044c \u0434\u043e \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u043d\u0430 \u0432\u0441\u0435\u0445 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0432 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">PL\/SQL-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">CREATE OR REPLACE package AIS.ae_monitoring as     procedure  saveValues; end ae_monitoring; \/  CREATE OR REPLACE package body AIS.ae_monitoring as      g_ifName_parameter    constant number default 103;     g_default_policy      constant number default 1;     g_uptime_policy       constant number default 2;     g_threshold_policy    constant number default 3;     g_increase_type       constant number default 1;     g_decrease_type       constant number default 2;     g_delta_type          constant number default 3;      procedure saveValues as     begin        -- \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442       merge into ae_resource d       using ( select t.id, t.device_id, t.num, t.value name, p.type_id, o.id owner_id               from   ae_state_tmp t               inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)               inner  join ae_resource_type r on (r.id = p.type_id)               left   join ae_resource o on (o.device_id = t.device_id and o.type_id = r.owner_id)               where  t.param_id = g_ifName_parameter             ) s       on ( d.device_id = s.device_id and d.res_num = s.num and d.type_id = s.type_id and            d.start_date &lt;= sysdate and sysdate &lt;= nvl(d.end_date, sysdate + 1) )       when matched then         update set d.tmp_id = s.id         where  d.name &lt;&gt; s.name       when not matched then         insert (id, device_id, owner_id, type_id, res_num, name)         values (ae_resource_seq.nextval, s.device_id, s.owner_id, s.type_id, s.num, s.name);        -- \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 ae_resource       insert into ae_resource(id, device_id, owner_id, type_id, res_num, name)       select ae_resource_seq.nextval, t.device_id, o.id, p.type_id, t.num, t.value       from   ae_state_tmp t       inner  join ae_resource c on (c.tmp_id = t.id)       inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)       inner  join ae_resource_type r on (r.id = p.type_id)       left   join ae_resource o on (o.device_id = t.device_id and o.type_id = r.owner_id);        -- \u0417\u0430\u043a\u0440\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b       update ae_resource set end_date = sysdate                          ,   tmp_id   = null       where  tmp_id &gt; 0;        -- \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 ae_state_log       insert into ae_state_log(id, res_id, param_id, value)       select ae_state_log_seq.nextval, id, param_id, value       from ( select distinct r.id, t.param_id,                     decode(l.type_id, g_uptime_policy, nvl(s.value, t.value), t.value) value              from   ae_state_tmp t              inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)              inner  join ae_resource r on ( r.device_id = t.device_id and r.res_num = t.num and r.type_id = p.type_id and                                             r.start_date &lt;= sysdate and sysdate &lt;= nvl(r.end_date, sysdate + 1))              left   join ae_state s on (s.res_id = r.id and s.param_id = t.param_id)              inner  join ae_parameter a on (a.id = p.param_id)              inner  join ae_domain d on (d.id = a.domain_id)              inner  join ae_state_policy l on (l.id = d.policy_id)              left   join ae_threshold h on (                     h.policy_id = l.id and                  (( h.type_id = g_increase_type and s.value &lt;= h.value and t.value &gt;= h.value ) or                   ( h.type_id = g_decrease_type and s.value &gt;= h.value and t.value &lt;= h.value ) or                   ( h.type_id = g_delta_type and abs(t.value - s.value) &gt;= h.value )))              where  ( s.id is null or not h.id is null              or   ( l.type_id = g_uptime_policy and t.value &lt; s.value )              or   ( l.type_id = g_default_policy and t.value &lt;&gt; s.value ) )              and    t.param_id &lt;&gt; g_ifName_parameter );        -- \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c ae_state       merge into ae_state d       using ( select t.param_id, t.value, r.id res_id               from   ae_state_tmp t               inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)               inner  join ae_resource r on ( r.device_id = t.device_id and r.res_num = t.num and r.type_id = p.type_id and                                              r.start_date &lt;= sysdate and sysdate &lt;= nvl(r.end_date, sysdate + 1))               where  t.param_id &lt;&gt; g_ifName_parameter             ) s       on (d.res_id = s.res_id and d.param_id = s.param_id)       when matched then         update set d.value = s.value                ,   d.datetime = current_timestamp       when not matched then         insert (id, param_id, res_id, value)         values (ae_state_seq.nextval, s.param_id, s.res_id, s.value);        -- \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f       commit write nowait;     end;  end ae_monitoring; \/ <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Java-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\tprivate final static int     BULK_SIZE        = 200;  \tprivate final static String  INS_VAL_SQL      = \t\t\t&quot;insert into ae_state_tmp(id, device_id, profile_id, param_id, num, value) values (?,?,?,?,?,?)&quot;;  \tprivate final static String  SAVE_VALUES_SQL  =  \t\t\t&quot;begin ae_monitoring.saveValues; end;&quot;;  \tprivate void test_temporary() throws SQLException { \t\tSystem.out.println(&quot;test_temporary:&quot;); \t\tCallableStatement st = c.prepareCall(INS_VAL_SQL); \t\tLong timestamp = System.currentTimeMillis(); \t\tLong uptime = 0L; \t\tLong inoct  = 0L; \t\tLong ix     = 1L; \t\tint  bulk   = BULK_SIZE;  \t\ttry { \t\t\tfor (int i = 1; i &lt;= ALL_SIZE; i++) { \t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c uptime \t\t\t\tst.setLong(1,   ix++); \t\t\t\tst.setLong(2,   DEVICE_ID); \t\t\t\tst.setLong(3,   PROFILE_ID); \t\t\t\tst.setLong(4,   UPTIME_PARAM_ID); \t\t\t\tst.setString(5, FAKE_NUM_VALUE); \t\t\t\tst.setString(6, uptime.toString()); \t\t\t\tst.addBatch(); \t\t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \t\t\t\tst.setLong(1,   ix++); \t\t\t\tst.setLong(2,   DEVICE_ID); \t\t\t\tst.setLong(3,   PROFILE_ID); \t\t\t\tst.setLong(4,   IFNAME_PARAM_ID); \t\t\t\tst.setString(5, Integer.toString((i % 100) + 1)); \t\t\t\tst.setString(6, Integer.toString((i % 100) + 1)); \t\t\t\tst.addBatch(); \t\t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \t\t\t\tst.setLong(1,   ix++); \t\t\t\tst.setLong(2,   DEVICE_ID); \t\t\t\tst.setLong(3,   PROFILE_ID); \t\t\t\tst.setLong(4,   INOCT_PARAM_ID); \t\t\t\tst.setString(5, Integer.toString((i % 100) + 1)); \t\t\t\tst.setString(6, inoct.toString()); \t\t\t\tst.addBatch(); \t\t\t\t \t\t\t\tif (--bulk &lt;= 0) { \t\t\t\t\tst.executeBatch(); \t\t\t\t\tbulk = BULK_SIZE; \t\t\t\t} \t\t\t \t\t\t\t\/\/ \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438 \t\t\t\tuptime += 100L; \t\t\t\tif (uptime &gt;= 1000) { \t\t\t\t\tuptime = 0L; \t\t\t\t} \t\t\t\tinoct += 10L; \t\t\t} \t\t\tif (bulk &lt; BULK_SIZE) { \t\t\t\tst.executeBatch(); \t\t\t} \t\t} finally { \t\t\tst.close(); \t\t} \t\tLong delta_1 = System.currentTimeMillis() - timestamp; \t\tSystem.out.println((ALL_SIZE * 1000L) \/ delta_1); \t\ttimestamp = System.currentTimeMillis(); \t\tst = c.prepareCall(SAVE_VALUES_SQL); \t\ttimestamp = System.currentTimeMillis(); \t\ttry { \t\t\tst.execute(); \t\t} finally { \t\t\tst.close(); \t\t} \t\tLong delta_2 = System.currentTimeMillis() - timestamp; \t\tSystem.out.println(delta_2); \t\tSystem.out.println((ALL_SIZE * 1000L) \/ (delta_1 - delta_2)); \t} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c:<\/p>\n<pre><code>java.sql.SQLException: ORA-30926: \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0442\u0440\u043e\u043a \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 ORA-06512: \u043d\u0430  &quot;AIS.AE_MONITORING&quot;, line 205 ORA-06512: \u043d\u0430  line 1 <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u044d\u0442\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u0430. \u0415\u0441\u043b\u0438 \u043d\u0430\u0431\u043e\u0440 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043c\u044b \u0443\u0441\u043f\u0435\u043b\u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0435\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437), \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u041f\u0440\u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 SNMP-\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e, \u043d\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043e\u043d\u0430 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u2014 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u0435\u0441\u043b\u0438 \u0435\u0435 \u0435\u0449\u0435 \u043d\u0435\u0442 \u0438\u043b\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e, \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0439 \u0432 \u043d\u0435\u0435 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Java-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\tprivate final static int     BULK_SIZE        = 200;  \tprivate final static String  MERGE_VAL_SQL    = \t\t\t&quot;merge into ae_state_tmp d &quot; + \t\t\t&quot;using ( select ? id,? device_id,? profile_id,? param_id,? num,? value &quot; + \t\t\t&quot;        from dual&quot; + \t\t\t&quot;      ) s &quot; + \t\t\t&quot;on ( d.device_id = s.device_id and d.profile_id = s.profile_id and &quot; + \t\t\t&quot;     d.param_id = s.param_id and d.num = s.num ) &quot; + \t\t\t&quot;when matched then &quot; + \t\t\t&quot;  update set d.value = s.value &quot; + \t\t\t&quot;when not matched then &quot; + \t\t\t&quot;  insert (id, device_id, profile_id, param_id, num, value) &quot; + \t\t\t&quot;  values (s.id, s.device_id, s.profile_id, s.param_id, s.num, s.value)&quot;;  \tprivate final static String  SAVE_VALUES_SQL  =  \t\t\t&quot;begin ae_monitoring.saveValues; end;&quot;;  \tprivate void test_temporary() throws SQLException { \t\tSystem.out.println(&quot;test_temporary:&quot;); \t\tCallableStatement st = c.prepareCall(MERGE_VAL_SQL); \t\t... <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 \u0442\u043e\u0439-\u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043d\u043e \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f batch-\u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code>java.sql.BatchUpdateException: ORA-00600: \u043a\u043e\u0434 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b: [6704], [2], [0], [6301696], [], [], [], [], [], [], [], [] <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0442\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043e\u0442 batch:<\/p>\n<pre><code>private final static int     BULK_SIZE        = 1; <\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0443\u043b\u0443\u0447\u0448\u0438\u043b\u0438\u0441\u044c:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 2 0.00 0.00 0 0 0 0 Execute 1001 1.02 1.01 0 9002 3503 3001 Fetch 0 0.00 0.00 0 0 0 0 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 1003 1.02 1.01 0 9002 3503 3001  Misses in library cache during parse: 1 Misses in library cache during execute: 1  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   SQL*Net message to client 1002 0.00 0.00   SQL*Net message from client 1002 0.00 0.41   log file sync 1 0.00 0.00   OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 23 0.01 0.01 0 1 0 0 Execute 23 0.21 0.21 43 29392 348 111 Fetch 11 0.00 0.00 0 27 0 10 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 57 0.22 0.23 43 29420 348 121  Misses in library cache during parse: 8 Misses in library cache during execute: 6  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   db file sequential read 41 0.01 0.01   db file scattered read 1 0.00 0.00 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 (distinct)<\/h4>\n<p>  \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0438\u0437\u043d\u044c \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0432\u0441\u0442\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0437\u0430\u043e\u0434\u043d\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 ORA-600), \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0443 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043c\u0430\u0441\u0441\u043e\u0432\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0435 \u0441\u043a\u0440\u043e\u043c\u043d\u0438\u0447\u0430\u0442\u044c \u0441 BULK_SIZE, \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0432 \u0435\u0433\u043e \u043f\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0443.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">PL\/SQL-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">CREATE OR REPLACE package AIS.ae_monitoring as     procedure  saveValuesDistinct; end ae_monitoring; \/  CREATE OR REPLACE package body AIS.ae_monitoring as      g_ifName_parameter    constant number default 103;     g_default_policy      constant number default 1;     g_uptime_policy       constant number default 2;     g_threshold_policy    constant number default 3;     g_increase_type       constant number default 1;     g_decrease_type       constant number default 2;     g_delta_type          constant number default 3;      procedure saveValuesDistinct as     begin        -- \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442       merge into ae_resource d       using ( select t.id, t.device_id, t.num, t.value name, p.type_id, o.id owner_id               from   ( select device_id, profile_id, param_id, num                        ,      max(id) keep (dense_rank last order by datetime) id                        ,      max(value) keep (dense_rank last order by datetime) value                        ,      max(datetime) datetime                        from   ae_state_tmp                        group  by device_id, profile_id, param_id, num                      ) t               inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)               inner  join ae_resource_type r on (r.id = p.type_id)               left   join ae_resource o on (o.device_id = t.device_id and o.type_id = r.owner_id)               where  t.param_id = g_ifName_parameter             ) s       on ( d.device_id = s.device_id and d.res_num = s.num and d.type_id = s.type_id and            d.start_date &lt;= sysdate and sysdate &lt;= nvl(d.end_date, sysdate + 1) )       when matched then         update set d.tmp_id = s.id         where  d.name &lt;&gt; s.name       when not matched then         insert (id, device_id, owner_id, type_id, res_num, name)         values (ae_resource_seq.nextval, s.device_id, s.owner_id, s.type_id, s.num, s.name);        -- \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0438\u0435 ae_resource       insert into ae_resource(id, device_id, owner_id, type_id, res_num, name)       select ae_resource_seq.nextval, t.device_id, o.id, p.type_id, t.num, t.value       from   ( select device_id, profile_id, param_id, num                ,      max(id) keep (dense_rank last order by datetime) id                ,      max(value) keep (dense_rank last order by datetime) value                ,      max(datetime) datetime                from   ae_state_tmp                group  by device_id, profile_id, param_id, num              ) t       inner  join ae_resource c on (c.tmp_id = t.id)       inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)       inner  join ae_resource_type r on (r.id = p.type_id)       left   join ae_resource o on (o.device_id = t.device_id and o.type_id = r.owner_id);        -- \u0417\u0430\u043a\u0440\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b       update ae_resource set end_date = sysdate                          ,   tmp_id   = null       where  tmp_id &gt; 0;        -- \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 ae_state_log       insert into ae_state_log(id, res_id, param_id, value)       select ae_state_log_seq.nextval, id, param_id, value       from ( select distinct r.id, t.param_id,                     decode(l.type_id, g_uptime_policy, nvl(s.value, t.value), t.value) value              from   ( select device_id, profile_id, param_id, num                       ,      max(id) keep (dense_rank last order by datetime) id                       ,      max(value) keep (dense_rank last order by datetime) value                       ,      max(datetime) datetime                       from   ae_state_tmp                       group  by device_id, profile_id, param_id, num                     ) t              inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)              inner  join ae_resource r on ( r.device_id = t.device_id and r.res_num = t.num and r.type_id = p.type_id and                                             r.start_date &lt;= sysdate and sysdate &lt;= nvl(r.end_date, sysdate + 1))              left   join ae_state s on (s.res_id = r.id and s.param_id = t.param_id)              inner  join ae_parameter a on (a.id = p.param_id)              inner  join ae_domain d on (d.id = a.domain_id)              inner  join ae_state_policy l on (l.id = d.policy_id)              left   join ae_threshold h on (                     h.policy_id = l.id and                  (( h.type_id = g_increase_type and s.value &lt;= h.value and t.value &gt;= h.value ) or                   ( h.type_id = g_decrease_type and s.value &gt;= h.value and t.value &lt;= h.value ) or                   ( h.type_id = g_delta_type and abs(t.value - s.value) &gt;= h.value )))              where  ( s.id is null or not h.id is null              or   ( l.type_id = g_uptime_policy and t.value &lt; s.value )              or   ( l.type_id = g_default_policy and t.value &lt;&gt; s.value ) )              and    t.param_id &lt;&gt; g_ifName_parameter );        -- \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c ae_state       merge into ae_state d       using ( select t.param_id, t.value, r.id res_id               from   ( select device_id, profile_id, param_id, num                       ,      max(id) keep (dense_rank last order by datetime) id                       ,      max(value) keep (dense_rank last order by datetime) value                       ,      max(datetime) datetime                       from   ae_state_tmp                       group  by device_id, profile_id, param_id, num                     ) t               inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)               inner  join ae_resource r on ( r.device_id = t.device_id and r.res_num = t.num and r.type_id = p.type_id and                                              r.start_date &lt;= sysdate and sysdate &lt;= nvl(r.end_date, sysdate + 1))               where  t.param_id &lt;&gt; g_ifName_parameter             ) s       on (d.res_id = s.res_id and d.param_id = s.param_id)       when matched then         update set d.value = s.value                ,   d.datetime = current_timestamp       when not matched then         insert (id, param_id, res_id, value)         values (ae_state_seq.nextval, s.param_id, s.res_id, s.value);        -- \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f       commit write nowait;     end;  end ae_monitoring; \/ <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Java-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\tprivate final static int     BULK_SIZE        = 200;  \tprivate final static String  INS_VAL_SQL      = \t\t\t&quot;insert into ae_state_tmp(id, device_id, profile_id, param_id, num, value) values (?,?,?,?,?,?)&quot;;  \tprivate final static String  SAVE_VALUES_DISTINCT_SQL  =  \t\t\t&quot;begin ae_monitoring.saveValuesDistinct; end;&quot;;  \tprivate void test_temporary_distinct() throws SQLException { \t\tSystem.out.println(&quot;test_temporary:&quot;); \t\tCallableStatement st = c.prepareCall(INS_VAL_SQL); \t\tLong timestamp = System.currentTimeMillis(); \t\tLong uptime = 0L; \t\tLong inoct  = 0L; \t\tLong ix     = 1L; \t\tint  bulk   = BULK_SIZE;  \t\ttry { \t\t\tfor (int i = 1; i &lt;= ALL_SIZE; i++) { \t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c uptime \t\t\t\tst.setLong(1,   ix++); \t\t\t\tst.setLong(2,   DEVICE_ID); \t\t\t\tst.setLong(3,   PROFILE_ID); \t\t\t\tst.setLong(4,   UPTIME_PARAM_ID); \t\t\t\tst.setString(5, FAKE_NUM_VALUE); \t\t\t\tst.setString(6, uptime.toString()); \t\t\t\tst.addBatch(); \t\t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \t\t\t\tst.setLong(1,   ix++); \t\t\t\tst.setLong(2,   DEVICE_ID); \t\t\t\tst.setLong(3,   PROFILE_ID); \t\t\t\tst.setLong(4,   IFNAME_PARAM_ID); \t\t\t\tst.setString(5, Integer.toString((i % 100) + 1)); \t\t\t\tst.setString(6, Integer.toString((i % 100) + 1)); \t\t\t\tst.addBatch(); \t\t\t\t \t\t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \t\t\t\tst.setLong(1,   ix++); \t\t\t\tst.setLong(2,   DEVICE_ID); \t\t\t\tst.setLong(3,   PROFILE_ID); \t\t\t\tst.setLong(4,   INOCT_PARAM_ID); \t\t\t\tst.setString(5, Integer.toString((i % 100) + 1)); \t\t\t\tst.setString(6, inoct.toString()); \t\t\t\tst.addBatch(); \t\t\t\t \t\t\t\tif (--bulk &lt;= 0) { \t\t\t\t\tst.executeBatch(); \t\t\t\t\tbulk = BULK_SIZE; \t\t\t\t} \t\t\t \t\t\t\t\/\/ \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438 \t\t\t\tuptime += 100L; \t\t\t\tif (uptime &gt;= 1000) { \t\t\t\t\tuptime = 0L; \t\t\t\t} \t\t\t\tinoct += 10L; \t\t\t} \t\t\tif (bulk &lt; BULK_SIZE) { \t\t\t\tst.executeBatch(); \t\t\t} \t\t} finally { \t\t\tst.close(); \t\t} \t\tLong delta_1 = System.currentTimeMillis() - timestamp; \t\tSystem.out.println((ALL_SIZE * 1000L) \/ delta_1); \t\ttimestamp = System.currentTimeMillis(); \t\tst = c.prepareCall(SAVE_VALUES_DISTINCT_SQL); \t\ttimestamp = System.currentTimeMillis(); \t\ttry { \t\t\tst.execute(); \t\t} finally { \t\t\tst.close(); \t\t} \t\tLong delta_2 = System.currentTimeMillis() - timestamp; \t\tSystem.out.println(delta_2); \t\tSystem.out.println((ALL_SIZE * 1000L) \/ (delta_1 - delta_2)); \t} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 2 0.00 0.00 0 0 0 0 Execute 1001 0.36 0.33 0 96 6616 3001 Fetch 0 0.00 0.00 0 0 0 0 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 1003 0.36 0.33 0 96 6616 3001  Misses in library cache during parse: 2 Misses in library cache during execute: 1  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   SQL*Net message to client 1002 0.00 0.00   SQL*Net message from client 1002 0.00 0.41   log file sync 1 0.00 0.00   OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 30 0.01 0.01 0 3 0 0 Execute 30 0.41 0.40 3 48932 1104 218 Fetch 8 0.00 0.00 0 176 0 8 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 68 0.44 0.43 3 49111 1104 226  Misses in library cache during parse: 8 Misses in library cache during execute: 7  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   db file sequential read 3 0.00 0.00 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0438\u0441\u044c, \u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043b\u0430\u0441\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0438\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 (collection)<\/h4>\n<p>  \u041a\u0430\u043a \u0441\u043f\u0440\u0430\u0432\u0435\u0434\u043b\u0438\u0432\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043b <a href=\"http:\/\/habrahabr.ru\/users\/denkrep\/\" class=\"user_link\">DenKrep<\/a>, \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u0441\u0430\u043c\u044b\u0445 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0430\u0445 \u043d\u0430 \u0432\u0441\u0442\u0430\u0432\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0434\u0445\u043e\u0434 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GTT \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0435\u0440\u0435\u043b\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437 \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0432 \u043f\u043e\u0440\u043e\u0436\u043d\u0435\u0435. \u041a\u0430\u043a\u0438\u043c \u0435\u0449\u0435 \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u0438\u0437\u0434\u0435\u0440\u0436\u043a\u0438 \u043d\u0430 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435? \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c JDBC batch \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 PL\/SQL-\u043a\u043e\u0434\u0430 (\u0432\u0435\u0440\u043d\u0435\u0435 \u043c\u043e\u0436\u0435\u043c, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u0435\u0441\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0432\u044b\u0433\u043e\u0434\u044b), \u043d\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b!<\/p>\n<p>  \u0421\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0438\u0437 Java-\u043a\u043e\u0434\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u0432 <a href=\"http:\/\/www.sql.ru\/forum\/153108\/faq-java-oracle-peredacha-priem-massivov#1259665\">\u044d\u0442\u043e\u043c<\/a> \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435. \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0442\u0438\u043f\u044b:<\/p>\n<pre><code class=\"sql\">create or replace type ae_state_rec as object (   device_id      number,   profile_id     number,   param_id       number,   num            varchar2(300),   value          varchar2(300) ) \/  create or replace type ae_state_tab as table of ae_state_rec; \/ <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0443 \u043c\u0435\u043d\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Oracle Client 11g, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c [ORACLE_HOME]\/jdbc\/lib\/classes12.zip \u043d\u0430 [ORACLE_HOME]\/jdbc\/lib\/ojdbc5.jar. \u0422\u0430\u043a\u0436\u0435, \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u0447\u0442\u043e [ORACLE_HOME]\/jdbc\/lib\/nls_charset12.zip \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f (\u043e\u0448\u0438\u0431\u043e\u043a \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442, \u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0431\u0443\u0434\u0435\u0442 NULL).<\/p>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435? \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0440\u0430\u043d\u0435\u0435 addValue \u0432 \u0446\u0438\u043a\u043b\u0435:<\/p>\n<pre><code class=\"sql\">    ...     procedure addValues( p_tab in ae_state_tab ) as     begin       for i in 1 .. p_tab.count loop           addValue( p_device  =&gt; p_tab(i).device_id                   , p_profile =&gt; p_tab(i).profile_id                   , p_param   =&gt; p_tab(i).param_id                   , p_num     =&gt; p_tab(i).num                   , p_val     =&gt; p_tab(i).value );       end loop;       commit write nowait;     end;     ... <\/code><\/pre>\n<p>  Java-\u043a\u043e\u0434 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043b\u0441\u044f:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Java-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\tprivate final static String  ADD_VALUES_SQL   =  \t\t\t&quot;begin ae_monitoring.addValues(?); end;&quot;;  \tprivate void test_collection() throws SQLException { \t\tSystem.out.println(&quot;test_collection:&quot;); \t\tOracleCallableStatement st = (OracleCallableStatement)c.prepareCall(ADD_VALUES_SQL); \t\tint oracleId = CharacterSet.CL8MSWIN1251_CHARSET; \t\tCharacterSet charSet = CharacterSet.make(oracleId);\t\t \t\tLong timestamp = System.currentTimeMillis(); \t\tLong uptime = 0L; \t\tLong inoct  = 0L; \t\tRecType r[] = new RecType[ALL_SIZE * 3];  \t\tint ix      = 0; \t\tfor (int i = 1; i &lt;= ALL_SIZE; i++) {  \t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c uptime \t\t\tr[ix++] = new RecType( \t\t\t\t\tnew NUMBER(DEVICE_ID), \t\t\t\t\tnew NUMBER(PROFILE_ID), \t\t\t\t\tnew NUMBER(UPTIME_PARAM_ID), \t\t\t\t\tnew CHAR(FAKE_NUM_VALUE, charSet), \t\t\t\t\tnew CHAR(uptime.toString(), charSet)); \t\t\t \t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \t\t\tr[ix++] = new RecType( \t\t\t\t\tnew NUMBER(DEVICE_ID), \t\t\t\t\tnew NUMBER(PROFILE_ID), \t\t\t\t\tnew NUMBER(IFNAME_PARAM_ID), \t\t\t\t\tnew CHAR(Integer.toString((i % 100) + 1), charSet), \t\t\t\t\tnew CHAR(Integer.toString((i % 100) + 1), charSet)); \t\t\t \t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \t\t\tr[ix++] = new RecType( \t\t\t\t\tnew NUMBER(DEVICE_ID), \t\t\t\t\tnew NUMBER(PROFILE_ID), \t\t\t\t\tnew NUMBER(INOCT_PARAM_ID), \t\t\t\t\tnew CHAR(Integer.toString((i % 100) + 1), charSet), \t\t\t\t\tnew CHAR(inoct.toString(), charSet)); \t\t \t\t\t\/\/ \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438 \t\t\tuptime += 100L; \t\t\tif (uptime &gt;= 1000) { \t\t\t\tuptime = 0L; \t\t\t} \t\t\tinoct += 10L; \t\t} \t\tRecTab t = new RecTab(r); \t\ttry { \t\t\tst.setORAData(1, t); \t\t\tst.execute(); \t\t} finally { \t\t\tst.close(); \t\t} \t\tSystem.out.println((ALL_SIZE * 1000L) \/ (System.currentTimeMillis() - timestamp)); \t} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0412 \u0442\u0440\u0435\u0439\u0441\u0435 \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u0437\u0430\u0431\u0430\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432:<\/p>\n<pre><code>SELECT INSTANTIABLE, supertype_owner, supertype_name, LOCAL_ATTRIBUTES FROM  all_types WHERE type_name = :1 AND owner = :2 <\/code><\/pre>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u0435\u043d:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 4 0.00 0.00 0 0 0 0 Execute 4 4.35 4.31 5 136053 6610 3 Fetch 1 0.00 0.00 0 9 0 1 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 9 4.35 4.31 5 136062 6610 4  Misses in library cache during parse: 2 Misses in library cache during execute: 2  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   SQL*Net message to client 6 0.00 0.00   SQL*Net message from client 6 0.23 0.34   SQL*Net more data from client 41 0.00 0.00   OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 77 0.00 0.00 0 0 0 0 Execute 17270 2.97 2.92 5 6046 6610 3160 Fetch 14013 0.49 0.49 1 129930 0 13909 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 31360 3.48 3.43 6 135976 6610 17069  Misses in library cache during parse: 8 Misses in library cache during execute: 11  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   db file sequential read 6 0.00 0.00 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0423\u043b\u0443\u0447\u0448\u0438\u043b\u0438\u0441\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u043b\u0430\u0441\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e \u0441 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c plsql.<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438 \u043f\u043e \u0443\u043c\u043d\u043e\u043c\u0443 (bulk)<\/h4>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0441 \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043d\u0435 \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0435\u0440\u0435. \u0411\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u043e\u0432\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u043d\u043e \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c? \u041c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/www.oracle.com\/technetwork\/issue-archive\/2008\/08-mar\/o28plsql-095155.html\">BULK COLLECT<\/a>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043d\u0430\u0448\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0432 <a href=\"http:\/\/stackoverflow.com\/questions\/5165580\/how-to-use-a-table-type-in-a-select-from-statement\">TABLE<\/a>:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">PL\/SQL-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"sql\">CREATE OR REPLACE package AIS.ae_monitoring as     procedure  saveValues( p_tab       in  ae_state_tab ); end ae_monitoring; \/  CREATE OR REPLACE package body AIS.ae_monitoring as      g_ifName_parameter    constant number default 103;     g_default_policy      constant number default 1;     g_uptime_policy       constant number default 2;     g_threshold_policy    constant number default 3;     g_increase_type       constant number default 1;     g_decrease_type       constant number default 2;     g_delta_type          constant number default 3;      procedure  saveValues( p_tab in  ae_state_tab ) as     begin        -- \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441, \u0435\u0441\u043b\u0438 \u043e\u043d \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442       merge into ae_resource d       using ( select t.device_id, t.num, t.value name, p.type_id, o.id owner_id               from   ( select device_id, profile_id, param_id, num                        ,      max(value) value                        from   table( p_tab )                        group  by device_id, profile_id, param_id, num                      ) t               inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)               inner  join ae_resource_type r on (r.id = p.type_id)               left   join ae_resource o on (o.device_id = t.device_id and o.type_id = r.owner_id)               where  t.param_id = g_ifName_parameter             ) s       on ( d.device_id = s.device_id and d.res_num = s.num and d.type_id = s.type_id and            d.start_date &lt;= sysdate and sysdate &lt;= nvl(d.end_date, sysdate + 1) )       when not matched then         insert (id, device_id, owner_id, type_id, res_num, name)         values (ae_resource_seq.nextval, s.device_id, s.owner_id, s.type_id, s.num, s.name);        -- \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 ae_state_log       insert into ae_state_log(id, res_id, param_id, value)       select ae_state_log_seq.nextval, id, param_id, value       from ( select distinct r.id, t.param_id,                     decode(l.type_id, g_uptime_policy, nvl(s.value, t.value), t.value) value              from   ( select device_id, profile_id, param_id, num                        ,      max(value) value                        from   table( p_tab )                        group  by device_id, profile_id, param_id, num                      ) t              inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)              inner  join ae_resource r on ( r.device_id = t.device_id and r.res_num = t.num and r.type_id = p.type_id and                                             r.start_date &lt;= sysdate and sysdate &lt;= nvl(r.end_date, sysdate + 1))              left   join ae_state s on (s.res_id = r.id and s.param_id = t.param_id)              inner  join ae_parameter a on (a.id = p.param_id)              inner  join ae_domain d on (d.id = a.domain_id)              inner  join ae_state_policy l on (l.id = d.policy_id)              left   join ae_threshold h on (                     h.policy_id = l.id and                  (( h.type_id = g_increase_type and s.value &lt;= h.value and t.value &gt;= h.value ) or                   ( h.type_id = g_decrease_type and s.value &gt;= h.value and t.value &lt;= h.value ) or                   ( h.type_id = g_delta_type and abs(t.value - s.value) &gt;= h.value )))              where  ( s.id is null or not h.id is null              or   ( l.type_id = g_uptime_policy and t.value &lt; s.value )              or   ( l.type_id = g_default_policy and t.value &lt;&gt; s.value ) )              and    t.param_id &lt;&gt; g_ifName_parameter );        -- \u041e\u0431\u043d\u043e\u0432\u0438\u0442\u044c ae_state       merge into ae_state d       using ( select t.param_id, t.value, r.id res_id               from   ( select device_id, profile_id, param_id, num                        ,      max(value) value                        from   table( p_tab )                        group  by device_id, profile_id, param_id, num                      ) t               inner  join ae_profile_detail p on (p.profile_id = t.profile_id and p.param_id = t.param_id)               inner  join ae_resource r on ( r.device_id = t.device_id and r.res_num = t.num and r.type_id = p.type_id and                                              r.start_date &lt;= sysdate and sysdate &lt;= nvl(r.end_date, sysdate + 1))               where  t.param_id &lt;&gt; g_ifName_parameter             ) s       on (d.res_id = s.res_id and d.param_id = s.param_id)       when matched then         update set d.value = s.value                ,   d.datetime = current_timestamp       when not matched then         insert (id, param_id, res_id, value)         values (ae_state_seq.nextval, s.param_id, s.res_id, s.value);        -- \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f       commit write nowait;     end;  end ae_monitoring; \/ <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Java-\u043a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\tprivate final static String  BULK_VALUES_SQL  =  \t\t\t&quot;begin ae_monitoring.saveValues(?); end;&quot;;   \tprivate void test_bulk() throws SQLException { \t\tSystem.out.println(&quot;test_bulk:&quot;); \t\tOracleCallableStatement st = (OracleCallableStatement)c.prepareCall(BULK_VALUES_SQL); \t\tint oracleId = CharacterSet.CL8MSWIN1251_CHARSET; \t\tCharacterSet charSet = CharacterSet.make(oracleId);\t\t \t\tLong timestamp = System.currentTimeMillis(); \t\tLong uptime = 0L; \t\tLong inoct  = 0L; \t\tRecType r[] = new RecType[ALL_SIZE * 3];  \t\tint ix      = 0; \t\tfor (int i = 1; i &lt;= ALL_SIZE; i++) {  \t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c uptime \t\t\tr[ix++] = new RecType( \t\t\t\t\tnew NUMBER(DEVICE_ID), \t\t\t\t\tnew NUMBER(PROFILE_ID), \t\t\t\t\tnew NUMBER(UPTIME_PARAM_ID), \t\t\t\t\tnew CHAR(FAKE_NUM_VALUE, charSet), \t\t\t\t\tnew CHAR(uptime.toString(), charSet)); \t\t\t \t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043c\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \t\t\tr[ix++] = new RecType( \t\t\t\t\tnew NUMBER(DEVICE_ID), \t\t\t\t\tnew NUMBER(PROFILE_ID), \t\t\t\t\tnew NUMBER(IFNAME_PARAM_ID), \t\t\t\t\tnew CHAR(Integer.toString((i % 100) + 1), charSet), \t\t\t\t\tnew CHAR(Integer.toString((i % 100) + 1), charSet)); \t\t\t \t\t\t\/\/ \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \t\t\tr[ix++] = new RecType( \t\t\t\t\tnew NUMBER(DEVICE_ID), \t\t\t\t\tnew NUMBER(PROFILE_ID), \t\t\t\t\tnew NUMBER(INOCT_PARAM_ID), \t\t\t\t\tnew CHAR(Integer.toString((i % 100) + 1), charSet), \t\t\t\t\tnew CHAR(inoct.toString(), charSet)); \t\t \t\t\t\/\/ \u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0438 \t\t\tuptime += 100L; \t\t\tif (uptime &gt;= 1000) { \t\t\t\tuptime = 0L; \t\t\t} \t\t\tinoct += 10L; \t\t} \t\tRecTab t = new RecTab(r); \t\ttry { \t\t\tst.setORAData(1, t); \t\t\tst.execute(); \t\t} finally { \t\t\tst.close(); \t\t} \t\tSystem.out.println((ALL_SIZE * 1000L) \/ (System.currentTimeMillis() - timestamp)); \t} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u0430\u043c \u0437\u0430 \u0441\u0435\u0431\u044f:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 4 0.00 0.00 0 0 0 0 Execute 4 0.20 0.20 4 696 1095 3 Fetch 1 0.00 0.00 0 9 0 1 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 9 0.20 0.20 4 705 1095 4  Misses in library cache during parse: 0  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   SQL*Net message to client 6 0.00 0.00   SQL*Net message from client 6 0.10 0.19   SQL*Net more data from client 41 0.00 0.00   OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS  call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 30 0.00 0.00 0 0 0 0 Execute 38 0.18 0.17 4 591 1095 217 Fetch 46 0.00 0.00 0 96 0 30 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 114 0.18 0.18 4 687 1095 247  Misses in library cache during parse: 7 Misses in library cache during execute: 7  Elapsed times include waiting on following events:   Event waited on Times Max. Wait Total Waited   ---------------------------------------- Waited ---------- ------------   db file sequential read 4 0.00 0.00 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>\u0412\u044b\u0432\u043e\u0434\u044b<\/h4>\n<p>  \u041a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0432 Oracle \u0438\u0437 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u0434\u0430 (bulk) \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c GTT (temporary, distinct) \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u0435\u043c\u0443 \u0443\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0432 \u043f\u043b\u0430\u043d\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0449\u0435, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f Java-\u043a\u043e\u0434\u0430. \u0412\u0430\u0440\u0438\u0430\u043d\u0442 temporary, \u043f\u043e\u043c\u0438\u043c\u043e \u0442\u043e\u0433\u043e, \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c ORA-600, \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 batch \u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0437\u0432\u0435\u0437\u0434.<\/p>\n<p>  \u041a\u0430\u043a\u043e\u0439 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u2014 \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u0430\u043c. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u044b\u043b\u043e\u0436\u0435\u043d\u044b \u043d\u0430 <a href=\"https:\/\/github.com\/GlukKazan\/traces\">GitHub<\/a>.      \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/199518\/\"> http:\/\/habrahabr.ru\/post\/199518\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0437\u0430\u0434, \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/196828\">\u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u0443\u044e \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0411\u0414 Oracle. \u0421\u0443\u0434\u044f \u043f\u043e \u043e\u0431\u0438\u043b\u0438\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0432\u0448\u0438\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432, \u0441\u0442\u0430\u0442\u044c\u044f \u0432\u044b\u0437\u0432\u0430\u043b\u0430 \u0436\u0438\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441, \u043d\u043e, \u0441\u0443\u0434\u044f \u043f\u043e \u0442\u0435\u043c-\u0436\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c (\u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0432\u0448\u0435\u0439 <a href=\"http:\/\/habrahabr.ru\/post\/197718\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a> \u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 PostgreSQL) \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u043e\u043d\u0430 \u0431\u044b\u043b\u0430 \u043f\u043e\u043d\u044f\u0442\u0430 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u044f \u043d\u0430 \u0442\u043e \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0447\u0430\u0441\u0442\u0438, \u0432\u0438\u043d\u043e\u0432\u0430\u0442 \u0432 \u044d\u0442\u043e\u043c \u044f \u0441\u0430\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430, \u043e\u0442\u043e\u0440\u0432\u0430\u043b\u0441\u044f \u043e\u0442 \u0436\u0438\u0437\u043d\u0438 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e, \u0447\u0442\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b\u0430 \u0431\u044b\u0442\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u0430 \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u043c (\u044d\u0442\u043e, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0430 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u0447\u0438\u043d \u0432\u044b\u0431\u043e\u0440\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f).<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u044f \u0445\u043e\u0447\u0443 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u043f\u0443\u0449\u0435\u043d\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u042f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 SNMP-\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430, \u0443\u0434\u0435\u043b\u044f\u044f \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c. \u042f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u0431\u043e\u0441\u043d\u043e\u0432\u0430\u0442\u044c \u0432\u044b\u0431\u043e\u0440 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u0434\u043b\u044f \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u0422\u0430\u043a\u0436\u0435, \u044f \u0443\u0434\u0435\u043b\u044e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u0435\u043c \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0443 \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432. \u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435, \u044f \u0445\u043e\u0447\u0443 \u0432\u044b\u0440\u0430\u0437\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c <a href=\"http:\/\/habrahabr.ru\/users\/denkrep\/\" class=\"user_link\">DenKrep<\/a>, <a href=\"http:\/\/habrahabr.ru\/users\/xlix123\/\" class=\"user_link\">xlix123<\/a>, <a href=\"http:\/\/habrahabr.ru\/users\/zhekappp\/\" class=\"user_link\">zhekappp<\/a> \u0438 \u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0447\u0438\u043c \u0442\u043e\u0432\u0430\u0440\u0438\u0449\u0430\u043c, \u0434\u0430\u0432\u0448\u0438\u043c \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-199518","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/199518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=199518"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/199518\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=199518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=199518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=199518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}