Friday, December 24, 2010

How to copy assembly out of GAC?

You might Come across following situation while developing applications:
How to extract DLL from GAC?
How to take backup of dlls placed inside GAC?

Here's command that you can use to take backup of your GAC assemblies.

Create backup folder named 'AssemblyBack' where you want to place your backup files. I create folder at "C:\AssemblyBack"

Just navigate to the 'GAC_MSIL'

Once you are there just copy following command.
C:\Windows\assembly\GAC_MSIL>xcopy c:\AssemblyBack /s /y

Hope you find it useful.

Ashish Chotalia

Friday, December 17, 2010

sql server - Why the Full-Text indexing option is greyed out ?

If you find Full-Text Index option grayed out on particular table you can execute following command.

Open Query window and select database for which you want to activate Full-Text Index option. After that execute below code

EXEC sp_fulltext_database 'enable'

Ashish Chotalia

P.S - Replace [TableName] with yours.

Friday, December 3, 2010

Problem altering tables in SQL Server 2008

In SQL Server 2008 there's one option that prevents saving changes to table or alter script.

You might get error as shown below.

To resolve the issue follow steps mentioned below.

Go TO -> Tools -> Options -> Designers -> Uncheck Prevent saving changes that require table re-creation.

Here are the snaps for above solution.

AShish Chotalia

How to Resolve issue for Database diagram support objects cannot be installed

Many times you find situation when you need to design database using Database Diagram. When you try to open "Database Digram" node from SQL management studio you find following error.

You can resolve it by following script.

EXEC sp_dbcmptlevel 'DummyDB', '90';
use [DummyDB]

What above solution does ?
It will first make your compatibility level to 90. You can determine the level by below script.

select compatibility_level
from sys.databases
where name = 'DummyDB'

Here are list of compatibility level and MSSQL version mapping,

* 60 = MSSQL 6
* 65 = MSSQL 6.5
* 70 = MSSQL 7
* 80 = MSSQL 2000
* 90 = MSSQL 2005
* 100 = MSSQL 2008

Other thing is it will set authorization to the user name provided.
Right Click on Database
Go to properties
Click Files
you will end up as shown below.

Before running this script owner tab will be blank.
You can run above script or either go to the click button near by textbox and locate your user.

That's it.

Ashish Chotalia