Each organization has its own coding standards and enforcement rules. It is sometime difficult for DBAs to change the code following code review, as it may affect many different layers of the application. In large organizations, many stored procedures are written and modified every day. It is smart to keep…
Read MoreSQL SERVER – T-SQL Script to Add Clustered Primary Key
Jr. DBA asked me three times in a day, how to create Clustered Primary Key. I gave him following sample example. That was the last time he asked “How to create Clustered Primary Key to table?” USE [AdventureWorks] GO ALTER TABLE [Sales].[Individual] ADD CONSTRAINT [PK_Individual_CustomerID] PRIMARY KEY CLUSTERED ( [CustomerID]…
Read MoreSQL SERVER – UDF vs. Stored Procedures and Having vs. WHERE
Read my First Article in SQL Server Magazine – Oct 2007Â [Articles are relocated so links are disabled] Reference : Pinal Dave (https://blog.sqlauthority.com)
Read MoreSQL SERVER – 2005 – Sample Example of RANKING Functions – ROW_NUMBER, RANK, DENSE_RANK, NTILE
I have not written about this subject for long time, as I strongly believe that Book On Line explains this concept very well. SQL Server 2005 has total of 4 ranking function. Ranking functions return a ranking value for each row in a partition. All the ranking functions are non-deterministic.…
Read MoreSQL SERVER – 2005 – Connection Property of SQL Server Management Studio SSMS
Following images quickly explain how to connect to SQL Server with different connection property. It can be useful when connection properties need to be changed for SQL Server when connected. I use this in my company when I connect to one of our servers using named pipes instead of TCP/IP. Let us learn about Connection Property of SQL Server Management Studio SSMS.
SQLAuthority News – Latest Interesting Downloads and Articles
White Paper: Precision Considerations for Analysis Services Users This white paper covers accuracy and precision considerations in SQL Server 2005 Analysis Services. For example, it is possible to query Analysis Services with similar queries and obtain two different answers. While this appears to be a bug, it actually is due…
Read MoreSQL SERVER – Executing Remote Stored Procedure – Calling Stored Procedure on Linked Server
I was going through comments on various posts to see if I have missed to answer any comments. I realized that there are quite a few times I have answered question which discuss about how to call stored procedure or query on linked server or another server. This is very…
Read MoreSQL SERVER – 2005 – Open SSMS From Command Prompt – sqlwb.exe Example
This article is written by request and suggestion of Sr. Web Developer at my organization. Due to nature of this article most of the content are referred from Book On-Line. sqlwb command prompt utility which opens SQL Server Management Studio. sqlwb command does not run queries from command prompt. sqlcmd…
Read More