小编par*_*hon的帖子

如何使用 MSSQL,重建所有表上的所有索引?MSSQL Server 2008

我有一个 mssql 数据库,我们称之为:mssqlDB01。我的任务是对所有表执行碎片整理。这个数据库有几百个表,每个表都有 1 到 15 个索引。


谷歌让我发现了一种对每个表的所有索引进行碎片整理的做法,但我无法弄清楚如何在所有表上执行此操作。

ALTER INDEX ALL ON TABLENAME REBUILD;
Run Code Online (Sandbox Code Playgroud)

我要找的是

ALTER INDEX ALL ON * REBUILD; 
Run Code Online (Sandbox Code Playgroud)

但它抱怨

Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '*'.`
Run Code Online (Sandbox Code Playgroud)

下面让我找到我的数据库中的所有表

SELECT * FROM information_schema.tables WHERE TABLE_TYPE='BASE TABLE'
Run Code Online (Sandbox Code Playgroud)

我可以以某种方式将其推送到命令中吗?

ALTER INDEX ALL ON (SELECT * FROM information_schema.tables WHERE TABLE_TYPE='BASE TABLE'; ) REBUILD;
Run Code Online (Sandbox Code Playgroud)

fragmentation sql-server

9
推荐指数
2
解决办法
4万
查看次数

如何让 ESXi 5.5 仅从 ssh/CLI 自动启动虚拟机?

我对 ESXi 服务器的唯一访问权限是通过 SSH。我无法使用 vCenter 或 Web 界面

vmware 提供了一篇文章:
kb.vmware.com——确定虚拟机是否配置为自动启动(1000163)

但这篇文章的内容似乎与我的 ESXi 服务器完全无关。有问题的文件在那里,但并非所有行都按照文档所说的那样出现。

VMware 说明:

Log in as root to your ESX host with SSH.
Open the /etc/vmware/hostd/vmAutoStart.xml file in text editor.
Search the file for the entry:
<enabled>true</enabled>

Note: If you find this entry, the autostart functionality is enabled. 
If you do not find this entry, the functionality is disabled.

To disable autostart for all virtual machines on the host, edit this entry to:
<enabled>false</enabled>

If …
Run Code Online (Sandbox Code Playgroud)

command-line-interface vmware-esxi

6
推荐指数
1
解决办法
8415
查看次数

如何配置 BIND 将反向 DNS 查询转发到另一个 DNS 服务器?

我的环境中有 2 个域。其中之一是“myproductlab.local”的活动目录域,位于 10.60.0.0/16
然后我有一个为域“mytestlab.local”运行bind9的 debian 盒子,
我已在named.conf.local中添加了一个条目:

zone "60.10.in-addr.arpa" {
        type forward;
        forwarders {
                10.60.10.5;
                10.60.10.7;
                10.60.10.9;

        };
};
zone "myproductionlab.local" {
        type forward;
        forwarders {
                10.60.10.5;
                10.60.10.7;
                10.60.10.9;

        };
};
Run Code Online (Sandbox Code Playgroud)

debian 盒子配置为 DNS 解析为 127.0.0.1,并且全局没有配置转发器。

名称解析解析得很好:

nslookup mymachine.myproductionlab.local  
Server:     127.0.0.1
Address:    127.0.0.1#53
Non-authoritative answer:
Name:   mymachine.myproductionlab.local
Address: 10.60.10.200
Run Code Online (Sandbox Code Playgroud)

并从查询日志中:

client 127.0.0.1#36076 (mymachine.myproductinlab.local): query: mymachine.myproductionlab.local IN A + (127.0.0.1)
Run Code Online (Sandbox Code Playgroud)

但反向 DNS 不被转发:

nslookup 10.60.10.200
Server:     127.0.0.1
Address:    127.0.0.1#53
** server can't find 200.10.60.10.in-addr.arpa: NXDOMAIN
Run Code Online (Sandbox Code Playgroud)

并从查询日志中:

client 127.0.0.1#40295 (200.10.60.10.in-addr.arpa): query: …
Run Code Online (Sandbox Code Playgroud)

bind reverse-dns forwarding

5
推荐指数
3
解决办法
2万
查看次数