how to enable/disable index in SYBASE 15.7 - sybase

I want to enable/disable index in SYBASE 15.7. Do you know the syntax for this?
I tried this:
--line to disable index
alter table table name disable index index_name
go

Sybase ASE 15.7 does not support disabling indexes. You will need to drop and recreate the indexes.
Sybase ASE 15.7 documentation:

Related

Indexing using UPPER function in SQL Server

I am trying to create the indexes using the liquibase using following query in SQL Server.
CREATE NONCLUSTERED INDEX LASTNAME_IDX ON EMPLOYEE(UPPER(LAST_NAME));
But I am getting the error while running the liquibase. It works fine in oracle. Let me know if there a way I can create the index in SQL Server
SQL Server does not support function indices, which Oracle does support. One workaround here would be to create a computed uppercase column, and then index that:
ALTER TABLE EMPLOYEE ADD LAST_NAME_UPPER AS UPPER(LAST_NAME);
CREATE NONCLUSTERED INDEX last_name_idx ON EMPLOYEE(LAST_NAME_UPPER);

Adding a filegroup to flyway_schema_history table using MSSQL

Using Mssql I want to create the flyway_schema_history table on a given filegroup instead of primary. Is there any way I can accomplish getting the flyway_schema_history table to appear in a different filegroup when using mssql?
There is currently no built-in way. You have to manually create the table to accomplish this.
Update: This will be supported from Flyway 6.0.0 onwards.

Drop Partitions SQL Server 2008

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.

Where is the fulltext search data in sql server?

I create a fulltext index on a table,I want to have a look at the fulltext data after the population.Is there a file contains fulltext index information? Where is it? Anybody has an idea?
If you are using SQL Server 2008, you can specify a filegroup where the index will be stored. This option isn’t available in SQL Server 2005 because filegroup association is at the catalog level.
That means you can issue a query that lists the contents of the index on SQL Server 2008:
SELECT display_term, column_id, document_count
FROM sys.dm_fts_index_keywords
(DB_ID('AdventureWorks2008'), OBJECT_ID('ProductDocs'))
If you run sp_help_fulltext_columns you will get the Fulltext index tables and columns
in the database.

SQL Server 2005 Index Filter Feature

I was told that there is new a feature in SQL Server 2005 called index filters.
What I want to do is add an Index to a column and have the index ignore null values.
I can't find good information on this feature (maybe my source is wrong). Can anyone provide additional information on this feature?
CREATE INDEX ix_mytable_mycolumn ON mytable(mycolumn) WHERE mycolumn IS NOT NULL
This will work only in SQL Server 2008, though.
From the docs:
WHERE <filter_predicate>
Creates a filtered index by specifying which rows to include in the index. The filtered index must be a nonclustered index on a table. Creates filtered statistics for the data rows in the filtered index.
I think you are speaking about filtered indexes, which were introduced in SQL Server 2008, not 2005.
For information, have a look at this article: http://www.sql-server-performance.com/articles/dba/Filtered_Indexes_in_SQL_Server_2008_p1.aspx
Or just do a google search for "sql server filtered indexes".

Resources