Wednesday, December 8, 2010

The Operating System on this computer does not meet the minimum requirements for SQL SERVER "Denali"


When installing SQL Server 2011 Denal , you might get the following error, if you are installing on Windows XP operating System , because Windows XP is not supported for SQL Server 2011.

The operating System on this computer does not meet the minimum requirements for SQL SERVER "Denali".For more information, see Hardware and Software Requirements for installing SQL SERVER at http://go.microsoft.com/fwlink/?LinkID=195092










Microsoft SQL Server 2011 Requirements
During Microsoft SQL Server 2011 installation, in order to install SQL Server 2011 without a problem and an interruption please take care to the Microsoft SQL Server 2011 Requirements list. It is better to install the Microsoft SQL Server 2011 requirements before starting
The operating system requirements for Microsoft SQL Server 2011 are as follows.
Microsoft SQL Server 2011 aka SQL Server Denali CTP 1 Evaluation version supports:
Windows Vista with SP2,
Windows Server 2008 with SP2,
Windows 2008 R2, and
Windows 7 operating systems.
What is interesting related with the supported operating systems list is Windows XP is not supported any more.
I have successfully installed MS SQL Server 2008 R2 on my Windows XP machine; SQL Server 2011 Denali CTP 1 cannot be installed.

Friday, December 3, 2010

Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created.


When making changes in a table, an error might occur
Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table can't be re-created or enabled the option Prevent saving changes that require the table to be re-created.

The reason behind this error is that, whenever we add or delete a field of a table, that table requires to be dropped and recreate again. SQL Server prevents this change to happen ie it does not allow for drop and recreate of the table.
Here is solution to this problem
Open the SQL Server Management Studio
Go to the Tools Menu and select Options
Select the Designers from the Options and uncheck "Prevent saving changes that require table re-creation"

Saturday, November 27, 2010

Sparse columns do not take any space

Sparse columns are the new feature in SQL SERVER 2008. Sparse columns are better, when dealing with NULL in SQL SERVER. Sparse columns do not take any space. Defining the column as sparse can save a significant amount of disk space but at the cost of more overhead to retrieve non null values. Sparse columns can be defined by using the CREATE TABLE or ALTER TABLE statements.

CREATE TABLE DocumentStore
(
DocID int PRIMARY KEY,
Title varchar(200) NOT NULL,
ProductionSpecification varchar(20) SPARSE NULL,
ProductionLocation smallint SPARSE NULL,
MarketingSurveyGroup varchar(20) SPARSE NULL 
) ;
GO

Advantages of Sparse Columns
  • Storing a null in a sparse column takes up no space at all.
  • Sparse Columns will behave as the ordinary columns; SPARSE column can work as one XML column as well.
  • Sparse columns work really well with filtered indexes, where data are filled in the row. A filtered index on a sparse column can index only the rows that have populated values. This creates a smaller and more efficient index
  • SPARSE column saves database space when there are null values in database.
Disadvantages of Parse Columns
  • SPARSE column does not have IDENTITY or ROWGUIDCOL property.
  • Sparse Column must be null able
  • SPARSE column cannot be applied on text, ntext, image, timestamp, geometry, geography or user defined data types.
  • SPARSE column cannot have default value or rule or computed column.
  • Clustered index or a unique primary key index cannot be applied on SPARSE columns. SPARSE column cannot be part of clustered index key.
  • Table containing SPARSE column can have maximum size of 8018 bytes instead of regular 8060 bytes.
  • A table operation which involves SPARSE column takes performance hit over regular column.
  • Sparse columns are incompatible with data compression (Data compression doesn't work).
  • Merge replication does not support sparse columns
·          



Tuesday, November 16, 2010

SQL Server 2011 , Code Named “Denali” is released

SQL Server 2011 – Code Named “Denali” is released on November 11, 2010 at SQLPASS
You can download CTP1  right now and install on your machine.
SQL Server code-named 'Denali' helps empowers organizations to be more agile in today’s competitive market. Customers will more efficiently deliver mission-critical solutions through a highly scalable and available platform. Industry-leading tools help developers quickly build innovative applications while data integration and management tools help deliver credible data reliably to the right users and extended managed self-service BI capabilities enable meaningful insights.
The major features of the new products are as following:
  •  Enhanced Mission-Critical Platform: an enhanced highly available and scalable platform.
  • Developer and IT Productivity: new innovative productivity tools and features.
  • Pervasive Insight: expanding the reach of BI to business users and end-to-end data integration and management.
Book Online of SQL Server 2011 “Denali” is available here.
Installation guide for SQL Server 2011 “Denali” available here.


Saturday, January 2, 2010

New Features in Sql Server 2008


  • Compressed Backup
  • AUDITING => Change Data Capture (CDC)
  • FileStream
  • Sparse Column Support
  • Performance Data Management
  • Encryption => Transparent data encryption (TDE)
  • Resource Governor
  • Freeze Plan
  • LINQ Support

Deprecated Features in future realases (but still available in Sql 2008)

  •  BACKUP {DATABASE | LOG} WITH PASSWORD
  •  BACKUP {DATABASE | LOG} WITH MEDIAPASSWORD
  •  RESTORE {DATABASE | LOG} … WITH DBO_ONLY
  •  RESTORE {DATABASE | LOG} WITH PASSWORD
  •  RESTORE {DATABASE | LOG} WITH MEDIAPASSWORD

Thursday, September 10, 2009

How to Get SQL Server Table Size

This is a very common problem to get space used by the Database objects.
This stored procedure uses the sp_spaceused.
This stored procedure has been tested and used on a SQL Server 2005 and it will work fine on SQL Server 2008 as well.
It’s a very much simple stored procedure.
This SP declare a cursor that will get the names of all user defined tables and Schemas (concatenating the schema and table names as two part name that is schema.tablename) in the current database.
Then Stored Procedure creates a temporary table to store the individual data elements for each table. Then loop through the created cursor and save the results of the sp_spaceused command to temporary table.
The last step includes closing and deallocating the cursor, selecting all rows from temp table and dropps that table.


-- =============================================
CREATE PROCEDURE utility.Proc_GetDBTableSizes

AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;

DECLARE @TableName VARCHAR(200)

-- Insert statements for procedure here
DECLARE tableCursor CURSOR FOR
SELECT sys.schemas.[name]+'.'+sys.objects.[name]
FROM sys.schemas INNER JOIN sys.objects ON sys.schemas.schema_id=sys.objects.schema_id
WHERE type='U' AND is_ms_shipped=0 ORDER BY sys.schemas.[name] -- WHERE is_ms_shipped is Microsoft generated objects
FOR READ ONLY
--A procedure level temp table to store the results
CREATE TABLE #TempTable
(
tableName varchar(200),
numberofRows varchar(100),
reservedSize varchar(50),
dataSize varchar(50),
indexSize varchar(50),
unusedSize varchar(50)
)

--Open the cursor
OPEN tableCursor

--Get the first Record from the cursor
FETCH NEXT FROM tableCursor INTO @TableName

--Loop until the cursor was not able to fetch
WHILE (@@Fetch_Status >= 0)
BEGIN
--Insert the results of the sp_spaceused query to the temp table
INSERT #TempTable
EXEC sp_spaceused @TableName

--Get the next Record
FETCH NEXT FROM tableCursor INTO @TableName
END

--Close/Deallocate the cursor
CLOSE tableCursor
DEALLOCATE tableCursor

--Select all records so we can use the reults
SELECT *
FROM #TempTable


DROP TABLE #TempTable

END
GO

Wednesday, August 5, 2009

SQL Server Interview Questions


How to implement many-to-many relationships?
What's the difference between a primary key and a unique key?
What is user defined datatypes and when to use them?
Define candidate key, alternate key, and composite key?
Is there a column to which a default value can't be bound?
What are ACID properties?
Explain different isolation levels?
What is MOLAP, ROLAP and HOLAP?
Types of constraints?
What are the types of indexes ? What are the type of the NonClustered Indexes ?
In which situation NonClustered is more fast then clustered index?
What is the difference between deadlock , live lock and blocking ? And How to resolve them?
What are the Query Hints?
What are the different types of DBCC commands?
What are instead of triggers and what’s the difference between Insert and Instead of trigger , which trigger will be fired first ?
What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors? Why DBAs don’t like Cursors ?
What is a self join? Is self join physically exists in Sql Server ?
What is the difference between OSQL and Query Analyzer ?
What is BCP and when to use it ?
What is collation ?
What’s the difference between a primary key and a unique key?
When is the use of UPDATE_STATISTICS command?
What types of Joins are possible in Sql Server?
Where are SQL server users names and passwords are stored in sql server?
What is log shipping?
What is the difference between a local and a global variable?
What are the OS services that the SQL Server installation adds?
Specify  3 ways to get an accurate count of the number of records in a table?
What is the basic functions for master, msdb, model, tempdb databases?
What is a table called, if it does not have neither Cluster nor Non-cluster Index? What is it used for?
How do you load large data to the SQL server database?
What is Cross Join?
What is OLTP(OnLine Transaction Processing)? How to define that a Database is OLTP ?
What is the Diffrence between Extents and Page
What is the Diffrence between temp table and table variable
What is SQL injection
Specify the Tips when Optimizing Sql Server 2005 Query
What is the difference between UNION ALL Statement and UNION
What are the different types of Locks
What is Write ahead log?
How to get which Process is Blocked in SQL SERVER
What is SQL Server English Query?
What is XPath?
What is the STUFF and how does it differ from the REPLACE function?

Share This