• EC2实例迁移-比如从海外区域迁移到国内区域

    AWS海外区域和国内区域是互相隔离的两套系统,它们之间的信息数据无法共享。所以直接在账户层面将无法对海外账号和国内账号设置权限来共享数据。

    接下来,我们将通过海外区域创建的EC2实例制作成AMI镜像,利用S3存储桶和中转主机的aws-cli工具,将海外区域的EC2实例迁移到国内区域。

    解决思路


    1. 将EC2实例导出为AMI镜像(海外账号)。
    2. 将该镜像存储到S3存储桶(海外账号)。
    3. 使用中转主机,将S3存储桶中的AMI镜像下载到中转主机。
    4. 中转主机重新配置登录国内账号,将下载好的AMI镜像上传到国内账号的S3存储桶。
    5. 还原AMI镜像。

    实现过程


    海外账号和国内账号均需创建AKSK

    1. 在AWS控制台界面创建Access keys (access key ID and secret access key)。
    2. 使用账号密码登录到AWS控制台主界面。
    3. 在主界面右上角点击你的用户名,出来下拉菜单,在下拉菜单界面点击My Security Credentials。
    4. 在Your Security Credentials界面当中,点击Access keys (access key ID and secret access key)栏目,然后点击Create New Access key。
    5. 在创建成功时会弹出对话框告诉你AKSK,记得把文件下载下来,因为这个文件只有在第一次创建时才能获取,以后是无法获取的。

    | 注:以下操作均在中转主机上执行。这台主机可以是海外EC2实例、国内EC2实例、甚至可以是本地主机或者其他云平台的主机。

    确保中主机安装aws-cli

    执行以下命令安装aws-cli,此方式适用于Linux系统。

    curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"

    unzip awscliv2.zip

    ./aws/install

    aws --version

    使用aws-cli登海外账号

    [root@localhost ~] aws configure

    AWS Access Key ID [None]: # 输入海外账号的access key

    AWS Secret Access Key [None]: # 输入海外账号的 secret key

    Default region name [None]: us-east-1 # 你的默认区域

    Default output format [None]: json # 输出内容格式

    EC2建AMI

    aws ec2 create-image --instance-id i-0fa1e28ba0e99b2f6 --name "ami-test" --description "ami test"

    {

    "ImageId": "ami-0591c2c1b99828acb"

    }

    建海外域的S3存并将镜像存到存

    1. 创建海外区域的S3存储桶

    aws s3api create-bucket --bucket s3-ami-test-source --region us-east-1

    {

    "Location": "/s3-ami-test-source"

    }

    2. 将AMI镜像存储到S3存储桶

    aws ec2 create-store-image-task --image-id ami-0591c2c1b99828acb --bucket s3-ami-test-source

    {

    "ObjectKey": "ami-0591c2c1b99828acb.bin"

    }

    S3桶中的像文件下到中主机

    aws s3 cp s3://s3-ami-test/ami-0591c2c1b99828acb.bin ./

    使用AWS-CLI配置登录国内账号

    [root@localhost ~] aws configure

    AWS Access Key ID [None]: #输入国内账号的access key

    AWS Secret Access Key [None]: # 输入国内账号的 secret key

    Default region name [None]: cn-northwest-1 # 你的默认区域

    Default output format [None]: json # 输出内容格式

    国内区域的S3存并将镜像上到存

    1. 创建国内区域的S3存储桶

    aws s3api create-bucket --bucket s3-ami-test-destination --region cn-northwest-1 --create-bucket-configuration LocationConstraint=cn-northwest-1

    {

    "Location": "<http://s3-ami-test-destination.s3.cn-northwest-1.amazonaws.com.cn/>"

    }

    2. 将下载到中转主机本地的AMI镜像上传到国内区域的S3存储桶

    aws s3 cp ami-0591c2c1b99828acb.bin s3://s3-ami-test-destination

    S3桶中原AMI

    aws ec2 create-restore-image-task --object-key ami-0591c2c1b99828acb.bin --bucket s3-ami-test-destination --name "ami-test"

    {

    "ImageId": "ami-0591c2c1b99828acb"

    }

    此时可以看到镜像创建还原成功。

  • Set up a Postfix mail server with Dovecot and Squirrelmail on Ubuntu

    Firewall access

    You will need to set your firewall(s) to allow access to the following ports:

    • SMTP: 25
    • POP3: 110
    • IMAP: 143
    • SMTP Secure: 465
    • MSA: 587
    • IMAP Secure: 993
    • POP3 Secure: 995

    By default, the Cloud Panel Firewall denies access to all but the most commonly-used ports.

    Install Postfix

    To install Postfix, first update your packages:

    sudo apt-get update

    Then install Postfix:

    sudo apt-get install postfix

    Postfix is installed by default on most Ubuntu 16.04 systems, so this command will most likely exit with a message that postfix is already the newest version (3.1.0-3)..

    If Postfix continues with an installation, simply accept all of the defaults at each prompt to complete the process.

    Configure Postfix

    After the installation is complete, run the command to configure Postfix:

    sudo dpkg-reconfigure postfix

    Enter the following values at the prompts, replacing example.com with your own domain name. Use the up arrow and down arrow to move up and down to highlight answers, and Enter to select your answer.

    1. Select OK to proceed.
    2. Choose Internet Site.
    3. System Mail Name: example.com
    4. Root and postmaster mail recipient: root
    5. Other destinations for mail: example.com, localhost.example.com, localhost
    6. Force synchronous updates on mail queue?: No
    7. Local networks: 127.0.0.0/8
    8. Use procmail for local delivery?: No
    9. Mailbox size limit (bytes): 0
    10. Local address extension character: +
    11. Internet protocols to use: all

    After the initial Postfix configuration has been done, you can change Postfix settings with the command:

    sudo postconf -e '[new setting]'

    Create an SSL certificate

    We will create a self-signed SSL certificate to secure incoming and outgoing email connections:

    sudo openssl req -x509 -nodes -newkey rsa:2048 -keyout mailserver.key -out mailserver.crt -nodes -days 365
    
    sudo openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650

    Answer the questions at the prompts, or just hit [Enter] to leave an answer blank. This command will create two files: mailserver.key and mailserver.crt.

    Create a folder for the SSL certificate files:

    sudo mkdir /etc/postfix/ssl

    Then move the files into this folder:

    sudo mv mailserver.key /etc/postfix/ssl
    sudo mv mailserver.crt /etc/postfix/ssl
    sudo mv cakey.pem /etc/postfix/ssl
    sudo mv cacert.pem /etc/postfix/ssl

    Set up SMTP AUTH

    SMTP AUTH is a basic method of securing your mail server. We strongly recommend the use of SMTP AUTH on all mail servers.

    To begin, use the following commands to configure Postfix to use SMTP AUTH:

    sudo postconf -e 'smtpd_sasl_local_domain ='
    sudo postconf -e 'smtpd_sasl_auth_enable = yes'
    sudo postconf -e 'smtpd_sasl_security_options = noanonymous'
    sudo postconf -e 'broken_sasl_auth_clients = yes'
    sudo postconf -e 'smtpd_recipient_restrictions =  permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
    sudo postconf -e 'inet_interfaces = all'
    sudo postconf -e 'smtp_tls_security_level = may'
    sudo postconf -e 'smtpd_tls_security_level = may'
    sudo postconf -e 'smtpd_tls_auth_only = no'
    sudo postconf -e 'smtp_tls_note_starttls_offer = yes'
    sudo postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/mailserver.key'
    sudo postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/mailserver.crt'
    sudo postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
    sudo postconf -e 'smtpd_tls_loglevel = 1'
    sudo postconf -e 'smtpd_tls_received_header = yes'
    sudo postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
    sudo postconf -e 'tls_random_source = dev:/dev/urandom'

    Replace example.com with your own domain name:

    sudo postconf -e 'myhostname = example.com' 

    Next, create the file /etc/postfix/sasl/smtpd.conf and open it for editing:

    sudo nano /etc/postfix/sasl/smtpd.conf

    Add the following content:

    pwcheck_method: saslauthd
    mech_list: plain login

    After you have finished configuring Postfix, restart the Postfix daemon with the command:

    sudo systemctl restart postfix

    Install SASL

    Postfix will use SASL to handle the authentication with SMTP AUTH. Now that Postfix has been configured to use SMTP AUTH, install SASL with the command:

    sudo apt-get install libsasl2-2 sasl2-bin libsasl2-modules

    After the installation is done, edit /etc/default/saslauthd:

    sudo nano /etc/default/saslauthd

    Scroll down to the line:

    # Should saslauthd run automatically on startup? (default: no)
    START=no

    Change START to yes:

    # Should saslauthd run automatically on startup? (default: no)
    START=yes

    Below that line, add the following three lines:

    PWDIR="/var/spool/postfix/var/run/saslauthd"
    PARAMS="-m ${PWDIR}"
    PIDFILE="${PWDIR}/saslauthd.pid"

    Scroll down to the bottom of the file to the line:

    OPTIONS="-c -m /var/run/saslauthd"

    Change the last line to read:

    OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"

    Save and exit the file.

    Next, run the following command to update the dpkg state:

    sudo dpkg-statoverride --force --update --add root sasl 755 /var/spool/postfix/var/run/saslauthd

    Note: If you get an error message that /var/spool/postfix/var/run/saslauthd does not exist, ignore it. This directory will be created when you start the SASL daemon.

    Create a symlink for the config file:

    sudo ln -s /etc/default/saslauthd /etc/saslauthd

    And finally, start the SASL daemon:

    sudo /etc/init.d/saslauthd start
  • 启用cgroups v2

    Azure 笔记

    支持cgroup v2的内核环境,如Ubuntu 20.04LTS

    判断系统是否启用了cgroups v2

    cat /sys/fs/cgroup/cgroup.controllers

    如果提示not found,说明是v1

    若已启用v2则会打印出生效中的控制器,例如:

    调整grub linux内核引导参数:

    sudo vim /etc/default/grub

    在GRUB_CMDLINE_LINUX一行添加:

    systemd.unified_cgroup_hierarchy=1

    更新grub配置,并重启系统

    sudo update-grub

    sudo reboot

    重启后系统将使用cgroups v2作为默认控制器

    使用以下命令确认是否开启

    mount | grep cgroup2

  • 开启 BBR

    开启 BBR

    开机后 uname -r 看看是不是内核 >= 4.9。
    执行 lsmod | grep bbr,如果结果中没有 tcp_bbr 的话就先执行:

    sudo modprobe tcp_bbr
    echo "tcp_bbr" | sudo tee --append /etc/modules-load.d/modules.conf
    

    执行

    echo "net.core.default_qdisc=fq" | sudo tee --append /etc/sysctl.conf
    echo "net.ipv4.tcp_congestion_control=bbr" | sudo tee --append /etc/sysctl.conf
    

    保存生效
    sudo sysctl -p
    执行

    sysctl net.ipv4.tcp_available_congestion_control
    sysctl net.ipv4.tcp_congestion_control
    

    如果结果都有 bbr,则证明你的内核已开启 BBR。
    执行 lsmod | grep bbr,看到有 tcp_bbr 模块即说明 BBR 已启动。

  • CentOS 7 TCP BBR

    CentOS 7

    • 下载更换内核,最新内核查看这里
    rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

    To install ELRepo for RHEL-8 or CentOS-8:
    yum install https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm

    To install ELRepo for RHEL-7, SL-7 or CentOS-7:
    yum install https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm

    To install ELRepo for RHEL-6, SL-6 or CentOS-6:
    yum install https://www.elrepo.org/elrepo-release-6.el6.elrepo.noarch.rpm

    
    yum --enablerepo=elrepo-kernel install kernel-ml -y
    
    • 查看内核是否安装成功
    rpm -qa | grep kernel
    
    • 删除旧内核(可选)
    rpm -ev 旧内核
    
    • 更新 grub 系统引导文件并重启
    egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
    grub2-set-default 0  # default 0 表示第一个内核设置为默认运行, 选择最新内核就对了
    reboot
  • 转:BBR for CentOS 7/debian8 整合分享

    Centos7转自源网站
    http://www.hostloc.com/thread-342505-1-1.html
    Debian8转自源网站
    http://www.awkxy.com/archives/721
     


    Centos7
    先把/etc/sysctl.conf 文件中 关于 net.ipv4.tcp_congestion_control的配置注释掉。(Azure的CentOS 7本来就没有)
    wget http://mirrors.kernel.org/debian/pool/main/l/linux/linux-image-4.13.0-1-amd64_4.13.4-1_amd64.deb
    ar x linux-image-4.13.0-1-amd64_4.13.4-1_amd64.deb
    tar -Jxf data.tar.xz
    install -m644 boot/vmlinuz-4.13.0-1-amd64 /boot/vmlinuz-4.13.0-1-amd64
    cp -Rav lib/modules/4.13.0-1-amd64 /lib/modules
    depmod -a 4.13.0-1-amd64
    dracut -f -v –hostonly -k ‘/lib/modules/4.13.0-1-amd64’ /boot/initramfs-4.13.0-1-amd64.img 4.13.0-1-amd64
    grub2-mkconfig -o /boot/grub2/grub.cfg
    #开启bbr
    echo “net.core.default_qdisc=fq” >> /etc/sysctl.conf
    echo “net.ipv4.tcp_congestion_control=bbr” >> /etc/sysctl.conf
    #调整内核启动顺序
    grub2-set-default “CentOS Linux (4.13.0-1-amd64) 7 (Core)”
    grub2-editenv list
    grub2-mkconfig -o /boot/grub2/grub.cfg
    然后reboot


    ubuntu/debian系统
    下载新内核:
    wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.11.2/linux-image-4.11.2-041102-generic_4.11.2-041102.201705201036_amd64.deb
    安装内核:
    dpkg -i linux-image-4.11.[Tab补全]
    删除其他内核:
    dpkg -l|grep linux-image
    apt-get remove linux-image-4.9.0-040900rc8-generic #删4.11.0以外的旧内核
    apt-get remove linux-image-4.11.0-trunk-amd64 #删4.11.0以外的旧内核
    更新 grub 系统引导文件并重启(Azure虚机执行update-grub报错时看下面)
    update-grub
    reboot
    开启BBR
    echo “net.core.default_qdisc=fq” >> /etc/sysctl.conf
    echo “net.ipv4.tcp_congestion_control=bbr” >> /etc/sysctl.conf
    sysctl -p
    sysctl net.ipv4.tcp_available_congestion_control
    查看下是否有BBR:lsmod | grep bbr


    Azure的Debian8 没有dracut
    apt-get install dracut
    Azure的Debian8 grub安装不全
    sudo apt-get update; sudo apt-get install –reinstall grub
    mkdir /boot/grub
    Linux小技巧
    1,查看发行版
    lsb_release -a
    2,查看内核
    cat /proc/version
    uname -a
    uname -r
    3,查看系统位数
    file /bin/ls
    4,验证BBR
    sysctl net.ipv4.tcp_available_congestion_control
    sysctl net.ipv4.tcp_congestion_control
     

  • Azure上Linux虚拟机加载磁盘

    1,首先在Azure的Portal上挂载新的硬盘
    Azure磁盘
    2,以新加的磁盘为SDC为例。
    fdisk  /dev/sdc      进入到新添加的硬盘中
    Command (m for help): n     创建新分区
    Command action
    e   extended
    p   primary partition (1-4)
    p                          创建主分区
    Partition number (1-4): 1          新建的主分区序号
    First cylinder (1-10402, default 1):
    Using default value 1
    Last cylinder or +size or +sizeM or +sizeK (1-10402, default 10402) 按照默认选择会占满整个分区
    Command (m for help): w       保存创建的主分区
    3,使新创建的分区在系统中立即生效
    partprobe
    4,格式化新创建的分区
    mkfs.ext3 /dev/sdc1
    5,自动挂载
    使用blkid命令查看磁盘UUID
    显示类似如下
    /dev/sdb1: UUID=”74e83ff5-5424-4691-af3e-8d3338af63e2″ TYPE=”ext4″ PARTUUID=”b57 48cc3-01″
    /dev/sda1: UUID=”55d984c8-7c8a-4dbe-bde6-a7bb5b9a24fc” TYPE=”ext4″
    /dev/sdc1: UUID=”bdd05fda-f411-40d4-8ff0-dca82bb17e1a” TYPE=”ext3″ PARTUUID=”383 cb8a4-01″
    编辑/etc/fstab
    # /etc/fstab: static file system information.
    UUID=55d984c8-7c8a-4dbe-bde6-a7bb5b9a24fc / ext4 errors=remount-ro 0 1
    UUID=bdd05fda-f411-40d4-8ff0-dca82bb17e1a /mnt/data ext3 defaults 0 0

  • Azure上Linux虚拟机原生挂载Swap分区的办法

    编辑/etc/waagent.conf文件。
    找到已下两行修改。其中SwapSize用MB计量51200=50GB
    ResourceDisk.EnableSwap=y
    ResourceDisk.SwapSizeMB=51200

  • 转:Custom linux boot up screen

    Displaying an image during boot instead of the default command line scrolling text

    This is based on the guide here.
    This solution works but there are a few seconds of text shown before the boot image appears.

    Install fbi
    
    sudo apt-get install fbi
    
    Copy the splashscreen image to be used

    Copy your custom splash image into: /etc/ and name it “splash.png”.
    Presumably the resolution to use is 1920x1080px.
    Create A Script

    
    sudo nano
    

    Paste the following into the text editor:

    
    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          asplashscreen
    # Required-Start:
    # Required-Stop:
    # Should-Start:
    # Default-Start:     S
    # Default-Stop:
    # Short-Description: Show custom splashscreen
    # Description:       Show custom splashscreen
    ### END INIT INFO
    do_start () {
        /usr/bin/fbi -T 1 -noverbose -a /etc/splash.png
        exit 0
    }
    case "$1" in
      start|"")
        do_start
        ;;
      restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
      stop)
        # No-op
        ;;
      status)
        exit 0
        ;;
      *)
        echo "Usage: asplashscreen [start|stop]" >&2
        exit 3
        ;;
    esac
    :
    

    IMPORTANT – If copying and pasting via SSH check it has pasted in correctly (pasting via FiseSSH for us caused the # lines and the esac line to be altered and need modifying back to be correct)
    Exit and save the file as: /etc/init.d/asplashscreen
    (using a name starting with ‘a’ will ensure it runs first)
    Finally make the script executable and install it for init mode:

    
    sudo chmod a+x /etc/init.d/asplashscreen
    sudo insserv /etc/init.d/asplashscreen
    

    Thats it:

    
    sudo reboot
    

     

    Getting Out Of Black Screen

    If you get a black screen at the end of booting (if you’ve not setup auto running the GUI etc) use CTRL + ALT + F2 to get the command prompt

  • 转:SQL Server 2012 各版本功能比较

    SQL Server 2012 各版本功能比较 – zock – 博客园

    有关不同版本的 SQL Server 2012 所支持的功能的详细信息。

    功能名称 Enterprise 商业智能 Standard Web Express with Advanced Services Express with Tools Express
    单个实例使用的最大计算能力(SQL Server 数据库引擎)1 操作系统最大值 限制为 4 个插槽或 16 核,取二者中的较小值 限制为 4 个插槽或 16 核,取二者中的较小值 限制为 4 个插槽或 16 核,取二者中的较小值 限制为 1 个插槽或 4 核,取二者中的较小值 限制为 1 个插槽或 4 核,取二者中的较小值 限制为 1 个插槽或 4 核,取二者中的较小值
    单个实例使用的最大计算能力(Analysis Services、Reporting Services)1 操作系统支持的最大值 操作系统支持的最大值 限制为 4 个插槽或 16 核,取二者中的较小值 限制为 4 个插槽或 16 核,取二者中的较小值 限制为 1 个插槽或 4 核,取二者中的较小值 限制为 1 个插槽或 4 核,取二者中的较小值 限制为 1 个插槽或 4 核,取二者中的较小值
    利用的最大内存(SQL Server 数据库引擎) 操作系统支持的最大值 64 GB 64 GB 64 GB 1 GB 1 GB 1 GB
    利用的最大内存 (Analysis Services) 操作系统支持的最大值 操作系统支持的最大值 64 GB 不适用 不适用 不适用 不适用
    利用的最大内存 (Reporting Services) 操作系统支持的最大值 操作系统支持的最大值 64 GB 64 GB 4 GB 不适用 不适用
    最大关系数据库大小 524 PB 524 PB 524 PB 524 PB 10 GB 10 GB 10 GB

    高可用性(始终启用)

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    服务器内核支持1

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    日志传送

    支持

    支持

    支持

    支持

    数据库镜像

    支持

    支持(仅支持“完全”安全级别)

    支持(仅支持“完全”安全级别)

    仅见证服务器

    仅见证服务器

    仅见证服务器

    仅见证服务器

    故障转移群集

    支持(节点支持:操作系统最大值)

    支持(节点支持:2)

    支持(节点支持:2)

    备份压缩

    支持

    支持

    支持

    数据库快照

    支持

    AlwaysOn 可用性组

    支持

    SQL Server 多子网群集

    支持

    连接控制器 (Connection Director)

    支持

    联机页面和文件还原

    支持

    联机索引

    支持

    联机架构更改

    支持

    快速恢复

    支持

    镜像备份

    支持

    热添加内存和 CPU2

    支持

     

    伸缩性和性能

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    多实例支持

    50

    50

    50

    50

    50

    50

    50

    表和索引分区

    支持

    数据压缩

    支持

    资源调控器

    支持

    分区表并行度

    支持

    多个 Filestream 容器

     

    安全性

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    基本审核

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    精细审核

    支持

    透明数据库加密

    支持

    可扩展的密钥管理

    支持

     

    复制

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    SQL Server 更改跟踪

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    合并复制

    支持

    支持

    支持

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    事务复制

    支持

    支持

    支持

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    快照复制

    支持

    支持

    支持

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    支持(仅订阅服务器)

    异类订阅服务器

    支持

    支持

    支持

    Oracle 发布

    支持

    对等事务复制

    支持

     

    管理工具

    能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    SQL 管理对象 (SMO)

    支持

    支持

    支持1

    支持

    支持

    支持

    支持

    SQL 配置管理器

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    SQL CMD(命令提示工具)

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    SQL Server Management Studio

    支持

    支持

    支持

    支持

    支持

    支持

    分布式重播 – 管理工具

    支持

    支持

    支持

    支持

    支持

    支持

    分布式重播 – 客户端

    支持

    支持

    支持

    支持

    分布式重播 – 控制器

    支持(Enterprise 版支持最多 16 个客户端、Developer 版仅支持 1 个客户端)

    支持(仅支持 1 个客户端)

    支持(仅支持 1 个客户端)

    支持(仅支持 1 个客户端)

    SQL Profiler

    支持

    支持

    支持

    不支持2

    不支持2

    不支持2

    不支持2

    SQL Server 代理

    支持

    支持

    支持

    支持

    Microsoft System Center Operations Manager 管理包

    支持

    支持

    支持

    支持

    数据库优化顾问 (DTA)

    支持

    支持

    支持3

    支持3

     

    RDBMS 可管理性

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    用户实例

    支持

    支持

    支持

    专用管理连接

    支持

    支持

    支持

    支持

    支持(受跟踪标志控制)

    支持(受跟踪标志控制)

    支持(受跟踪标志控制)

    PowerShell 脚本支持

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    SysPrep 支持1

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    支持数据层应用程序组件操作 – 提取、部署、升级、删除

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    策略自动执行(检查计划和更改)

    支持

    支持

    支持

    支持

    性能数据收集器

    支持

    支持

    支持

    支持

    能够作为多实例管理中的托管实例注册

    支持

    支持

    支持

    支持

    标准性能报表

    支持

    支持

    支持

    支持

    计划指南和计划指南的计划冻结

    支持

    支持

    支持

    支持

    使用 NOEXPAND 提示的索引视图的直接查询

    支持

    支持

    支持

    支持

    自动的索引视图维护

    支持

    支持

    支持

    支持

    分布式分区视图

    支持

    部分支持。 不能更新分布式分区视图

    部分支持。 不能更新分布式分区视图

    部分支持。 不能更新分布式分区视图

    部分支持。 不能更新分布式分区视图

    部分支持。 不能更新分布式分区视图

    部分支持。 不能更新分布式分区视图

    并行索引操作

    支持

    查询优化器自动使用索引视图

    支持

    并行一致性检查

    支持

    SQL Server 实用工具控制点

    支持

    开发工具

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    Microsoft Visual Studio 集成

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    SQL Server Developer Studio

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    Intellisense(Transact-SQL 和 MDX)1

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    SQL Server 数据工具 (SSDT)

    支持

    支持

    支持

    支持

    支持

    SQL 查询编辑和设计工具1

    支持

    支持

    支持

    版本控制支持1

    支持

    支持

    支持

    MDX 编辑、调试和设计工具1

    支持

    支持

    支持

    可编程性

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    公共语言运行时 (CLR) 集成

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    本机 XML 支持

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    XML 索引

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    MERGE 和 UPSERT 功能

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    FILESTREAM 支持

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    FileTable

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    日期和时间数据类型

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    国际化支持

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    全文和语义搜索

    支持

    支持

    支持

    支持

    支持

    查询中的语言规范

    支持

    支持

    支持

    支持

    支持

    Service Broker(消息传递)

    支持

    支持

    支持

    不支持(仅客户端)

    不支持(仅客户端)

    不支持(仅客户端)

    不支持(仅客户端)

    Web 服务(HTTP/SOAP 端点)

    支持

    支持

    支持

    支持

    T-SQL 端点

    支持

    支持

    支持

    支持

     

    Integration Services

    功能

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    SQL Server 导入和导出向导

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    内置数据源连接器

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    SSIS 设计器和运行时

    支持

    支持

    支持

    基本转换

    支持

    支持

    支持

    基本数据探查工具

    支持

     

    Integration Services – 高级适配器

    能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    高性能 Oracle 目标

    支持

    高性能 Teradata 目标

    支持

    SAP BW 源和目标

    支持

    数据挖掘模型定型目标适配器

    支持

    维度处理目标适配器

    支持

    分区处理目标适配器

    支持

     

    Integration Services – 高级转换

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    持久性(高性能)查找

    支持

    数据挖掘查询转换

    支持

    模糊分组和查找转换

    支持

    术语提取和查找转换

    支持

     

    Master Data Services

    注意

    • Master Data Services 仅适用于 Business Intelligence 版和 Enterprise 版的 64 位版本。
    • 只有从 SQL Server 2008 R2 Enterprise 升级时 SQL Server 2012 Enterprise 才可用。

     

    功能

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    Master Data Services 数据库

    支持

    支持

    主数据管理器 Web 应用程序

    支持

    支持

     

    数据仓库

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    在无需数据库的情况下创建多维数据集

    支持

    支持

    支持

    自动生成临时和数据仓库架构

    支持

    支持

    支持

    变更数据捕获

    支持

    星型联接查询优化

    支持

    可扩展的只读 Analysis Services 配置

    支持

    主动缓存

    支持

    针对已分区表和索引的并行查询处理

    支持

    列存储索引

    支持

     

    Analysis Services

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    可扩展的共享数据库(附加/分离,只读数据库)

    支持

    支持

    高可用性

    支持

    支持

    支持

    可编程性(AMO、ADOMD.Net、OLEDB、XML/A、ASSL)

    支持

    支持

    支持

     

    BI 语义模型(多维)

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    半累加性度量值

    支持

    支持

    层次结构

    支持

    支持

    支持

    KPI

    支持

    支持

    支持

    透视

    支持

    支持

    操作

    支持

    支持

    支持

    帐户智能

    支持

    支持

    支持

    时间智能

    支持

    支持

    支持

    自定义汇总

    支持

    支持

    支持

    写回多维数据集

    支持

    支持

    支持

    写回维度

    支持

    支持

    写回单元

    支持

    支持

    支持

    钻取

    支持

    支持

    支持

    高级层次结构类型(父子、不规则层次结构)

    支持

    支持

    支持

    高级维度(引用维度、多对多维度)

    支持

    支持

    支持

    链接度量值和维度

    支持

    支持

    转换

    支持

    支持

    聚合

    支持

    支持

    支持

    多个分区

    支持

    支持

    支持,最多 3 个

    主动缓存

    支持

    支持

    自定义程序集(存储过程)

    支持

    支持

    支持

    MDX 查询和脚本

    支持

    支持

    支持

    基于角色的安全模型

    支持

    支持

    支持

    维度和单元级别的安全性

    支持

    支持

    支持

    可扩展字符串存储

    支持

    支持

    支持

    MOLAP、ROLAP、HOLAP 存储模式

    支持

    支持

    支持

    二进制和压缩的 XML 传输

    支持

    支持

    支持

    推送模式处理

    支持

    支持

    直接写回

    支持

    支持

    度量值表达式

    支持

    支持

     

    BI 语义模型(表格)

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    层次结构

    支持

    支持

    KPI

    支持

    支持

    半累加性度量值

    支持

    支持

    透视

    支持

    支持

    翻译

    支持

    支持

    DAX 计算、DAX 查询、MDX 查询

    支持

    支持

    行级安全性

    支持

    支持

    分区

    支持

    支持

    VertiPaq 和 DirectQuery 存储模式(仅限表格)

    支持

    支持

     

    PowerPivot for SharePoint

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    基于共享服务体系结构的 SharePoint 场集成

    支持

    支持

    用量报告

    支持

    支持

    运行状况监视规则

    支持

    支持

    PowerPivot 库

    支持

    支持

    PowerPivot 数据刷新

    支持

    支持

    PowerPivot 数据馈送

    支持

    支持

     

    数据挖掘

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    标准算法

    支持

    支持

    支持

    数据挖掘工具(向导、编辑器、查询生成器)

    支持

    支持

    支持

    交叉验证

    支持

    支持

    挖掘结构数据的筛选子集的模型

    支持

    支持

    时序:ARTXP 和 ARIMA 方法之间的自定义混和

    支持

    支持

    时序:使用新数据的预测

    支持

    支持

    无限制并发数据挖掘查询

    支持

    支持

    数据挖掘算法的高级配置和优化选项

    支持

    支持

    支持插件算法

    支持

    支持

    并行模型处理

    支持

    支持

    时序:跨序列预测

    支持

    支持

    关联规则的无限制属性

    支持

    支持

    序列预测

    支持

    支持

    Naïve Bayes、神经网络和逻辑回归的多个预测目标

    支持

    支持

     

    Reporting Services

    Reporting Services 的功能

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    支持的目录 DB SQL Server 版本

    Standard 或更高版本

    Standard 或更高版本

    Standard 或更高版本

    Web

    Express

    支持的数据源 SQL Server 版本

    所有 SQL Server 版本

    所有 SQL Server 版本

    所有 SQL Server 版本

    Web

    Express

    报表服务器

    支持

    支持

    支持

    支持

    支持

    报表设计器

    支持

    支持

    支持

    支持

    支持

    报表管理器

    支持

    支持

    支持

    支持

    支持

    基于角色的安全性

    支持

    支持

    支持

    支持

    Word 导出和 RTF 格式支持

    支持

    支持

    支持

    支持

    支持

    增强的仪表和图表

    支持

    支持

    支持

    支持

    支持

    导出到 Excel、PDF 和图像

    支持

    支持

    支持

    支持

    支持

    自定义身份验证

    支持

    支持

    支持

    支持

    支持

    作为数据馈送的报表

    支持

    支持

    支持

    支持

    支持

    模型支持

    支持

    支持

    支持

    支持

    为基于角色的安全性创建自定义角色

    支持

    支持

    支持

    模型项安全性

    支持

    支持

    支持

    无限制链接点击

    支持

    支持

    支持

    共享组件库

    支持

    支持

    支持

    电子邮件和文件共享订阅和计划

    支持

    支持

    支持

    报表历史记录、执行快照和缓存

    支持

    支持

    支持

    SharePoint 集成

    支持

    支持

    支持

    远程和非 SQL 数据源支持1

    支持

    支持

    支持

    数据源、传递和呈现、RDCE 可扩展性

    支持

    支持

    支持

    数据驱动报表订阅

    支持

    支持

    扩展部署(Web 场)

    支持

    支持

    警报2

    支持

    支持

    Power View2

    支持

    支持

     

    报表服务器数据库的服务器版本要求

    创建报表服务器数据库时,并非所有版本的 SQL Server 均可用来承载数据库。 下表显示了可用于特定 Reporting Services 版本的数据库引擎版本。

    对于此 SQL Server Reporting Services 版本

    使用此版本的数据库引擎实例来承载数据库

    Enterprise

    Standard Edition、Business Intelligence Enterprise Edition(本地或远程)

    商业智能

    Standard Edition、Business Intelligence Enterprise Edition(本地或远程)

    Standard

    Standard Edition、Enterprise Edition(本地或远程)

    Web

    Web Edition(仅用于本地)

    Express with Advanced Services

    Express with Advanced Services(仅用于本地)。

    Evaluation

    Evaluation

     

    商业智能客户端

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    报表生成器

    支持

    支持

    支持

    用于 Excel 和 Visio 2010 的数据挖掘外接程序

    支持

    支持

    支持

    PowerPivot for Excel 2010

    支持

    支持

    Master Data Services 用于 Excel 的外接程序

    支持

    支持

     

    空间和位置服务

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    空间索引

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    平面和大地测量数据类型

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    高级空间库

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    导入/导出业界标准的空间数据格式

    支持

    支持

    支持

    支持

    支持

    支持

    支持

     

    其他数据库服务

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    SQL Server Migration Assistant

    支持

    支持

    支持

    支持

    支持

    支持

    支持

    数据库邮件1

    支持

    支持

    支持

    支持

     
     

     

    其他组件

    功能名称

    Enterprise

    商业智能

    Standard

    Web

    Express with Advanced Services

    Express with Tools

    Express

    Data Quality Services

    支持

    支持

    StreamInsight

    StreamInsight Premium Edition

    StreamInsight Standard Edition

    StreamInsight Standard Edition

    StreamInsight Standard Edition

    StreamInsight HA

    StreamInsight Premium Edition