{"id":1064,"date":"2012-11-05T17:33:44","date_gmt":"2012-11-05T14:33:44","guid":{"rendered":"http:\/\/www.891rpm.arthead.ru\/?p=1064"},"modified":"2017-12-21T11:01:36","modified_gmt":"2017-12-21T08:01:36","slug":"%d1%80%d0%b5%d0%b7%d0%b5%d1%80%d0%b2%d0%bd%d0%be%d0%b5-%d0%ba%d0%be%d0%bf%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d0%b1%d0%b0%d0%b7-%d0%b2-ms-sql","status":"publish","type":"post","link":"https:\/\/891rpm.com\/?p=1064","title":{"rendered":"\u0420\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0435 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0431\u0430\u0437 \u0432 MS SQL"},"content":{"rendered":"<p><a href=\\\"\/\/891rpm.arthead.ru\/wp-content\/uploads\/2012\/11\/mssql.png\\\"><img class=\\\"size-medium wp-image-1067 alignleft\\\" title=\\\"MS SQL\\\" src=\\\"\/\/891rpm.arthead.ru\/wp-content\/uploads\/2012\/11\/mssql-300x169.png\\\" alt=\\\"\\\" width=\\\"300\\\" height=\\\"169\\\" \/><\/a>\u0414\u043b\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 MS SQL \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 SQL Server Agent.<\/p>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f MS SQL &#8211; Express.<\/p>\n<p>\u0412 \u043d\u0435\u0439 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 SQL Server Agent. \u0418 \u0445\u043e\u0442\u044f \u0432 SQL Server 2008 Express \u0442\u0430\u043a\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u0438 \u0435\u0441\u0442\u044c, \u043d\u043e \u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u0430 \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 <strong>SQLServerAgent could not be started (reason: Error creating a new session)<\/strong>.<br \/>\n\u0421\u0442\u0440\u0430\u043d\u043d\u043e, &#8211; \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443, \u043d\u043e \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442\u044c \u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c.<\/p>\n<p>\u042d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n<pre class=\\\"lang:ps decode:true \\\">REM \u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445\r\nset DB=DB01\r\nREM \u041f\u0443\u0442\u044c \u0434\u043e \u043f\u0430\u043f\u043a\u0438 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0431\u044d\u043a\u0430\u043f\u043e\u0432\r\nset backup_path_local=d:\\\\backup\\\\\r\nREM \u041f\u0443\u0442\u044c \u0434\u043e \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430\r\nset backup_path_remote=\\\\serverbackup\\\\backup$\\\\SQL_Database\\\\\r\nREM \u0417\u0430\u043f\u0443\u0441\u043a \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0443\u0442\u0438\u043b\u0438\u0442\u044b Sqlcmd\r\nSqlcmd -Q \\\"BACKUP DATABASE [%DB%] TO  DISK = N\\'%backup_path_local%%computername%_%DB%.bak\\' WITH NOFORMAT, INIT,  NAME = N\\'%DB%-Full Database Backup\\', SKIP, NOREWIND, NOUNLOAD,  STATS = 10\\\" -t 60000\r\nREM \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u043f\u0438\u0438 \u0432 \u0441\u0435\u0442\u0435\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\r\nmove %backup_path_local%%computername%_%DB%.bak %backup_path_remote%<\/pre>\n<p>\u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 DB, backup_path_local \u0438 backup_path_remote<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043b\u044f \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 MS SQL \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 SQL Server Agent. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f MS SQL &#8211; Express. \u0412 \u043d\u0435\u0439 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 SQL Server Agent. \u0418 \u0445\u043e\u0442\u044f \u0432 SQL Server 2008 Express \u0442\u0430\u043a\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u0438 \u0435\u0441\u0442\u044c, \u043d\u043e \u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f, \u0430 \u0432\u044b\u0434\u0430\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 SQLServerAgent could not be started (reason: Error [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[57,337,458],"class_list":["post-1064","post","type-post","status-publish","format-standard","hentry","category-tech-articles","tag-backup","tag-mssql","tag-script"],"_links":{"self":[{"href":"https:\/\/891rpm.com\/index.php?rest_route=\/wp\/v2\/posts\/1064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/891rpm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/891rpm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/891rpm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/891rpm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1064"}],"version-history":[{"count":0,"href":"https:\/\/891rpm.com\/index.php?rest_route=\/wp\/v2\/posts\/1064\/revisions"}],"wp:attachment":[{"href":"https:\/\/891rpm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/891rpm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/891rpm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}