Enable Console Lock Display Off Timeout in Windows 8

http://www.c-sharpcorner.com/UploadFile/93126e/enable-console-lock-display-off-timeout-in-windows-8/

No Comments »

SQL Server Transaction Log Size

 

DBCC SQLPERF (LOGSPACE)

 

No Comments »

Free Online recorded screen casts/video/demos

http://www.techsmith.com/jing.html

http://www.screenr.com/

No Comments »

Making a Bootable USB with Windows 7

http://www.johnpapa.net/bootfromusb/

 

  1. Grab a 4GB USB stick
  2. Format the USB stick with NTFS using the “quick format”. (You can do this via Windows Explorer)
  3. Open a CMD prompt (run it as administrator)
  4. Run DISKPART
  5. Select the volume for the USB stick. First enter LIST VOL to show the list.
  6. Then enter SELECT VOL x where x is the volume number from the list
  7. Mark the volume as active by entering ACTIVE
  8. Enter EXIT to quit the DISKPART command line (but do not close the CMD prompt window)
  9. In the CMD prompt window, go to the location where you extracted the Windows 7 files on your computer
  10. Go into the BOOT folder
  11. Type BOOTSECT /NT60 <drive letter>: where the drive letter is the USB drive.
  12. Example BOOTSECT /NT60 G:
No Comments »

Windows 8 Admin tools

If you can’t find Event Viewer, press the Windows key to go to the Start page and then invoke the Settings charm. Select Tiles, and turn on Show Administrative Tools. You’ll then see a tile for Event Viewer on your Start page.

No Comments »

Stop Debugging the Win 8 app

There is no button or command to close the app. To close the app, slide from the top edge toward the bottom edge of the screen or press Alt-F4. Go to the Start screen; notice that deploying the app adds its tile to the last group on the Start screen. To run the app again, tap or click its tile on the start screen or press F5 in Visual Studio to run the app in the debugger.

It doesn’t do much—yet—but congratulations, you’ve built your first Windows Store app!

To stop debugging the app, press Alt+Tab to return to Microsoft Visual Studio. In Visual Studio, click Debug > Stop debugging to close the app. You can’t edit in Visual Studio while you’re debugging.

No Comments »

Win 8 app dev

http://msdn.microsoft.com/en-us/library/windows/apps/hh986964.aspx

No Comments »

ODBC App Name–to show up in Ignite or SQL profiler

http://stackoverflow.com/questions/5340975/sql-server-get-at-the-name-of-the-app-causing-an-update-in-a-trigger

 

Data Source=(local);Initial Catalog=AdventureWorks; Integrated Security=True;Application Name="My Application"

No Comments »

T-SQL Paging

http://joelabrahamsson.com/entry/my-favorite-way-to-do-paging-with-t-sql

   1:  DECLARE @intPage int 
   2:  DECLARE @intPageSize int 
   3:   
   4:  Set @intPage = 2;
   5:  Set @intPageSize = 10;
   6:   
   7:  DECLARE @intStartRow int;
   8:  DECLARE @intEndRow int;
   9:   
  10:  SET @intStartRow = (@intPage -1) * @intPageSize + 1;
  11:  SET @intEndRow = @intPage * @intPageSize;    
  12:  WITH subset AS (
  13:   
  14:  SELECT  
  15:          ROW_NUMBER() OVER(ORDER BY creation_time DESC ) as intRow, --order by this column only
  16:          COUNT(1) OVER() AS intTotalHits, --count without loading entire data
  17:          creation_time 
  18:          ,last_execution_time
  19:          ,total_physical_reads
  20:          ,total_logical_reads 
  21:          ,total_logical_writes
  22:          , execution_count
  23:          , total_worker_time
  24:          , total_elapsed_time
  25:          , total_elapsed_time / execution_count avg_elapsed_time
  26:          ,SUBSTRING(st.text, (qs.statement_start_offset/2) + 1,
  27:           ((CASE statement_end_offset
  28:            WHEN -1 THEN DATALENGTH(st.text)
  29:            ELSE qs.statement_end_offset END
  30:              - qs.statement_start_offset)/2) + 1) AS statement_text
  31:  FROM sys.dm_exec_query_stats AS qs
  32:  CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st
  33:  --ORDER BY total_elapsed_time / execution_count DESC 
  34:  )
  35:   
  36:  SELECT creation_time, intRow, intTotalHits  FROM subset
  37:  WHERE intRow BETWEEN @intStartRow AND @intEndRow

image

No Comments »

MVC Mobile & Desktop

http://www.hanselman.com/blog/MakingASwitchableDesktopAndMobileSiteWithASPNETMVC4AndJQueryMobile.aspx

No Comments »

WP Login