Entries for month: December 2009

Todays' Ad

Upgrading from ColdFusion 8 to ColdFusion 9?

ColdFusion , ColdFusion 9 No Comments »

If you want to updgrade from Coldfusion 8 to Coldfusion 9 on your server then think twice before doing this. If you are working on big project where you have widly used coldfusion ajax component and custumize and play with ExtJs function for enhance your ajax functionality then this will be nightmare for you to migrating to Coldfusion 9. Main reason behind this is ColdFusion 8 is using ExtJs 1.X as ajax/javascript function and in Coldfusion 9 Adobe has used ExtJs 3.0. Below is quotes from ExtJs site for migration from Ext 1 to 2.

"Unfortunately, because of the architectural changes in the new version of Ext, it was not possible to maintain full backwards compatibility. While the Overview will help get you oriented with the new code base, this guide will provide the practical steps needed to migrate your code as painlessly as possible."

Means you may need to look at your all pages where you have applied enhance ajax functionality and this what I am doing right now.I am playing with cfgrid, cflayout and cfwindow which I have widly used in our system.

I will keep posting about migrating from CF 8 to CF 9 for different ajax component.

Rebuilds indexes for entire database

SQL No Comments »

In some cases we may need to rebuild indexes for wholeover the database. There are many ways to rebuild indexes on table but one I like is using DBCC DBREINDEX statement. This one statement we reindex single or all indexes on table. But again this will be very time consuming when you want to rendex for all tables in database.

Hmm... Not to worry we can appy reindexing to all tables by below SQL code.

DECLARE @tablename varchar(200)
DECLARE table_cursor CURSOR FOR 
select [name] from sysobjects where type='U'

OPEN table_cursor

FETCH NEXT FROM table_cursor INTO @tablename

WHILE @@FETCH_STATUS = 0
BEGIN
    DBCC DBREINDEX (@tablename, '', 80);
    FETCH NEXT FROM table_cursor INTO @tablename
END 
CLOSE table_cursor
DEALLOCATE table_cursor

SQL statement 

select [name] from sysobjects where type='U' 
will get all tables name in database and just looping thourgh cursor will reindex in whole database.

Keep passion while running this query as it will take time to reindix all tabes.

Powered by Mango Blog. Design and Icons by N.Design Studio | Menu Apycom
RSS Feeds