Thursday, July 12, 2012

Why Use English Query in Microsoft SQL Server

English Query in Microsoft SQL Server used to build applications that can accept query in questions form e.g question is in English language.

While processing English Query, the application passes the questions string to the English query engine. This English Query engine returns a SQL statement or a Multi-Dimensional Expression (MDX) query to the application, Which will return the answer to the user’s question.

Wednesday, July 11, 2012

Microsoft SQL Server Execute SQL Statements in Different Ways

There are many different ways Microsoft SQL Server uses to execute SQL statements. These different way are following :
  • Single SQL statement processing
  • Batch processing
  • Stored procedure and trigger execution
  • Execution plan caching and reuse
  • Parallel query processing


Why Use SQL Profiler in Microsoft SQL server

Uses of SQL Profiler in Microsoft SQL server

SQL Profiler captures SQL Server events from a server. These events are saved in a trace file that can be used to analyze and diagnose problem.

There are many other useful function of SQL Profiler, these are following :

  • SQL Profiler used to find the cause of the problem by stepping through problem queries.
  • SQL Profiler is very useful to analyze the cause of slow running queries.
  • SQL Profiler can be used to tune workload of the Microsoft SQL server.
  • SQL Profiler also stores security-related actions that can be reviewed by a security administrator.
  • SQL Profiler also supports auditing the actions performed on instances of Microsoft SQL Server.


Why Use Full Text Query in Microsoft SQL Server

Full Text Query in Microsoft SQL Server

Full Text Query search used to search for the entire text instead of using “%”. We use it to search for text with data type TEXT or NOTE etc . 

Some predicates like FREETEXT, CONTAINS are used in full text query search. FREETEXT finds the word or words you give it anywhere in the search column. For example

SELECT Apparel FROM Products WHERE FREETEXT (Apparel, 'Van' )

The output of above query will be : Best Van Huesen trousers

Complete Phases of Transaction in Microsoft SQL Server


There are several phases of transaction in Microsoft sql server. These are following :

When transaction starts, database is in consistent state .

BEGIN TRANSACTION statement starts the transaction explicity.

Transaction generates the first record for data modification and write these records to log.

Modification starts one table at time, at this stage database is in inconsistent state.

Upon successful completion of all modification, database is once again consistent, and then application commits the transaction.

In case some errors occur, it rolls back all the modifications processed on data. This process returns the database to the point of consistency it was at before the transaction started.