Showing posts with label SQL server 2012. Show all posts
Showing posts with label SQL server 2012. Show all posts

Running sum simplified in SQL 2012




Running sum is a regular requirement in query for developer and many times developer has to run number  of complex  queries or self joins to get running sum
But now since SQL  2012 its very easy and funny and simplified.

Expression indicator SSIS

As we all are aware with expression usage in SSIS.
Lets see an example of using connector  for creating dynamic connection.
We can create expression for connection string and assign it to connections.
So at rutime connection string from this  expressions are evaluated first and based on it connection is made.
How SSIS does not giving any indication either connection has expressions defined not.

But from SQL 2012 we can see icon fro expression near the connection on which we have defined expression

see the example below
Here we defined expression for the connection so that we can see fx symbol near the connection



FileStream Part-3

You can access first two parts from here

Part-1
Part-2

Lets see now  how to use FileStream to access files.

FileTable Part-2

Now we are at part2 of FileTable .
You can go for part1 from here

In Part1 We learn how to configure server to use of FileSteam.
Now we will create a database where we will use FileTable

FileTable - Part1

FileTables are used to store this unstrucutred data.
FileTables contains FileStream which is used to store unstructured data in Database.


Expression Task in SSIS 2012

As we all are aware with the variables in SSIS, which is used  for holding custom values and assign to various properties of objects at run time. If  we want to assign custom values to variables at runtime we have  have to create an script object to assign value to variable.

Row count int sys.dm_exec_query_stats


SQL 2012 has added 4 new columns 
total_rows,
last_rows,
min_rows,
max_rows  in sys.dm_exec_query_stats DMV
This will help us to find the queries which are returning large number of results and we can optimized them 


DMV to get SQL Server Registry information

SQL Server 2012 has new DMV sys.dm_server_srvices
This provides details in registry related to SQL server

This provides some interesting information like 
SQL Server Version/Startup Parameters/Ports/Service startup options


Easy way to get status of SQL Server Services in SQL 2012

SQL 2012 has some new DMVs.
One of them is sys.dm_server_services
It gives us details about the SQL Server services (SQL Serve,SQL Server Agent, Full Text)


Popular Posts