This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec sp_configure | |
SELECT | |
( CASE WHEN ( [is_modified] = 1 ) THEN 'Dirty' ELSE 'Clean' END ) AS 'Page State' , | |
( CASE WHEN ( [database_id] = 32767 ) THEN 'Resource Database' ELSE DB_NAME ( database_id ) END ) AS 'Database Name' , | |
COUNT (*) AS 'Page Count' | |
FROM sys . dm_os_buffer_descriptors | |
GROUP BY [database_id] , [is_modified] | |
ORDER BY [database_id] , [is_modified] ; | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET NOCOUNT ON; | |
DECLARE @tablename varchar(255); | |
DECLARE @execstr varchar(400); | |
DECLARE @objectid int; | |
DECLARE @indexid int; | |
DECLARE @frag decimal; | |
DECLARE @maxfrag decimal; | |
-- Decide on the maximum fragmentation to allow for. | |
SELECT @maxfrag = 30.0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT creation_time | |
,last_execution_time | |
,total_physical_reads | |
,total_logical_reads | |
,total_logical_writes | |
, execution_count | |
, total_worker_time | |
, total_elapsed_time | |
, total_elapsed_time / execution_count avg_elapsed_time | |
,SUBSTRING(st.text, (qs.statement_start_offset/2) + 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--from http://sqlblog.com/blogs/john_paul_cook/archive/2009/08/24/using-the-processes-query-outside-of-activity-monitor.aspx | |
/* ACTIVITY MONITOR */ | |
/* Processes */ | |
SELECT | |
[Session ID] = s.session_id, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XElement pop = XElement.Parse(xml); | |
XNamespace ns = "mtvnCWExternInteropResData"; | |
string result = pop.Descendants(ns + "RedirInfo").First().Value; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install-package newtonsoft.json -version 5.0.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM "press any key to continue with deploy. This will backup current IIS set and move the site from deploy into its place. Hit the X to cancel" | |
PAUSE | |
for /f "skip=1" %%d in ('wmic os get localdatetime') do if not defined mydate set mydate=%%d | |
SET source=C:\inetpub\wwwroot\SetSight3 | |
SET destination=C:\Code\Deploy\Archive\SetSight3_%mydate:~0,8% | |
REM use Robocopy %source% %destination% /S /MOV /XF web.config /MAX:100000 to ignore web.config | |
Robocopy %source% %destination% /S /MOVE /XF serverInfo.js web.config /MAX:100000 | |
SET source=C:\Code\Deploy\SetSight3 | |
SET destination=C:\inetpub\wwwroot\SetSight3 | |
Robocopy %source% %destination% /S /XF serverInfo.js web.config /MAX:100000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
work in progress | |
cbtransfer http://192.168.2.91:8091 http://192.168.2.18:8091 -b bucket -B buckett -u Admin -p pw -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Step 1 : Declare the varaibles | |
use Northwind | |
Declare @counter int | |
Declare @RowsEffected int | |
Declare @RowsCnt int | |
Declare @CodeId int | |
Declare @OldCodeId int | |
Declare @Err int | |
SELECT @COUNTER = 1 |
OlderNewer