Working with DashCommerce 3.x - recreate the SQL Full Text Catalog

Sunday, 11 October 2009 20:29 by myro

The SQL Full Text Catalog, provides a fast search of you products into you DashCommerce's  database. But what happens if you mess up the catalog? You will receive errors like

A critical error has occurred: Cannot drop full-text catalog 'dashCommerce_Catalog' because it contains a full-text index

and you will not able to drop the catalog

Cannot drop full-text catalog 'dashCommerce_Catalog' because it contains a full-text index.

Unless you follow the steps illustrated below.

Connect to you DashCommerce's database,  and launch:

SELECT name, ftcatid FROM sysobjects WHERE ftcatid > 0
GO

This will return the table where the Full Text Catalg is use:



Now, we can drop it:


EXEC sp_fulltext_table 'dashCommerce_Store_Product', 'drop'
GO

DROP FULLTEXT CATALOG dashCommerce_Catalog
GO


And recreate it, by using the fulltextcatalog.sql script, located under /Install/Scripts


EXEC sp_fulltext_database 'enable'
GO
CREATE FULLTEXT CATALOG dashCommerce_Catalog
GO

CREATE FULLTEXT INDEX ON [dbo].[dashCommerce_Store_Product] KEY INDEX [PK_dashCommerce_Products] ON [dashCommerce_Catalog] WITH CHANGE_TRACKING AUTO
GO

ALTER FULLTEXT INDEX ON [dbo].[dashCommerce_Store_Product] ADD ([Name] LANGUAGE 1033)
GO
ALTER FULLTEXT INDEX ON [dbo].[dashCommerce_Store_Product] ADD (ShortDescription LANGUAGE 1033)
GO
ALTER FULLTEXT INDEX ON [dbo].[dashCommerce_Store_Product] ADD (BaseSku LANGUAGE 1033)
GO

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Sql
Actions:   Bookmark and Share | Permalink | Comments (1) | Comment RSSRSS comment feed

Find a table by name into SQL Server 2000 and SQLServer 2005

Monday, 20 July 2009 12:31 by myro

In SQL Server 2005 you can get a list of all your Tables with a particular name using the system table sys.table:

SELECT *

FROM sys.tables

WHERE name LIKE '%YOUR_TABLE_NAME%'

but if you need to do the same task in a SQL Server 2000, you should use

use YOURDB

select *

from INFORMATION_SCHEMA.TABLES

where TABLE_NAME LIKE '%YOUR_TABLE_NAME%'

because sys.table is not supported into SQL 2000.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Sql
Actions:   Bookmark and Share | Permalink | Comments (0) | Comment RSSRSS comment feed

Insert into one table from another table SQL

Monday, 22 June 2009 18:00 by myro

Just a quick note to myself. I can never seem to find an example of this when I need it.
This insert statement copies records from TABLE_2 to TABLE_1 with some custom values

INSERT INTO TABLE_1 (Prd_ID, Sta_ID, StS_ID, TiP_ID, Prd_Titolo, Prd_Descrizione, Prd_ID_Catalogo, Prd_Notifica)
SELECT (SELECT max(Prd_ID) from INTO TABLE_1)+1, 1, 1, 17,  [INTO TABLE_2].Descrizione,  [INTO TABLE_2].Descrizione,  [INTO TABLE_2].Codice, 'N'
FROM [INTO TABLE_2]
WHERE  ([INTO TABLE_2].ID = 3)

hope this post can refresh your mind too...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:  
Categories:   Developer Life
Actions:   Bookmark and Share | Permalink | Comments (1) | Comment RSSRSS comment feed