Overblog
Follow this blog Administration + Create my blog

sql server2005

Save your SELECT query results in XML File or Text File.

August 6 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

To save the result of your SELECT query to XML or a text file. Well use xp_cmdshell. xp_cmdshell is an extended stored procedure kept in the master database. It issues OS commands directly to the Windows command shell. You need to be a member of the sys_admin...

Read more

Compare data between two tables in SQL Server 2005

August 6 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

Inorder to find the difference of two tables in schema and data betweeen Source and distination tables. we can use Tablediff in SQL Server 2005 You can run this utility from the command line or a batch file. Ex: if you have two Databases one for Production...

Read more

How to encrypt a stored procedure in SQL Server 2005

August 6 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

Inorder to encrypt the text of stored procedures containing sensitive information, Sql Server provides WITH ENCRYPTION to encrypt the Stored Procedure. CREATE procedure [dbo].[SP_GET_Employee_Details_encrypt] WITH ENCRYPTION AS SELECT EMP_id,First_name,Last_name,Email_id...

Read more

How to check the active connections for each Database in SQL Server 2005

August 6 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

We need to check the number of active connections for a Database on our server. We can get that details by using the following SQL script. This SQL script displays the DatabaseName, the number of connections and the login name : SELECT db_name(dbid) as...

Read more

Display Last Modified Stored Procedure using SQL Server 2005/2008

August 5 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

To get a list of the Stored Procedure that were last modified, use this query SELECT TOP 10 modify_date,name FROM sys.procedures ORDER BY modify_date DESC --

Read more

Article on Sqlserver Indexes

July 27 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

One of the most powerful way to get high performance in a SQL Server database is the index. Indexes speed up the your querying process by providing swift access to rows in the data tables, like the way a book’s index helps you find information quickly...

Read more

Custom Paging in SQLServer2005 and Dotnet Application

July 8 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

Custom Paging in SQLServer2005 and Dotnet Application Subsets via SQL Server 2005 There are various techniques for handling this issue, but SQL Server 2005 introduced a new feature that changed everything. SQL Server 2005 simplifies retrieving subsets...

Read more

Datetime Formates and Date time manipulations in SQL Server

May 19 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

Different Datetime formates in sqlserver print getdate() -- May 19 2009 3:21AM print convert(varchar(max),getdate(),101) -- 05/19/2009 print convert(varchar(max),getdate(),102) -- 2009.05.19 print convert(varchar(max),getdate(),103) -- 19/05/2009 print...

Read more

Case Statement Tricks

April 10 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

The CASE statement is a very flexible tool. Here are just a few of the tricks you can work with it. Item translation One of the simplest things you can do is to derive a columns contents based on it’s contents, or the contents of another data item. SELECT...

Read more

Concatenating Row Values in Transact-SQL

April 7 2009 , Written by Balavardhan Reddy Published on #SQL Server2005

Concatenating Row Values in Transact-SQL There are a number of solutions and considerable debate. How do you go about Concatenating Row values. By 'Concatenating row values' we mean this: You have a table, view or result that looks like below......and...

Read more
<< < 1 2 3 4 > >>