Showing posts with label include. Show all posts
Showing posts with label include. Show all posts

Sunday, March 25, 2012

Creating Unique Indexes on Partition table..

In partition tables, SQL Server forces to include the Partition column as part of unique index/unique constraint or primary key. Is there a way to over-ride this option.

We have a table, which is partitioned on a Calculated Column (generated using custom logic). Also we need to enforce uniqueness based on few other columns. But SQL Server does not allow indexes/contraints on these columns without including the partition column.

Thanks for your help.

Well, you can create a non-aligned unique index on a partitioned table, but doing that will in essence not allow meta-data-only partition switching. Depending on your needs, that may be ok or not. You could also use a DML trigger to enforce uniqueness instead of a unique index. Or, if your environment allows for the use of them, you could always create an indexed view on the table and create a unique index on that view that will in essence enforce the uniqueness on the corresponding table as well.

For more information, see the following topic in SQL 2005 BOL:

ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/5af648b1-8454-4c17-a47e-f9656572440b.htm

HTH,

Tuesday, March 20, 2012

creating stored procedures with msde ?

hye
Do ny help me by telling
1. Can we create stored procedures with MSDE ?
2. How can we include stored procedures with deployment ?
3. How can we install MSDE with our application ?
Vijay,
1. Yes
2. You install stored procedures with a SQL script
3. Check out
http://msdn.microsoft.com/library/de...l/msdedepl.asp
Jon Jahren
"vijay" <vkodwani@.ce.com.pk> wrote in message
news:8d5a15e3.0411110415.69d6ab90@.posting.google.c om...
> hye
> Do ny help me by telling
> 1. Can we create stored procedures with MSDE ?
> 2. How can we include stored procedures with deployment ?
> 3. How can we install MSDE with our application ?