studio for sql server

Capturing SQL Server Trace Data

One of the best ways to gather information about SQL Server workloads is to capture trace information. In this article, we will look at how to use SQL Trace and Server Events Profiler for tracing SQL Server activity. You can use this information for auditing, monitoring and troubleshooting SQL Server performance. This article is intended for DBAs who need to collect information about workloads running on SQL Server for analytic purposes. (more…)

Analyzing SQL Server Events with help of Events Profiler

dbForge Studio for SQL Server provides the SQL Events Profiler tool that captures SQL Server events from a server. The events are stored in a trace file. The trace file can later be analyzed or used to replay a specific series of steps when trying to diagnose a problem. Events Profiler shows how SQL Server executes queries internally. This allows you to see exactly what T-SQL statements are submitted to the server and how the server accesses the database to return result sets. (more…)

Adventures of CLR Types in .Net Framework

Summary: This article describes the issue occurred with execution of the a polygon instance of the geography type and the possible solution for it.

Once I stumbled upon the following query:


DECLARE @g1 GEOGRAPHY;
SET @g1 = geography::Parse(‘POLYGON ((0 0, 1 0, -1 1, 2 2, 0 0))’);
SELECT @g1
go

(more…)

SQL Server Typical Maintenance Plans – Part 1: Automated Index Defragmentation

It’s incorrect to consider a database as a stable unit, since various kinds of undesirable situations can appear over time — database performance degradation, malfunctions, etc.

To minimize occurrence of such situations, maintenance plans are created, that guarantee stability and optimal performance of any databases.

Among maintenance plan tasks, the following can be pointed out:

  1. Index defragmentation
  2. Statistics update
  3. Backup and checking the logical and physical integrity of all the objects in database

Let’s consider automation of each task. (more…)

Is UNPIVOT the best way for converting columns into rows?

Convertion of columns into rows is widely used in real tasks. In this article we will talk about different implementations of T-SQL UNPIVOT transformations.

Let’s assume we have an aggregated table which contains data about results of the games played by each player. We have a task to convert columns into rows.

IF OBJECT_ID ('dbo.Players') IS NOT NULL
	DROP TABLE dbo.Players;

CREATE TABLE dbo.Players
(
	  PlayerID INT
	, Win INT
	, Defeat INT
	, StandOff INT
	, CONSTRAINT PK_Players PRIMARY KEY CLUSTERED (PlayerID) ON [PRIMARY]
);
INSERT INTO dbo.Players (PlayerID, Win, Defeat, StandOff)
VALUES
	(1, 7,  6,  9),
	(2, 12, 5,  0),
	(3, 3,  11, 1);

(more…)

dbForge Studio for SQL Server is Ready to Try

Devart proudly presents dbForge Studio for SQL Server — a new set of SQL Server tools for database developers and administrators.

All users who have used our previously elaborated solutions (such as SQL Complete, Schema Compare, Data Compare and Query Builder for SQL Server) can now benefit from having them at hand in a single SQL Server integrated development environment.

A new GUI tool by Devart for SQL Server is ready.

A new GUI tool by Devart for SQL Server is ready.

(more…)