I have to migrate SQL Sever 2008 database to the SQL Server 2012. 2008 is the enterprise version and 2012 is standard version. As we know, standard version does not support table partitioning.
The table which is partitioned in the enterprise version has 1 clustered and around 8 non-clustered indexed. I need to drop this partition but do not know how. Can someone please shed little light on how should I go about it?
Thanks.
To unpartition a table, you'll need to recreate all the indexes with a filegroup specification instead of parttion scheme. I suggest you drop all the non-clustered indexes and then rebuild the existing partitioned clustered index using CREATE INDEX...WITH(DROP_EXISTING-ON) with a filegroup specification. Then recreate the non-clustered indexes with a filegroup specfied.
Related
I have a script in existing SQL Server 2012 to delete old/expired sessions using partitioning. Data is moved from the source table to the staging table on basis of weekday partition and truncate operation is performed on the source table.
After migration to SQL Server 2016, partition and truncate is not supported on memory-optimized tables. What is the best solution to deal with this?
Can we create clustered/non-clustered columnstore index on a memory optimized table in SQL Server 2014?
Columnstore Index is not supported with memory optimized tables.
Nope, you can't create a columnstore index on a memory optimized table, only nonclustered hash and nonclustered indexes are allowed, see here for more details:
Guidelines for Using Indexes on Memory-Optimized Tables
ColumnStore indexes are going to be supported on Top on In-memory/hekaton tables in SQL Server 2016.
There is an option called "ColumnStore Index" available in SQL Server 2012.
Is it comparable with columnar databases such as Cassandra, HBase?
Few advantages of going with SQL Server 2012 can be:
It is Updateable
It is Relational
What other factors can be considered to choose between SQL Server 2012 and other Columnar databases in case faster query performance is a requirement.
I'm not sure what you mean by "it is updatable", but in SQL Server 2012 tables that have a columnstore index cannot be updated. You must first drop the columnstore index or you must partition around the columnstore index in order to support changes to the underlying data.
Also, columnstore indexes are useful in DW systems where very large amounts of data have to be aggregated and accessed quickly.
In SQL Server 2012 you have the alternative of indexed (materialized) views.
I created a non-clustered index (using the execution plan tools in MSSQLSMS) that greatly speeds up a critical, time-consuming query. My test machine uses SQL Express 2008, but I'm limited to SQL Server 2000 on the production server.
The index includes some non-key columns in an INCLUDE statement:
CREATE NONCLUSTERED INDEX idxTotalFundsUnderManagementQuery_TotalPv
ON PortfolioMovements (PortfolioMovementType, AtDate)
INCLUDE (PortfolioID, SecurityGuid, Units)
INCLUDE isn't supported on SQL Server 2000. Is there a way to include non-key columns in the index?
No: http://msdn.microsoft.com/en-us/library/aa258260(v=sql.80).aspx
It's a performance feature that was introduced in SS 2005 AFAIK.
I need to combine files in a filegroup in SQL Server 2005. How do I do this? I've run the EMPTYFILE DBCC Shrinkfile but it's crawling..
One way (for the tables at least) would be to drop the clustered index and then re-create the clustered index specifying the filegroup you are trying to combine them into. Since the clustered index is applied to the actual table this would accomplish what you are trying to do (for the tables).
You can read more about this approach on this MSDN forum topic.
http://social.msdn.microsoft.com/Forums/en-US/sqlreplication/thread/043c2bd4-07a1-4361-8c2b-7f375dd72107