董晓涛(David Dong)

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

2005年8月3日 #

摘要: --when you don’t know the structure that the store procedure generates:CREATE TABLE ##1(ID1 INT)CREATE TABLE ##2(ID1 INT)INSERT ##1SELECT 1CREATE PROC UP_TESTAS BEGINSELECT * FROM ##1ENDINSERT I... 阅读全文
posted @ 2005-08-03 10:44 董晓涛 阅读(845) 评论(0) 推荐(0) 编辑

2005年7月29日 #

摘要: Detect SQL timeout from ASP & Issue RollbackTransI developed an application that worked fine in development and single user testing, but when multiple users starting using the application, I ran i... 阅读全文
posted @ 2005-07-29 17:12 董晓涛 阅读(747) 评论(0) 推荐(0) 编辑

摘要: DROP DATABASE DEMO;GOCREATE DATABASE DEMO;GOUSE DEMO;GO--the database master key is always encrypted (using triple_DES) with user-supplier password--stored in the sys.symmetric_keys; and at the same t... 阅读全文
posted @ 2005-07-29 15:18 董晓涛 阅读(650) 评论(0) 推荐(0) 编辑

摘要: 刚才在QA环境创建SQL replication 的时候报错,大致如下:Error 14274: 无法添加、更新或删除从MSX服务器上发起的作业.导致Replication不能够成功,如按如下角本解决:For example:tsql02\d2shp01SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE GO use msdb;gobe... 阅读全文
posted @ 2005-07-29 15:15 董晓涛 阅读(1037) 评论(0) 推荐(0) 编辑

2005年7月22日 #

摘要: Useful LinksMicrosoft Related Resource Linkswww.microsoft.com/sql - SQL Server Home Pagewww.microsoft.com/sql/community - SQL Server Community Pagewww.microsoft.com/sql/community/newsgroups - SQL Serv... 阅读全文
posted @ 2005-07-22 16:02 董晓涛 阅读(427) 评论(0) 推荐(0) 编辑

2005年6月29日 #

摘要: Encrypting Data With the SQL Server Encrypt Function A common question I'm asked by clients is how to encrypt data and store it in SQL Server. One of the major problems I see in the field is when peop... 阅读全文
posted @ 2005-06-29 20:09 董晓涛 阅读(1010) 评论(2) 推荐(0) 编辑

摘要: -- This script converts string-based IP addresses to their numericequivalents so that it is easy to do arithmatic on them such as find anIP address that is within a range.-- -- NOTE: This function cal... 阅读全文
posted @ 2005-06-29 12:24 董晓涛 阅读(625) 评论(0) 推荐(0) 编辑

摘要: -- ----exec Up_ExportTables 'Customers'-- When you want to export a table structure to T-SQL, everyone alwayspoints you to Enterprise Manager, or a script that calls BCP.-- Sometimes, a developer eith... 阅读全文
posted @ 2005-06-29 12:21 董晓涛 阅读(628) 评论(0) 推荐(0) 编辑

摘要: CREATE TABLE [dbo].[DateDim] ( [DateKey] [int] IDENTITY (1, 1) NOT NULL , [ActualDate] [datetime] NOT NULL , [Year] [int] NOT NULL , [Quarter] [int] NOT NULL , [Month] [int] NOT NULL , [Week] [int] NO... 阅读全文
posted @ 2005-06-29 12:17 董晓涛 阅读(542) 评论(0) 推荐(0) 编辑

摘要: SET NOCOUNT ONGOuse pubs; --EXEC sp_generate_inserts 'David01' ,@from="from David01 where A='a1'"PRINT 'Using Master database'USE masterGOPRINT 'Checking for the existence of this procedure'IF (SELE... 阅读全文
posted @ 2005-06-29 12:16 董晓涛 阅读(960) 评论(0) 推荐(0) 编辑