Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Basit's SQL Server Tips

Basit Farooq is a Lead Database Administrator, Trainer and Technical Author. He has more than a decade of IT experience in development, technical training and database administration on Microsoft SQL Server platforms. Basit has authored numerous SQL Server technical articles, and developed and implemented many successful database infrastructure, data warehouse and business intelligence projects. He holds a master's degree in computer science from London Metropolitan University, and industry standard certifications from Microsoft, Sun, Cisco, Brainbench, Prosoft and APM, including MCITP Database Administrator 2008, MCITP Database Administrator 2005, MCDBA SQL Server 2000 and MCTS .NET Framework 2.0 Web Applications.

My articles published on SSWUG.org from March 2014 to July 2014

The following is the list of my articles published on SSWUG.org from March 2014 to July 2014. To read these articles, you must have SSWUG.org standard-level membership.


SQL Server 2014 Replication, Published on July 29, 2014

You use replication to move data between servers. Replication is important in distributed… Read more

0 comments, 99 reads

Posted in Basit's SQL Server Tips on 8 August 2014

Book: SQL Server 2014 Development Essentials

I am very happy to announce that my first book “SQL Server 2014 Development Essentials” has now been published by Packt Publishing.

SQL Server 2014 Development Essentials, ISBN: 9781782172550

SQL Server 2014 Development Essentials is an easy-to-follow yet comprehensive guide that is full of hands-on examples, which… Read more

1 comments, 139 reads

Posted in Basit's SQL Server Tips on 28 July 2014

Implementing Checkpoints – To restart SQL Server Integration Services packages from the point of failure

An SQL Server Integration Services package often includes tasks that can take a long time to run. If the package fails in the middle of execution, you may need to repeat these tasks, which can be very slow and time-consuming. To address this problem, Integration Services supports the use of… Read more

0 comments, 189 reads

Posted in Basit's SQL Server Tips on 30 May 2014

SQL Server 2005/2008/2008R2: HTTP endpoints

You can use an HTTP endpoint to allow access to data over HTTP and Secure Sockets Layer (HTTPS) without needing to install Internet Information Services (IIS).

Important Note: HTTP Endpoints feature has been deprecate in SQL Server 2012 and later versions.  For more information, see here

Click here to read… Read more

0 comments, 180 reads

Posted in Basit's SQL Server Tips on 30 May 2014

Types of Join in SQL Server

You use a join to combine data from different tables into a single result set. Joins most commonly use foreign key relationships. Some important points about joins include:

  • Joins are created through instructions in the SELECT clause.
  • Joins connect two or more tables by using a join operator.
  • Joins exist…

Read more

0 comments, 150 reads

Posted in Basit's SQL Server Tips on 30 May 2014

SQL Server: Database Design Basics

In this article, you will learn about database design concepts. The database design concepts discussed in this article focus almost exclusively on OLTP requirements. OLAP design is beyond the scope of this article.

This article is published on SSWUG.org.


Read more

0 comments, 194 reads

Posted in Basit's SQL Server Tips on 30 May 2014

Database capacity planning and management

As part of the planning and research before implementing new SQL Server, you must determine the amount of space needed for your database and how it should be organized in the SQL Server. You also need to understand the properties of the database and how to manage the growth of… Read more

0 comments, 194 reads

Posted in Basit's SQL Server Tips on 30 May 2014

Configuring SQL Server Database Mail Feature

You can send e-mail from within stored procedures, functions, and triggers by using SQL Server Database Mail. You can also configure SQL Server Agent Mail to use Database Mail. Some features of Database Mail include:

  • Uses Simple Mail Transport Protocol (SMTP)
  • Does not require Outlook or Extended Messaging Application Programming…

Read more

0 comments, 173 reads

Posted in Basit's SQL Server Tips on 30 May 2014

SQL Server 2014 Management tools

Management tools play a vital role in enterprise database management. This is because the well-integrated tools extend the administrator’s capabilities, whereas a random collection of tools can lead to confusion, operational mistakes, high training costs, and poor DBA productivity. To keep up with these demands of complex enterprise database management… Read more

0 comments, 203 reads

Posted in Basit's SQL Server Tips on 30 May 2014

The database principal owns a schema in the database, and cannot be dropped

Problem

You are trying to drop a database user, but are getting the following error message:

The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)

This error is self-explanatory as it tells you that the database user you are trying to… Read more

2 comments, 184 reads

Posted in Basit's SQL Server Tips on 29 May 2014

Changing SQL Server Agent Jobs Ownership: Who should own SQL Server Agent Jobs

I writing this blog post as a result of the following two questions, which I’ve been asked by one of my blog follower recently.

  • Question#1: Does it matter who is the owner of the SQL Server Agent job?
  • Question#2: Is there a way to quickly update the job owner for…

Read more

2 comments, 311 reads

Posted in Basit's SQL Server Tips on 4 April 2014

Availability databases in unhealthy data synchronization state (Error: 35285, Severity: 16, State: 1.)

After power surge last night, I realized few availability databases (also known as a “database replica”) have an unhealthy data synchronization state. What I mean from unhealthy is that they have a status of “Not Synchronizing” in SQL Server Management Studio for both primary and all secondary availability group replicas… Read more

0 comments, 465 reads

Posted in Basit's SQL Server Tips on 2 April 2014

Verify a success of database backups

One of the most important tasks on a DBA’s to-do list is backing up databases on a regular basis. This is because reliable backups are the most important tool in ensuring data recovery. Therefore, it is important for the DBA to check for database backups and validate that they have… Read more

8 comments, 293 reads

Posted in Basit's SQL Server Tips on 16 March 2014

Tables without Clustered Indexes?

Today, we experienced performance issues with some of the SSRS reports that were deployed as part of the latest application/database release. While investigating this performance problem, I realized that the underlying tables for these report queries do not have clustered index. I was even more surprised when I realized that… Read more

8 comments, 777 reads

Posted in Basit's SQL Server Tips on 13 March 2014

Different approaches of counting number of rows in a table

Today, I received an email from the developer asking if there is a better way instead of the COUNT (*) Transact-SQL statement, to count the number of records in a table. My reply to his question is yes, there are several methods to get this information from SQL Server. However,… Read more

7 comments, 289 reads

Posted in Basit's SQL Server Tips on 6 March 2014

Rebuild all indexes on all tables in the SQL Server database

One of the key tasks of a DBA is to maintain the database indexes and make sure they are not fragmented. You can use a sys.dm_db_index_physical_stats in a script to rebuild or reorganize indexes based on fragmentation. However, sometimes we may need to rebuild all indexes on all tables in… Read more

3 comments, 490 reads

Posted in Basit's SQL Server Tips on 23 February 2014

Removing part of string before and after specific character using Transact-SQL string functions

Problem

Today, one of the developers come to me and asked me the question that is there any T-SQL function that he could use to remove everything before and after a specific character in string. For example, if the table contains the full names of the people in the format… Read more

1 comments, 1,015 reads

Posted in Basit's SQL Server Tips on 23 February 2014

Transact-SQL query to obtain basic information about partitioned tables

Here is the simple query that returns basic information about all tables in a database that are partitioned:

SELECT SCHEMA_NAME([schema_id]) AS [schema_name]
      ,t.[name] AS [table_name]
      ,i.[name] AS [index_name]
      ,i.[type_desc] AS [index_type]
      ,ps.[name] AS [partition_scheme]
      ,pf.[name] AS [partition_function]
      ,p.[partition_number]
      ,r.[value] AS [current_partition_range_boundary_value]
      ,p.[rows] AS [partition_rows]
      ,p.[data_compression_desc]
FROM sys.tables t
INNER JOIN…

Read more

0 comments, 530 reads

Posted in Basit's SQL Server Tips on 17 February 2014

Get performance statistics for queries and query plans that are cached by SQL Server for faster query execution

You can use the following two DMVs to give you that information:

  • sys.dm_exec_cached_plans – You can use this dynamic management view to see information about the plans that are cached by SQL Server, along with other information such as cached query text, the amount of memory taken by cached plans,…

Read more

0 comments, 288 reads

Posted in Basit's SQL Server Tips on 17 February 2014

Transact-SQL (T-SQL) query to return the status and detail information for all SQL Server Full-Text Catalogs on an SQL Server instance

We have about 200 user databases in which we have the full-text search enabled and these databases contain several tables. As part of my daily checks, I have to check the status of all full-text catalogs, to ensure that all full-text catalogs are successfully populated without errors. However, to check… Read more

0 comments, 403 reads

Posted in Basit's SQL Server Tips on 27 January 2014

Older posts