Statistics: Posted by lbauer — Fri Oct 13, 2006 9:31 am
Statistics: Posted by mskrobul — Fri May 26, 2006 3:00 pm
Statistics: Posted by mskrobul — Thu May 18, 2006 9:49 am
Statistics: Posted by mskrobul — Wed Nov 30, 2005 2:44 pm
Code:
USE sgdragnetGODECLARE @@name [nvarchar](64), @@stmt [nvarchar](256)DECLARE c CURSOR FOR SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAMEOPEN cSET @@stmt = N'--'FETCH FROM c INTO @@nameWHILE (@@FETCH_STATUS = 0)BEGIN -- print the name of the table PRINT N'Table Name: ' + @@name -- statement to update table's statistics SET @@stmt = N'UPDATE STATISTICS ' + @@name EXEC sp_executesql @@stmt -- next table FETCH NEXT FROM c INTO @@nameENDCLOSE cDEALLOCATE c
Code:
USE sgdragnetGODECLARE @@name [nvarchar](64), @@idx [nvarchar](64), @@stmt [nvarchar](256)DECLARE c CURSOR FOR SELECT so.name, si.name FROM sysobjects so INNER JOIN sysindexes si ON (so.id = si.id) AND ( (si.name LIKE N'pkl%') OR (si.name LIKE N'idx%') OR (si.name LIKE 'uniq%')) WHERE so.type = N'U' ORDER BY so.name, si.nameOPEN cSET @@stmt = N'--'FETCH FROM c INTO @@name, @@idxWHILE (@@FETCH_STATUS = 0)BEGIN -- print the name of the table / index PRINT N'Table Name: ' + @@name + N' Index: ' + @@idx -- statement to update defrag an index SET @@stmt = N'DBCC INDEXDEFRAG(sgdragnet, ' + @@name + ', ' + @@idx + ')' EXEC sp_executesql @@stmt FETCH NEXT FROM c INTO @@name, @@idxENDCLOSE cDEALLOCATE c
Code:
USE sgdragnetGODECLARE @@name [nvarchar](64), @@stmt [nvarchar](256)DECLARE c CURSOR FOR SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' ORDER BY TABLE_NAMEOPEN cSET @@stmt = N'--'FETCH FROM c INTO @@nameWHILE (@@FETCH_STATUS = 0)BEGIN -- print the name of the table PRINT N'Table Name: ' + @@name -- this statement will completely rebuild all indices on the table SET @@stmt = N'DBCC DBREINDEX(''sgdragnet.dbo.' + @@name + ''', '''', 0)' EXEC sp_executesql @@stmt -- next table FETCH NEXT FROM c INTO @@nameENDCLOSE cDEALLOCATE c
Statistics: Posted by jclausius — Tue Nov 01, 2005 3:05 pm
Statistics: Posted by ericsink — Mon Jul 18, 2005 1:43 pm
Code:
C:\WINDOWS\Temp\sgdragnet\dragnet.log
Older log files will be named with the convention Code:
YYMMDDdragnet.log
Statistics: Posted by jeremy_sg — Mon Apr 04, 2005 7:47 am
Statistics: Posted by mskrobul — Thu Mar 31, 2005 3:00 pm
Statistics: Posted by mskrobul — Wed Feb 09, 2005 3:20 pm
Code:
//Assuming Dragnet is the name of the web referenceDragnet.DragnetWebService _dragnetService = null;public bool Login(){int ret = -1;_dragnetService = null;CookieContainer cc = new CookieContainer();_dragnetService = new Dragnet.DragnetWebService();_dragnetService.CookieContainer = cc;_dragnetService.Url = "http://localhost/dragnet/dragnetwebservice.asmx";string strAuthTicket = null;ret = _dragnetService.LoginPlainText("username", "password", out strAuthTicket);if (ret == 0){_dragnetService.DragnetAuthValue = new Dragnet.DragnetAuth();_dragnetService.DragnetAuthValue.Token = strAuthTicket;return true;}elsereturn false;}
Statistics: Posted by mskrobul — Mon Jan 10, 2005 10:58 am