|
導(dǎo)讀數(shù)據(jù)庫,簡(jiǎn)而言之可視為電子化的文件柜——存儲(chǔ)電子文件的處所,用戶可以對(duì)文件中的數(shù)據(jù)進(jìn)行新增、截取、更新、刪除等操作。所謂“數(shù)據(jù)庫”是以一定方式儲(chǔ)存在一起、能與多個(gè)用戶共享、具有盡可能小的冗余度、與應(yīng)... 數(shù)據(jù)庫,簡(jiǎn)而言之可視為電子化的文件柜——存儲(chǔ)電子文件的處所,用戶可以對(duì)文件中的數(shù)據(jù)進(jìn)行新增、截取、更新、刪除等操作。所謂“數(shù)據(jù)庫”是以一定方式儲(chǔ)存在一起、能與多個(gè)用戶共享、具有盡可能小的冗余度、與應(yīng)用程序彼此獨(dú)立的數(shù)據(jù)集合。 下面是我用SQL的事件探察器設(shè)置跟蹤,并生成的SQL腳本 現(xiàn)在有幾個(gè)問題: 1.這個(gè)跟蹤不會(huì)產(chǎn)生數(shù)據(jù),用: select * from ::fn_trace_getinfo(1) 可以看到狀態(tài)是在運(yùn)行,但 c:\test.trc 始終是空文件 2.在事件探察器中設(shè)置篩選時(shí),ObjectType 的說明是對(duì)應(yīng)sysobjects 表的 type 列,該列是字符型,但我輸入字符時(shí)要求是數(shù)字,這個(gè)數(shù)字從那里查? 3.如果只產(chǎn)生對(duì) insert,update,delete 語句成功的跟蹤事件應(yīng)該如何設(shè)置呢? 在 事件探察器 中無相關(guān)設(shè)置,用語句設(shè)置的話只找到事件號(hào) 28, 在執(zhí)行 SELECT、INSERT 或 UPDATE 語句之前發(fā)生 4.用事件探察器建立的跟蹤,可以將跟蹤結(jié)果保存到表中,但我下面生成的SQL腳本卻不支持這個(gè)功能 --*/ /****************************************************/ /* Created by: SQL Profiler */ /* Date: 2004/06/19 16:50:05 */ /****************************************************/ -- Create a Queue declare @rc int declare @TraceID int declare @maxfilesize bigint set @maxfilesize = 5 -- Please replace the text InsertFileNameHere, with an appropriate -- filename prefixed by a path, e.g., c:\MyFolder\MyTrace. The .trc extension -- will be appended to the filename automatically. If you are writing from -- remote server to local drive, please use UNC path and make sure server has -- write access to your network share exec @rc = sp_trace_create @TraceID output, 0, N’c:\test’, @maxfilesize, NULL if (@rc != 0) goto error -- Client side File and Table cannot be scripted -- Writing to a table is not supported through the SP’s -- Set the events declare @on bit set @on = 1 exec sp_trace_setevent @TraceID, 12, 1, @on exec sp_trace_setevent @TraceID, 12, 12, @on exec sp_trace_setevent @TraceID, 12, 14, @on -- Set the Filters declare @intfilter int declare @bigintfilter bigint exec sp_trace_setfilter @TraceID, 10, 0, 7, N’SQL Profiler’ set @intfilter = 100 exec sp_trace_setfilter @TraceID, 22, 0, 4, @intfilter set @intfilter = 1 exec sp_trace_setfilter @TraceID, 23, 1, 0, @intfilter exec sp_trace_setfilter @TraceID, 35, 1, 6, N’pubs’ -- Set the trace status to start exec sp_trace_setstatus @TraceID, 1 -- display trace id for future references select TraceID=@TraceID goto finish error: select ErrorCode=@rc finish: go 全新的路由器不僅讓你更穩(wěn)定快速地連接無線網(wǎng)絡(luò),更可以讓家中的智能設(shè)備連接在一起。 |
溫馨提示:喜歡本站的話,請(qǐng)收藏一下本站!