James' SQL Footprint
Limit running Powershell script under specific path with AppLocker
here is a solution, you can save all…
0 comments, 101 reads
Posted in James' SQL Footprint on 28 April 2013
Set DAC port with a specific number
0 comments, 638 reads
Posted in James' SQL Footprint on 10 April 2013
Use delegated session configuration in Powershell 3.0
let's say User A log in server A, and he wants to access the resource on Server B, however User A doesn't have permission to access the resource, User B has resource access permission, so User A…
0 comments, 188 reads
Posted in James' SQL Footprint on 5 April 2013
Compression Backup with BUFFERCOUNT parameter
0 comments, 421 reads
Posted in James' SQL Footprint on 3 April 2013
Get Perfmon data with Powershell
0 comments, 337 reads
Posted in James' SQL Footprint on 21 February 2013
"Auto update statistics" option on tempdb
here is the script.
USE [master]
GO
ALTER…
0 comments, 171 reads
Posted in James' SQL Footprint on 28 January 2013
Got "Cannot generate SSPI context" error message after changing sql service account
The target principal name is incorrect. Cannot generate SSPI context."
Here is the troubleshooting step I used
1. Rollback service startup account to old…
0 comments, 401 reads
Posted in James' SQL Footprint on 19 January 2013
Row of nonclustered index page
so unique non-clustered index created on unique clustered index use smallest space, while non-unique non-clustered index created on non-unique clustered index use largest space.
0 comments, 272 reads
Posted in James' SQL Footprint on 4 January 2013
Heap might take more space than clustered Index when inserting row
1. Create testing DB
use master
go
CREATE DATABASE [test]…
0 comments, 240 reads
Posted in James' SQL Footprint on 3 January 2013
Test Hadoop cluster on vmware
I don't have much knowledge on Nosql and Linux system, so I am going to setup a testing environment on my laptop in holidays
1. download CentOS Linux setup iso file
http://www.centos.org/
2. download java jdk 1.6
0 comments, 805 reads
Posted in James' SQL Footprint on 29 December 2012
Explore file physical structure - IAM
1. Create sample db
use master
go
CREATE DATABASE [test] ON PRIMARY
( NAME = N'test', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test.mdf' , SIZE = 2048KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'test_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test_log.ldf' , SIZE = 1024KB , FILEGROWTH =…
0 comments, 226 reads
Posted in James' SQL Footprint on 25 November 2012
Explore file physical structure - Delete
1. Create sample db
use master
go
CREATE DATABASE [test] ON PRIMARY
( NAME = N'test', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test.mdf' , SIZE = 2048KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'test_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test_log.ldf' , SIZE = 1024KB , FILEGROWTH =…
0 comments, 1,068 reads
Posted in James' SQL Footprint on 21 November 2012
Explore file physical structure - Insert Row - Part 2
1. Create sample db
use master
go
CREATE DATABASE [test] ON PRIMARY
( NAME = N'test', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test.mdf' , SIZE = 3072KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'test_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test_log.ldf' , SIZE = 1024KB , FILEGROWTH =…
0 comments, 178 reads
Posted in James' SQL Footprint on 20 November 2012
Explore file physical structure - Insert Row - part 1
1. Create sample db
use master
go
CREATE DATABASE [test] ON PRIMARY
( NAME = N'test', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test.mdf' , SIZE = 3072KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'test_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test_log.ldf' , SIZE = 1024KB , FILEGROWTH =…
0 comments, 131 reads
Posted in James' SQL Footprint on 20 November 2012
Explore file physical structure - variable length row
use master
go
CREATE DATABASE [test] ON PRIMARY
( NAME = N'test', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test.mdf' , SIZE = 3072KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'test_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test_log.ldf' , SIZE = 1024KB , FILEGROWTH =…
0 comments, 227 reads
Posted in James' SQL Footprint on 20 November 2012
Explore file physical structure - fixed length row
use master
go
CREATE DATABASE [test] ON PRIMARY
( NAME = N'test', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test.mdf' , SIZE = 3072KB , FILEGROWTH = 1024KB )
LOG ON
( NAME = N'test_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master\test_log.ldf' , SIZE = 1024KB , FILEGROWTH =…
0 comments, 181 reads
Posted in James' SQL Footprint on 20 November 2012
Monitor Blocking with Extented Events in SQL 2012
sp_configure 'show advanced options', 1 ;
GO
RECONFIGURE ;
GO
sp_configure 'blocked process threshold', 10 ;
GO
RECONFIGURE ;
GO
here we set the threshold to 10 seconds, which generating a blocked process report for each task that is blocked.
2. Create Extented…
0 comments, 361 reads
Posted in James' SQL Footprint on 29 October 2012
Change file logical name for mirror database
We have a database which has been setup mirror on it, and we need to change the logical file name for data and log file. As usually, I rename the logical name by SSMS on the primary server(SQL01),…
0 comments, 961 reads
Posted in James' SQL Footprint on 9 September 2012
Install product update during SQL 2012 installation
1. /UpdateEnabled:
Specify whether SQL Server setup should discover and include product updates. The valid values are True and False or 1 and 0. By default, SQL Server setup will include updates that are found.
2. /UpdateSource
Specify the location…
0 comments, 681 reads
Posted in James' SQL Footprint on 30 August 2012
Restore Database In SQL 2012
http://jamessql.blogspot.com/2012/04/generate-restore-script-automatically.html
Obviously, I had not tried restore in SQL Server 2012 Management Studio at that time. Now we have SQL 2012, which can provide more powerful ways to…
3 comments, 1,516 reads
Posted in James' SQL Footprint on 21 August 2012



Subscribe to this blog