Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key)

Database
Enthusiast

Re: Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key)

Thanks for this valuable info.

Should i Check for this table every time when i'm altering table, And delete it if exists?

Or is there any setting that will delete this automatically if it exists, when i alter table ?

Parth

Ambassador

Re: Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key)

Hi Parth,

why do you want to disable/enable FKs? Due to bad performance?

In a DWH you hardly find FKs and if they're usually implemented using REFRENCE WITH (NO) CHECK OPTION.

Enthusiast

Re: Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key)

Thanks

I Have Created a Seapare Procedure which will Drop All Tables having myTableNameToMask || '

0' before Adding Constraint.

Thanks all.

Parth

Enthusiast

Re: Temporary Disable\enable Constraints (Foreign Key, Check Constriant, Unique Key)

that was myTableNameToMask || '_0' in above comment.
Spell Mistake

Parth