- libpcre
- liblzma
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 r.session_id,r.command,CONVERT(NUMERIC(6,2),r.percent_complete) | |
AS [PERCENT Complete],CONVERT(VARCHAR(20),DATEADD(ms,r.estimated_completion_time,GETDATE()),20) AS [ETA COMPLETION TIME], | |
CONVERT(NUMERIC(6,2),r.total_elapsed_time/1000.0/60.0) AS [Elapsed MIN], | |
CONVERT(NUMERIC(6,2),r.estimated_completion_time/1000.0/60.0) AS [ETA MIN], | |
CONVERT(NUMERIC(6,2),r.estimated_completion_time/1000.0/60.0/60.0) AS [ETA Hours], | |
CONVERT(VARCHAR(100),(SELECT SUBSTRING(TEXT,r.statement_start_offset/2, | |
CASE WHEN r.statement_end_offset = -1 THEN 1000 ELSE (r.statement_end_offset-r.statement_start_offset)/2 END) | |
FROM sys.dm_exec_sql_text(sql_handle))) | |
FROM sys.dm_exec_requests r WHERE command IN ('RESTORE DATABASE','BACKUP DATABASE') |
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
--run both commands | |
KILL 54; | |
--generates progress report | |
KILL 54 WITH STATUSONLY; | |
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
SELECT | |
req.session_id AS [session], | |
ses.program_name AS [program], | |
jobs.name AS [job], | |
sqltext.TEXT AS [query], | |
DB_NAME(req.database_id) AS [database], | |
req.status, | |
wg.name AS [resource_group], | |
req.command, | |
CONVERT(varchar(10), (req.cpu_time / 86400000)) + ':' + |
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 | |
migs.avg_total_user_cost * (migs.avg_user_impact / 100.0) * ( | |
migs.user_seeks + migs.user_scans) AS | |
improvement_measure, | |
LEFT(PARSENAME(mid.statement, 1), 32) as object, | |
'CREATE INDEX [XK' | |
+ LEFT(PARSENAME(mid.statement, 1), 32) | |
+ MAX(CASE | |
WHEN ind.name LIKE '%[0-9]%' THEN | |
substring(ind.name, PatIndex('%[0-9]%', ind.name), len(ind.name)) |
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
# If you are not using bash, you should take care to append the echo | |
# lines below to the appropriate shell_profile | |
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
exec $SHELL -l |
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 | |
ja.job_id, | |
j.name AS job_name, | |
ja.start_execution_date, | |
ISNULL(last_executed_step_id,0)+1 AS current_executed_step_id, | |
js.step_name | |
FROM msdb.dbo.sysjobactivity ja | |
LEFT JOIN msdb.dbo.sysjobhistory jh | |
ON ja.job_history_id = jh.instance_id | |
JOIN msdb.dbo.sysjobs j |
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 tst.[session_id], | |
s.[login_name] AS [Login Name], | |
DB_NAME (tdt.database_id) AS [Database], | |
tdt.[database_transaction_begin_time] AS [Begin Time], | |
tdt.[database_transaction_log_record_count] AS [Log Records], | |
tdt.[database_transaction_log_bytes_used] AS [Log Bytes Used], | |
tdt.[database_transaction_log_bytes_reserved] AS [Log Bytes Rsvd], | |
SUBSTRING(st.text, (r.statement_start_offset/2)+1, | |
((CASE r.statement_end_offset | |
WHEN -1 THEN DATALENGTH(st.text) |
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
-- server 'sysadmin' | |
SELECT name as 'sysadmin',type_desc,is_disabled | |
FROM master.sys.server_principals | |
WHERE IS_SRVROLEMEMBER ('sysadmin',name) = 1 | |
ORDER BY name | |
-- database owner | |
select suser_sname(owner_sid) as 'owner' | |
from sys.databases | |
where name = DB_NAME() |
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 $displayName, $cn FROM ROOTDSE | |
WHERE $objectClass='user' AND $objectCategory='Person' | |
AND $sAMAccountName='x0000000' --AND $cn=''; |
OlderNewer