摘要:
--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... 阅读全文
2005年8月3日 #
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... 阅读全文
摘要:
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... 阅读全文
摘要:
刚才在QA环境创建SQL replication 的时候报错,大致如下:Error 14274: 无法添加、更新或删除从MSX服务器上发起的作业.导致Replication不能够成功,如按如下角本解决:For example:tsql02\d2shp01SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE GO use msdb;gobe... 阅读全文
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... 阅读全文
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... 阅读全文
摘要:
-- 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... 阅读全文
摘要:
-- ----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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文