• Home
  • PS
  • C#
  • Perl
  • MSSQL
  • MariaDB
  • Linux
  • Docker
  • MacOS
  • PG
  • Exchange Server
  • Windows
  • Other

Home

процессы и их блокировки в SQL

Details
Written by: po3dno
Category: MSSQL
Created: 02 March 2016
Hits: 978
declare 
	@DbId as int = db_id(N'имя_базы')

use [master];

select
	[now] = cast(sysdatetime() as datetime2(0))
/*,	[db_name] = db_name(er.[database_id]) */
,	es.session_id
,	er.[status]
,	er.command
/*,	[sql_command] = case when er.sql_handle is null then null else (select [text] from sys.dm_exec_sql_text(er.sql_handle)) end*/
,	er.percent_complete
,	er.[wait_resource]
,	er.blocking_session_id
,	es.[program_name]
,	es.[host_name]
,	es.[login_name]
,	es.[nt_user_name]
,	er.start_time
,	er.[user_id]
,	er.connection_id
from
	sys.dm_exec_requests er
inner join
	sys.dm_exec_sessions es
on	es.[session_id] = er.[session_id]
where
	er.database_id = @DbId
;

dump process in Windows Server 2008

Details
Written by: po3dno
Category: Power Shell
Created: 10 February 2016
Hits: 1158
  • Launch PowerShell and dot source function from the Out-Minidump.ps1 (note first dot):

. c:\path\to\Out-Minidump.ps1
  • Now you can actually create dump of the process using this syntax:
Get-Process 'notepad.exe' | Out-Minidump -DumpFilePath C:\temp
  • To get help, run this command:
Get-Help Out-Minidump -Full

Read more …

Wsus target by network

Details
Written by: po3dno
Category: Power Shell
Created: 16 December 2015
Hits: 966

[void][reflection.assembly]::LoadWithPartialName("Microsoft.UpdateServices.Administration")

$wsus = [Microsoft.UpdateServices.Administration.AdminProxy]::getUpdateServer("localhost",$False)

$groupall = $wsus.GetComputerTargetGroups()

$pcall = $groupall | %{$_.GetComputerTargets()}

Read more …

Exchange photo

Details
Written by: po3dno
Category: Exchange Server
Created: 16 December 2015
Hits: 1075
Set-UserPhoto "Paul Cannon" -PictureData ([System.IO.File]::ReadAllBytes("C:\Users\Administrator\Desktop\PaulCannon.jpg"))

Собираем информацию через WMI в БД MSSQL

Details
Written by: po3dno
Category: C#
Created: 08 December 2015
Hits: 1086

            string pc = System.Environment.MachineName;

            if (args.Count() == 1)

                pc =  args[0];

 

            // Ограничение на поле class = 33 символа

            string[] List = new string[] {

                "Win32_BaseBoard",

                "Win32_BIOS",

                "Win32_ComputerSystem",

                //"Win32_Environment",

                "Win32_LogicalDisk",

                "Win32_NetworkAdapter",

                "Win32_OperatingSystem", 

                "Win32_NetworkAdapterConfiguration"

            };

Read more …

  1. Exchange 2016 удаление
  2. Copy Receive Connectors to a New Exchange Server
  3. Удалить IE
  4. Port WWN

Subcategories

Power Shell Article Count:  53

C# Article Count:  10

Perl Article Count:  1

Exchange Server Article Count:  15

Other Article Count:  24

MSSQL Article Count:  17

Windows Article Count:  25

MariaDB Article Count:  3

Linux Article Count:  7

Docker Article Count:  2

pg Article Count:  1

Page 21 of 32

  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25

Login Form

  • Forgot your password?
  • Forgot your username?

Statistics

  • Users 2
  • Articles 164
  • Articles View Hits 149075