Login or Sign Up to become a member!
LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

Browsing "sql server 2012"

1

Using a Dedicated Administrator Connection via SSMS

If you need to use a Dedicated Administrator Connection (DAC) via SSMS, you can’t just use the Connect Object Explorer, if you try you will get the following error

Dedicated administrator connections are not supported via SSMS as it establishes multi…

Read More...
1

Messing with your friendly DBA on April Fools’ Day

April Fools’ Day is a day when people play practical jokes and hoaxes on each other. Why not trying to play some practical jokes on your friendly DBA 🙂

The first thing we are going to do is to spoof the host and program name. This is easy to do. Click on Connect, choose Database Engine, you will see the following box

Read More...
2

Using WITH RESULT SETS with stored procedures that return multiple resultsets

Yesterday I blogged about using WITH RESULT SETS with the EXECUTE command here: Use WITH RESULT SETS to change column names and datatypes of a resultset. Naomi Nosonovsky left the following comment
Can you use this feature to get result sets from the s…

Read More...
4

Use WITH RESULT SETS to change column names and datatypes of a resultset

SQL Server 2012 has added WITH RESULT SETS to the EXCECUTE command. You can now override the data types and names that the resultset is returning

EXEC (‘SELECT name FROM sys.tables’ )
WITH RESULT SETS
(
(TableName nvarchar(100))
);

Table…

Read More...
2

Wrap inserts in a transaction for faster performance

Sometimes you have to insert a bunch of data and you can’t use BCP or another bulk load method. When you do single row inserts, SQL Server wraps these inserts inside an implicit transaction. Did you know that if you use an explicit transaction that the…

Read More...
0

SQL Server 2012 Business Intelligence Whitepaper and Data Tools released

If you are into Business Intelligence, you are in luck, this week Microsoft has released a SQL Server 2012 Business Intelligence whitepaper as well as SQL Server Data Tools – Business Intelligence for Visual Studio 2012 (SSDT BI) templates.

The white…

Read More...
0

Giving only insert permissions to a table for a new login

There was a requirement to create a new user who would have only insert permissions to one table, this user would also have insert and select permissions to another table.

This is pretty simple to accomplish. First create this simple database with tw…

Read More...
8

Column name or number of supplied values does not match table definition when dealing with temp tables

The other day I was doing some testing and then from the same connection I executed a stored procedure only to be greeted with the following message

Msg 213, Level 16, State 1, Procedure prTestTemp, Line 5
Column name or number of supplied values do…

Read More...
1

An easier way to get SQL Server startup parameters: the sys.dm_server_registry dmv

When you install SQL Server, Setup will write a set of default startup options to the Windows registry. You can use the startup options to specify an alternate master database file, master database log file, or error log file.

Here is what the defaul…

Read More...
3

Listing tables that are truly partitioned in SQL Server

To list all the tables that are partitioned you can use the sys.partitions view. However be aware that all tables and indexes in SQL Server contain at least one partition, whether or not they are explicitly partitioned.

If you were to do the followin…

Read More...
« Previous PageNext Page »