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
# PostgreSQL Client Authentication Configuration File | |
# =================================================== | |
# | |
# Refer to the "Client Authentication" section in the PostgreSQL | |
# documentation for a complete description of this file. A short | |
# synopsis follows. | |
# | |
# This file controls: which hosts are allowed to connect, how clients | |
# are authenticated, which PostgreSQL user names they can use, which | |
# databases they can access. Records take one of these forms: |
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
# Makefile for building PyLucene | |
# | |
# Supported operating systems: Mac OS X, Linux and Windows. | |
# See INSTALL file for requirements. | |
# See jcc/INSTALL for information about --shared. | |
# | |
# Steps to build | |
# 1. Edit the sections below as documented | |
# 2. make | |
# 3. make install |
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 getdate() , | |
schema_name = sh.name , | |
table_name = t.name , | |
stat_name = s.name , | |
index_name = i.name , | |
stat_leading_column = | |
index_col(quotename(sh.name) + '.' + quotename(t.name), | |
s.stats_id, 1) , | |
s.stats_id , | |
s.has_filter , |
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
dbcc traceon(2363,3604) | |
go | |
set nocount on; | |
create table #test ( | |
id int | |
) | |
declare @id int = 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
/* | |
StatsGrabber.sql | |
(2014 only) | |
This script will grab the statistics collections used to generate a query plan and their current state | |
from the database. Find this section and place your query between the chunks: | |
/* |
This file has been truncated, but you can view the full file.
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
/****** Object: Table [dbo].[Element] Script Date: 1/5/2016 1:06:05 PM ******/ | |
/****** Object: Table [dbo].[Element] Script Date: 1/5/2016 1:47:35 PM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
SET ANSI_PADDING ON | |
GO | |
CREATE TABLE [dbo].[Element]( | |
[ElementCode] [char](4) NOT NULL, |
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
-- DOWNLOAD YOUR DATA | |
/* | |
http://meta.stackoverflow.com/questions/198915/is-there-a-direct-download-link-with-a-raw-data-dump-of-stack-overflow-not-a-t/199303#199303 | |
*/ | |
USE [stack_raw] | |
GO | |
/****** Object: Table [dbo].[Badge] Script Date: 12/20/2014 3:08:08 PM ******/ | |
SET ANSI_NULLS ON | |
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 | |
TOP(100) | |
collection_date = GETDATE(), | |
database_name = DB_NAME(CAST(pa.dbid AS INTEGER)), | |
database_name_exec = DB_NAME(CAST(pa.dbid_execute AS INTEGER)), | |
qs.total_worker_time, | |
qs.execution_count, | |
qs.sql_handle, | |
qs.plan_handle, | |
qs.creation_time, |
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
-- XE Definition | |
CREATE EVENT SESSION [page_splits] ON SERVER | |
ADD EVENT sqlos.wait_info( | |
ACTION (sqlos.task_time,sqlserver.sql_text,package0.collect_system_time) | |
WHERE ([sqlserver].[database_id]=(18))), | |
ADD EVENT sqlos.wait_info_external( | |
ACTION (sqlos.task_time,sqlserver.sql_text,package0.collect_system_time) | |
WHERE ([sqlserver].[database_id]=(18))), | |
ADD EVENT sqlserver.page_split( | |
ACTION(sqlos.task_time,sqlserver.sql_text,package0.collect_system_time) |
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
DECLARE @CounterPrefix NVARCHAR(30) | |
SET @CounterPrefix = CASE | |
WHEN @@SERVICENAME = 'MSSQLSERVER' | |
THEN @CounterPrefix + '' | |
ELSE 'MSSQL$'+@@SERVICENAME+':' | |
END; | |
SELECT | |
server_name = @@SERVERNAME, | |
server_instance = @@SERVICENAME, | |
object_name, |
NewerOlder