打造「特色履歷」面試機會大提昇!即學、即用 手機APP創業成功模式2017年最新專案補助培訓方案
返回列表 回復 發帖

【SQL Server 2016 vNext on LINUX 系列二十九】

【SQL Server 2016 vNext on LINUX 系列二十九】之【SQL Server Agent on Linux千呼萬喚始出來】
說真的要在Linux平台上實做出來一個可以自動化的SQL Server Agent代理程式,真是不簡單,之前用過Oracle資料庫就需要使用dbms_job的package或是透過Enterprise Manager的介面進行作業的建立。現在於Linux上面的SQL Server Agent竟然也可以跟Windows平台上的代理程式一樣,快速地建立作業,進而減少CRONTAB或是AT排程的建立。
中的mssql-server-agent-14.0.405.200-1.x86_64.rpm 套件,現在就一起跟著以下的方式,一步步安裝SQL Server Agent on Linux。
[root@sqlfcinfs stage]# ll /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm
-rw-r--r-- 1 root root 1597452 Mar 19 13:01 /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm
[root@sqlfcinfs stage]#
[root@sqlfcinfs stage]# yum install /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm
整個安裝的過程SQL Server會被更新,譬如原先是CTP1.3 的環境就會更新到CTP1.4,主要原因是該SQL Server Agent on Linux需要伴隨著SQL Server CTP1.4 on Linux才可以發生作用。最後安裝完成之後需要重新啟動SQL Server on Linux。
此外該SQL Server Agent on Linux現在的版本儘可以支援T-SQL作業,這樣一來可以進行BACKUP等作業,尚未支援其他類似Operating System(CmdExec)等等作業類型,期待下一版本的全整功能。
使用yum install 安裝下載套件
[root@sqlfcinfs stage]# yum install /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm
Loaded plugins: langpacks, ulninfo
Examining /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm: mssql-server-agent-14.0.405.200-1.x86_64
Marking /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mssql-server-agent.x86_64 0:14.0.405.200-1 will be installed
--> Processing Dependency: mssql-server >= 14.0.405.163-2 for package: mssql-server-agent-14.0.405.200-1.x86_64
groonga | 2.5 kB 00:00:00
ol7_UEKR3 | 1.2 kB 00:00:00
ol7_addons | 1.2 kB 00:00:00
ol7_latest | 1.4 kB 00:00:00
ol7_optional_latest | 1.2 kB 00:00:00
ol7_u2_base | 1.4 kB 00:00:00
packages-microsoft-com-mssql-server | 2.9 kB 00:00:00
packages-microsoft-com-prod | 2.9 kB 00:00:00
(1/3): groonga/7Server/x86_64/primary_db | 259 kB 00:00:00
(2/3): packages-microsoft-com-mssql-server/primary_db | 6.1 kB 00:00:00
(3/3): packages-microsoft-com-prod/primary_db | 13 kB 00:00:00
(1/6): ol7_addons/x86_64/updateinfo | 29 kB 00:00:00
(2/6): ol7_addons/x86_64/primary | 64 kB 00:00:00
(3/6): ol7_optional_latest/x86_64/updateinfo | 897 kB 00:00:00
(4/6): ol7_latest/x86_64/updateinfo | 1.2 MB 00:00:01
(5/6): ol7_optional_latest/x86_64/primary | 3.9 MB 00:00:03
(6/6): ol7_latest/x86_64/primary | 23 MB 00:00:20
ol7_addons 211/211
ol7_latest 18628/18628
ol7_optional_latest 12890/12890
--> Running transaction check
---> Package mssql-server.x86_64 0:14.0.304.138-1 will be updated
---> Package mssql-server.x86_64 0:14.0.405.200-1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Installing:
mssql-server-agent x86_64 14.0.405.200-1 /mssql-server-agent-14.0.405.200-1.x86_64 9.1 M
Updating for dependencies:
mssql-server x86_64 14.0.405.200-1 packages-microsoft-com-mssql-server 142 M
Transaction Summary
======================================================================================================================================================
Install 1 Package
Upgrade ( 1 Dependent package)
Total size: 151 M
Total download size: 142 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for packages-microsoft-com-mssql-server
[root@sqlfcinfs stage]# yum install /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm ] 4.3 MB/s | 16 MB 00:00:29 ETA
Loaded plugins: langpacks, ulninfo
Examining /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm: mssql-server-agent-14.0.405.200-1.x86_64
Marking /stage/mssql-server-agent-14.0.405.200-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mssql-server-agent.x86_64 0:14.0.405.200-1 will be installed
--> Processing Dependency: mssql-server >= 14.0.405.163-2 for package: mssql-server-agent-14.0.405.200-1.x86_64
groonga | 2.5 kB 00:00:00
ol7_UEKR3 | 1.2 kB 00:00:00
ol7_addons | 1.2 kB 00:00:00
ol7_latest | 1.4 kB 00:00:00
ol7_optional_latest | 1.2 kB 00:00:00
ol7_u2_base | 1.4 kB 00:00:00
packages-microsoft-com-mssql-server | 2.9 kB 00:00:00
packages-microsoft-com-prod | 2.9 kB 00:00:00
(1/3): groonga/7Server/x86_64/primary_db | 259 kB 00:00:00
(2/3): packages-microsoft-com-mssql-server/primary_db | 6.1 kB 00:00:00
(3/3): packages-microsoft-com-prod/primary_db | 13 kB 00:00:00
(1/6): ol7_addons/x86_64/updateinfo | 29 kB 00:00:00
(2/6): ol7_addons/x86_64/primary | 64 kB 00:00:00
(3/6): ol7_optional_latest/x86_64/updateinfo | 897 kB 00:00:00
(4/6): ol7_latest/x86_64/updateinfo | 1.2 MB 00:00:01
(5/6): ol7_optional_latest/x86_64/primary | 3.9 MB 00:00:03
(6/6): ol7_latest/x86_64/primary | 23 MB 00:00:20
ol7_addons 211/211
ol7_latest 18628/18628
ol7_optional_latest 12890/12890
--> Running transaction check
---> Package mssql-server.x86_64 0:14.0.304.138-1 will be updated
---> Package mssql-server.x86_64 0:14.0.405.200-1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================
Package Arch Version Repository Size
mssql-server-14.0.405.200-1.x86_64.rpm | 142 MB 00:00:21
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : mssql-server-14.0.405.200-1.x86_64 1/3
Installing : mssql-server-agent-14.0.405.200-1.x86_64 2/3
+-------------------------------------------------------------------------+
| Please restart mssql-server to enable Microsoft SQL Server Agent. |
+-------------------------------------------------------------------------+
Cleanup : mssql-server-14.0.304.138-1.x86_64 3/3
Verifying : mssql-server-14.0.405.200-1.x86_64 1/3
Verifying : mssql-server-agent-14.0.405.200-1.x86_64 2/3
Verifying : mssql-server-14.0.304.138-1.x86_64 3/3
Installed:
mssql-server-agent.x86_64 0:14.0.405.200-1
Dependency Updated:
mssql-server.x86_64 0:14.0.405.200-1
Complete!
You have new mail in /var/spool/mail/root
1.jpg
2.jpg
3.jpg
收藏 分享
返回列表