参考sys.dm_db_index_physical_stats 检查索引碎片情况 1.SELECT2.OBJECT_NAME(object_id) as objectname,3.object_id AS objectid,4.index_id AS indexid,5.partition_number AS partitionnum,6.avg_fragmentation_in_percent AS fra7.FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL , NULL, ‘LIMITED')8.WHERE avg_fragmentation_in_percent 10.0 AND index_id 0;9. 10.使用脚本中的 sys....[ 查看全文 ]
"五一"时进行了系统重装,在没有卸载SQL Server 2008情况下尝试安装SQL Server 2008r2 ,安装提示成功但提示出现几个错误,发现没有找到SSMS,以及在SQL SERVER配置管理器里的服务也只有可怜的一项,瞬间感觉不妙,没办法只能重新卸载安装,在网上无绪找到了几个介绍卸载方法的文档,看似卸载完了,可但自己再安装的时候又出现了问题,出现了SSMS但配置管理器服务也只有一项,这种情况SSMS是连接不了服务器的...[ 查看全文 ]
Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please ...[ 查看全文 ]
我们在还原或删除Windows Server 2008 R2数据库时经常出现因为数据库正在使用,所以无法获得对数据库的独占访问权等错误,非常烦恼,今天就教大家一招终极解决方法。 只需要新建一个查询,在里面执行下面代码即可: 代码如下: ALTER DATABASE 你的数据库名称 SET OFFLINE WITH ROLLBACK IMMEDIATE ALTER DATABASE 你的数据库名称 SET OnLINE [ 查看全文 ]