博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  MSSQL

摘要:EXEC sp_resetstatus 'DBname';ALTER DATABASE DBname SET EMERGENCYDBCC checkdb('DBname')ALTER DATABASE DBname SET SINGLE_USER WITH ROLLBACK IMMEDIATEDBCC CheckDB ('DBname', REPAIR_ALLOW_DATA_LOSS)ALTER DATABASE DBname SET MULTI_USER参考:http://www.codeproject.com/KB/reporting-ser 阅读全文

posted @ 2011-06-16 15:56 nzperfect 阅读(456) 评论(0) 推荐(0)

摘要:4G 内存 32bit win2k3+sql2k8 sp1运行一段时间后,在添加字段或修改字段长度时:Failed to initialize the Common Language Runtime (CLR) v2.0.50727 with HRESULT 0x80004005. You need to restart SQL Server to use CLR integration features.重启SQL Server后,error有:AppDomain 2 (mssqlsystemresource.dbo[runtime].1) created.AppDomain 3 (mss. 阅读全文

posted @ 2011-06-14 13:56 nzperfect 阅读(1812) 评论(0) 推荐(0)

摘要:How to add an article to an existing Transactional Subscription initialized through backup添加新表:1.将要发布的新表添加至已存在发布项,之后再将其删除,这样操作,可以避免考虑not for replication问题2.在发布库生成该表的create脚本,到订阅库去执行来生成该表3.停止 logreader job.4.使用ssis等方法将该表数据从发布库导入订阅库,注意,确保该表在导数据期间和在添加到发布项之前,不能再有改变,否则需要再用tablediff来追数据5.将该表使用界面或脚本添加至已存在的 阅读全文

posted @ 2011-06-10 15:01 nzperfect 阅读(324) 评论(0) 推荐(0)

摘要:初始化订阅: 1.使用界面在发布服务器上建立发布项,勾选“立即创建快照并使快照保持可用状态,以初始化订阅”。 即: @immediate_sync = N'true'2.使用界面修改发布项的"允许从备份文件初始化"为true. 即:@allow_initialize_from_backup = N'true'3.为前发布数据库全一个全备,一个事务log备份'd:\DBBak\repl.trn'4.在订阅服务器用发布库全备还原出一个订阅库,状态norecovery,之后再还原发布的log备份,状态recovery5.使用脚本命令 阅读全文

posted @ 2011-06-09 15:48 nzperfect 阅读(554) 评论(0) 推荐(0)

摘要:http://connect.microsoft.com/SQLServer/feedback/details/334180/data-collector-remove-data-collector-to-remove-associated-objectsAfter the data collector is configured, the data collector can be disabled but not removed. This means that all objects created by the data collector will remain on the ins 阅读全文

posted @ 2010-12-22 16:21 nzperfect 阅读(1410) 评论(0) 推荐(0)

摘要:FIX: "There is insufficient system memory in resource pool 'internal' to run this query" error message when you run a full-text query that uses compound words in Microsoft SQL Server 2008 or in Micros... 阅读全文

posted @ 2010-11-26 10:54 nzperfect 阅读(2371) 评论(0) 推荐(0)

摘要:原址:http://blog.csdn.net/Garnett_KG/archive/2010/05/22/5615865.aspx 阅读全文

posted @ 2010-07-01 10:13 nzperfect 阅读(452) 评论(1) 推荐(0)

摘要:SQL Server 2008 R2 Pricing原文:http://www.microsoft.com/sqlserver/2008/en/us/pricing.aspxMicrosoft SQL Server licensing provides the option to purchase SQL Server 2008 R2 under a Server/CAL licensing mo... 阅读全文

posted @ 2010-06-01 16:32 nzperfect 阅读(541) 评论(0) 推荐(0)

摘要:很久没写blog,不是懒,实在是最近我这的访问速度不好,用firefox经常上传不了图片 .......今天无意发现了SQL Server 2008 Datetime Cast 成 Date 类型可以使用索引,分享一下:测试环境:[代码]由上面的T-sql可以看出,如果我们查 2010年5月27的数据,应该只有一条。为了更明显说明以下四种写法的区别,打开IO/执行计划开关,并且选中执行结果包含实际... 阅读全文

posted @ 2010-05-28 17:29 nzperfect 阅读(3940) 评论(11) 推荐(5)

摘要:版本号:V(Version):即版本,通常用数字表示版本号。(如:EVEREST  Ultimate v4.20.1188 Beta )Build:用数字或日期标示版本号的一种方式。(如:VeryCD eMule  v0.48a Build 071112)SP:Service Pack,升级包。(如:Windows XP SP 2/Vista SP  1) 开发阶段划分:α(Alpha)... 阅读全文

posted @ 2010-05-06 13:52 nzperfect 阅读(767) 评论(0) 推荐(0)

摘要:以下仅为参照,如果有多个实例,可能会有些许不同:本环境是SQLServer2005StandardVersion64-bit 和 SQLServer2008 StandardVersion64-bit 双实例同时安装在一个WindowsServer2008StandardVersion64-bit OS上:代码Code highlighting produced by Actipro CodeHi... 阅读全文

posted @ 2010-04-29 23:19 nzperfect 阅读(12443) 评论(5) 推荐(1)

摘要:Database Mirroring Log Compression in SQL Server 2008 Improves Throughput Author: Sanjay Mishra Reviewers: Peter Byrne, Don Vilen, Kaloian Manassiev, Burzin Patel, Eric Jacobsen Overview Da... 阅读全文

posted @ 2010-04-16 14:04 nzperfect 阅读(606) 评论(1) 推荐(0)

摘要:原文:http://www.karaszi.com/SQLServer/info_dont_shrink.asp Overview If you want the really reallyshort story, then check out this analogy - hopefully you come back here and read the full story. Introd... 阅读全文

posted @ 2010-04-16 13:59 nzperfect 阅读(512) 评论(0) 推荐(0)

摘要:Following statement can reset seed[代码]but can't reset increment.how change the identity increment of column?I can't find the simple method,now I use Following sql script to change it.[代码]please tell m... 阅读全文

posted @ 2010-04-14 16:35 nzperfect 阅读(361) 评论(0) 推荐(0)

摘要:查找未使用的非聚集索引和未使用的表.DMV:sys.dm_db_index_usage_statsThe counters are initialized to empty whenever the SQL Server (MSSQLSERVER) service is started. In addition, whenever a database is detached or is shut... 阅读全文

posted @ 2010-03-30 15:03 nzperfect 阅读(522) 评论(0) 推荐(0)

摘要:Index related DMVs and DMFs - sys.dm_db_index_usage_stats By : Dinesh Priyankara Oct 09, 2007 Examining statistics of indexes is usefulforoptimizingthe performance of queries. Statistics help us d... 阅读全文

posted @ 2010-03-25 16:59 nzperfect 阅读(1061) 评论(0) 推荐(0)

摘要:How to recreate the msdb database in SQL Server 2005? I've just spenta bunchtime researching an answer tothis question on the new disaster recovery forumbecause I couldn't find any definitive ... 阅读全文

posted @ 2010-03-24 17:48 nzperfect 阅读(381) 评论(0) 推荐(0)

摘要:Determining the appropriate memory configuration for a SQL Server platform is a task that all database administrators are required to perform. It is essential to ensuring that an appropriate level o... 阅读全文

posted @ 2010-03-12 14:48 nzperfect 阅读(719) 评论(0) 推荐(0)

摘要:What are the difference between DDL, DML and DCL commands? DDL is Data Definition Language statements. Some examples: CREATE - to create objects in the database ALTER - alters the structure of the d... 阅读全文

posted @ 2010-03-04 10:53 nzperfect 阅读(211) 评论(0) 推荐(0)

摘要:An update for Standard SKU Support for Locked Pages…. Note this article has been updated to include an update for SQL Server 2005 I posted in April that we would be releasing cumulative update... 阅读全文

posted @ 2010-03-03 17:37 nzperfect 阅读(614) 评论(0) 推荐(0)