显示标签为“creation”的博文。显示所有博文
显示标签为“creation”的博文。显示所有博文

2012年3月22日星期四

Discussion about dynamic creation of partitions in AS2005

I have searched around and found very little about dynamically creating (and processesing) partitions in AS2005.

In AS2000 it is actually quite easy to manage partitions dynamically using a metadata table and DSO, but i had hoped that they came a little further in AS2005. Basically it's all about dynamically creating a partition for each month of a year or just partitioning over years. Does anyone have some good input about how to do it in AS2005 ?

Furthermore does someone have a comment on which prefferable option to choose (or maybe a completely other way) concerning partitions.

Option 1:

Partition "FACT_SALES_2005" points to a view called "v_FACT_SALES_2005" that is a "Select col1,col2 from FACT_SALES where period_year = 2005". The FACT_SALES table has a clustered index on period_year.

This way it's easy to manage views using a stored_procedure (create new view when we enter a new month etc.) and all the data resides in one single table which eases the ETL (in my opinion)

Option 2:

Partition "FACT_SALES_2005" points to a table called "FACT_SALES_2005".

This way it connects directly to the table, which someway is ok when it's partitioned in years, but what if you want to partition in months or weeks (52 weeks a year for 5 years of data). Then it becomes hard to manage.

Option 3:

Use partitioned tables and somehow point to a specific partition in the partitioned table from AS2005.

This i havent tried. But how will this perform. If you have a partitioned table that is partitioned in months, how do you reffer to let's say April 2006 in that partitioned table (FACT_SALES) from AS2005. And how about setting the Slice value of that partition....

Hi there,

i've had the same Problem and written a Assembly in .Net. This Assembly do all the things you can do from the GUI.

So i can process, create, ... Partitions from a stored Procedure in SQL. It works very nice. If you have detail Questions, aske me

Kind Regards

Andy L?wen

|||

You might take a look at:
http://www.codeplex.com/ASStoredProcedures/Wiki/View.aspx?title=Partition

That function isn't in the latest release, so you'll have to download the source code and compile it yourself from:
http://www.codeplex.com/ASStoredProcedures/SourceControl/ListDownloadableCommits.aspx

|||

It is definitely worth having a look at the code that furmangg points to. You should be able to use this "out of the box" or if not it will give you a good starting point.

There is one variation that is probably the easiest to manage which is similar to option 1. And that is to have all your data in a single table and then use a query as the data source for the partition to only select the data for a specific period. (essentially storing the view definition in the partition rather than creating a separate view object in the relational database)

And just a quick note on option 3. When you have a partitioned table it appears to all the other applications as if it is a single table, the data is partitioned based on specific data values, so selecting data from a particular partition is simply a matter of using a where clause that matches the partitioning scheme.

|||

Nice, i'll have a look at it.

I just think it's funny the Microsoft hasn't put any more attention into partitioning setup/handling since it's the most obvious thing to use when working with large cubes, which again is what SQL Server 2005 is profiling itself to handle very well.

sql

2012年3月7日星期三

Disapearing Records

The first line in my global.asax is the creation of an ActiveX object that will hold a data connection to a SQL2000 Server database for the lifespan of an "Application" scope.

< OBJECT RUNAT="Server" SCOPE="Application" ID="Conn" name="Conn" PROGID="ADODB.Connection" VIEWASTEXT >< /OBJECT >


With that done, every time a new user invokes global.asax, a routine will verify rather it needs to open the connection or if the connection is already open:

If Conn.State <> adStateOpen Then
Conn.ConnectionTimeOut = 999999
Conn.ConnectionString = strConnStr
Conn.CursorLocation = adUseClient
Conn.Open
End If

The purpose of this is to avoid 400 simultaneous users from having to wait for their connections to estabilish communication to the server before initiating transaction.

Surprisingly enough, this works perfectly (for a massively shared, perpetual Connection object), except that once or twice a month, a record disapears from the main database and takes with it all relevant records from supporting tables.

Yes, it seems like a Forced Roolback is being issued...

Do you see Why?

Aleks,

I don't see anything that would cause that behavior based on the code you've provided.

Logging deletions through a trigger is one possible first step to figuring out when, where and why the behavior is occurring.

David Sceppa
Microsoft

2012年2月19日星期日

Disable temporary table creation

Dear,
Is there a way to disallow a user to create a temporary table?
Thanks,
PeterYou could set explicit access-denied permissions for that user on tempdb,
but in so doing you would break numerous system stored procedures, ADO
functions, and a large number of applications and tools out there, for that
user.
-Mark
<pgp.coppens@.pandora.be> wrote in message
news:1115628367.375613.173760@.g14g2000cwa.googlegroups.com...
> Dear,
> Is there a way to disallow a user to create a temporary table?
> Thanks,
> Peter
>|||pgp.coppens,
Why would you want to do that? Could you describe your situation further?
Perhaps you should disallow all direct access to SQL Server tables and only
allow access to data through stored procedures and/or views.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
"pgp.coppens@.pandora.be" wrote:

> Dear,
> Is there a way to disallow a user to create a temporary table?
> Thanks,
> Peter
>|||Mark Allison schreef:
> pgp.coppens,
> Why would you want to do that? Could you describe your situation
further?
> Perhaps you should disallow all direct access to SQL Server tables
and only[vbcol=seagreen]
> allow access to data through stored procedures and/or views.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
>
> "pgp.coppens@.pandora.be" wrote:
>
Actually I am trying to create an apparently very artificial
environment so that I can document the error messages a user might get
when his server does not allow him to create temporary tables and the
application (I am trying to document) attempts it.
But from the looks of the reactions not many SQLServer servers will be
configured in such a way I guess, so it might not be worth the effort.
Thanks for all your reactions.
Peter

2012年2月14日星期二

disable foreign keys

Is there a way to disable foreign keys on tables without dropping them?
Unchecking "check existing data on creation" wont cut it here as the FK
already exists, I just want to delete from the table.
sql2k
TIA, ChrisR-- Disable all table constraints
ALTER TABLE MyTable NOCHECK CONSTRAINT ALL
-- Enable all table constraints
ALTER TABLE MyTable CHECK CONSTRAINT ALL
-- Disable single constraint
ALTER TABLE MyTable NOCHECK CONSTRAINT MyConstraint
-- Enable single constraint
ALTER TABLE MyTable CHECK CONSTRAINT MyConstraint
From: Roman Rehak:
http://sqljunkies.com/WebLog/roman/archive/2005/01/30/7037.aspx
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Is there a way to disable foreign keys on tables without dropping them?
> Unchecking "check existing data on creation" wont cut it here as the FK
> already exists, I just want to delete from the table.
> sql2k
> TIA, ChrisR
>|||ALTER DATABASE tblname
NOCHECK CONSTRAINT ...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Is there a way to disable foreign keys on tables without dropping them? Unchecking "check existing
> data on creation" wont cut it here as the FK already exists, I just want to delete from the table.
> sql2k
> TIA, ChrisR
>|||With nocheck doesnt enable me to delete data on a table that is a parent to
another table.
"ChrisR" <noemail@.bla.com> wrote in message
news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Is there a way to disable foreign keys on tables without dropping them?
> Unchecking "check existing data on creation" wont cut it here as the FK
> already exists, I just want to delete from the table.
> sql2k
> TIA, ChrisR
>|||Hmmh, I thought i understood you ;-) You want to ignore inserting data, even
if there is no parent row in the other entity, but you want a Cascading
delete on the parent table ?
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:eMFPylaVFHA.628@.tk2msftngp13.phx.gbl...
> With nocheck doesnt enable me to delete data on a table that is a parent
> to another table.
>
> "ChrisR" <noemail@.bla.com> wrote in message
> news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
>> Is there a way to disable foreign keys on tables without dropping them?
>> Unchecking "check existing data on creation" wont cut it here as the FK
>> already exists, I just want to delete from the table.
>> sql2k
>> TIA, ChrisR
>|||No. I just want to delete a parent, leaving the child untouched.
"Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
> Hmmh, I thought i understood you ;-) You want to ignore inserting data,
> even if there is no parent row in the other entity, but you want a
> Cascading delete on the parent table ?
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
> news:eMFPylaVFHA.628@.tk2msftngp13.phx.gbl...
>> With nocheck doesnt enable me to delete data on a table that is a parent
>> to another table.
>>
>> "ChrisR" <noemail@.bla.com> wrote in message
>> news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
>> Is there a way to disable foreign keys on tables without dropping them?
>> Unchecking "check existing data on creation" wont cut it here as the FK
>> already exists, I just want to delete from the table.
>> sql2k
>> TIA, ChrisR
>>
>|||Ok, thats kinda weird, but ok ;-)
Do this with a trigger, as the follwoing example:
CREATE TRIGGER TRG_DEL_ChildTabel ON ChildTable
FOR DELETE
AS
BEGIN
Delete from parenttable where ReferencedIdColumn IN
(Select ReferencedIdColumn From Deleted)
END
That should work,
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:eKsCiyaVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> No. I just want to delete a parent, leaving the child untouched.
>
> "Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
>> Hmmh, I thought i understood you ;-) You want to ignore inserting data,
>> even if there is no parent row in the other entity, but you want a
>> Cascading delete on the parent table ?
>> HTH, Jens Suessmeyer.
>> --
>> http://www.sqlserver2005.de
>> --
>> "ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
>> news:eMFPylaVFHA.628@.tk2msftngp13.phx.gbl...
>> With nocheck doesnt enable me to delete data on a table that is a parent
>> to another table.
>>
>> "ChrisR" <noemail@.bla.com> wrote in message
>> news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
>> Is there a way to disable foreign keys on tables without dropping them?
>> Unchecking "check existing data on creation" wont cut it here as the FK
>> already exists, I just want to delete from the table.
>> sql2k
>> TIA, ChrisR
>>
>>
>|||Disabling a foreign key constraint allow you to do just that:
USE tempdb
GO
CREATE TABLE t1(c1 int primary key)
CREATE TABLE t2(c1 int primary key)
GO
alter table t2
add constraint cnstr foreign key (c1) references t1(c1)
GO
alter table t2 nocheck constraint cnstr
go
insert into t1 values(1)
insert into t2 values(1)
delete from t1 where c1 = 1
select * from t1
select * from t2
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:eKsCiyaVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> No. I just want to delete a parent, leaving the child untouched.
>
> "Jens Süßmeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in message
> news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
>> Hmmh, I thought i understood you ;-) You want to ignore inserting data, even if there is no
>> parent row in the other entity, but you want a Cascading delete on the parent table ?
>> HTH, Jens Suessmeyer.
>> --
>> http://www.sqlserver2005.de
>> --
>> "ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag news:eMFPylaVFHA.628@.tk2msftngp13.phx.gbl...
>> With nocheck doesnt enable me to delete data on a table that is a parent to another table.
>>
>> "ChrisR" <noemail@.bla.com> wrote in message news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
>> Is there a way to disable foreign keys on tables without dropping them? Unchecking "check
>> existing data on creation" wont cut it here as the FK already exists, I just want to delete
>> from the table.
>> sql2k
>> TIA, ChrisR
>>
>>
>

disable foreign keys

Is there a way to disable foreign keys on tables without dropping them?
Unchecking "check existing data on creation" wont cut it here as the FK
already exists, I just want to delete from the table.
sql2k
TIA, ChrisR-- Disable all table constraints
ALTER TABLE MyTable NOCHECK CONSTRAINT ALL
-- Enable all table constraints
ALTER TABLE MyTable CHECK CONSTRAINT ALL
-- Disable single constraint
ALTER TABLE MyTable NOCHECK CONSTRAINT MyConstraint
-- Enable single constraint
ALTER TABLE MyTable CHECK CONSTRAINT MyConstraint
From: Roman Rehak:
http://sqljunkies.com/WebLog/roman/...01/30/7037.aspx
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Is there a way to disable foreign keys on tables without dropping them?
> Unchecking "check existing data on creation" wont cut it here as the FK
> already exists, I just want to delete from the table.
> sql2k
> TIA, ChrisR
>|||ALTER DATABASE tblname
NOCHECK CONSTRAINT ...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...[
vbcol=seagreen]
> Is there a way to disable foreign keys on tables without dropping them? Un
checking "check existing
> data on creation" wont cut it here as the FK already exists, I just want t
o delete from the table.
> sql2k
> TIA, ChrisR
>[/vbcol]|||With nocheck doesnt enable me to delete data on a table that is a parent to
another table.
"ChrisR" <noemail@.bla.com> wrote in message
news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Is there a way to disable foreign keys on tables without dropping them?
> Unchecking "check existing data on creation" wont cut it here as the FK
> already exists, I just want to delete from the table.
> sql2k
> TIA, ChrisR
>|||Hmmh, I thought i understood you ;-) You want to ignore inserting data, even
if there is no parent row in the other entity, but you want a Cascading
delete on the parent table ?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:eMFPylaVFHA.628@.tk2msftngp13.phx.gbl...
> With nocheck doesnt enable me to delete data on a table that is a parent
> to another table.
>
> "ChrisR" <noemail@.bla.com> wrote in message
> news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
>|||No. I just want to delete a parent, leaving the child untouched.
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
> Hmmh, I thought i understood you ;-) You want to ignore inserting data,
> even if there is no parent row in the other entity, but you want a
> Cascading delete on the parent table ?
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
> news:eMFPylaVFHA.628@.tk2msftngp13.phx.gbl...
>|||Ok, thats kinda weird, but ok ;-)
Do this with a trigger, as the follwoing example:
CREATE TRIGGER TRG_DEL_ChildTabel ON ChildTable
FOR DELETE
AS
BEGIN
Delete from parenttable where ReferencedIdColumn IN
(Select ReferencedIdColumn From Deleted)
END
That should work,
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:eKsCiyaVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> No. I just want to delete a parent, leaving the child untouched.
>
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
>|||Disabling a foreign key constraint allow you to do just that:
USE tempdb
GO
CREATE TABLE t1(c1 int primary key)
CREATE TABLE t2(c1 int primary key)
GO
alter table t2
add constraint cnstr foreign key (c1) references t1(c1)
GO
alter table t2 nocheck constraint cnstr
go
insert into t1 values(1)
insert into t2 values(1)
delete from t1 where c1 = 1
select * from t1
select * from t2
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:eKsCiyaVFHA.3152@.TK2MSFTNGP12.phx.gbl...[vb
col=seagreen]
> No. I just want to delete a parent, leaving the child untouched.
>
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote i
n message
> news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
>[/vbcol]

disable foreign keys

Is there a way to disable foreign keys on tables without dropping them?
Unchecking "check existing data on creation" wont cut it here as the FK
already exists, I just want to delete from the table.
sql2k
TIA, ChrisR
-- Disable all table constraints
ALTER TABLE MyTable NOCHECK CONSTRAINT ALL
-- Enable all table constraints
ALTER TABLE MyTable CHECK CONSTRAINT ALL
-- Disable single constraint
ALTER TABLE MyTable NOCHECK CONSTRAINT MyConstraint
-- Enable single constraint
ALTER TABLE MyTable CHECK CONSTRAINT MyConstraint
From: Roman Rehak:
http://sqljunkies.com/WebLog/roman/a...1/30/7037.aspx
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Is there a way to disable foreign keys on tables without dropping them?
> Unchecking "check existing data on creation" wont cut it here as the FK
> already exists, I just want to delete from the table.
> sql2k
> TIA, ChrisR
>
|||ALTER DATABASE tblname
NOCHECK CONSTRAINT ...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Is there a way to disable foreign keys on tables without dropping them? Unchecking "check existing
> data on creation" wont cut it here as the FK already exists, I just want to delete from the table.
> sql2k
> TIA, ChrisR
>
|||With nocheck doesnt enable me to delete data on a table that is a parent to
another table.
"ChrisR" <noemail@.bla.com> wrote in message
news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
> Is there a way to disable foreign keys on tables without dropping them?
> Unchecking "check existing data on creation" wont cut it here as the FK
> already exists, I just want to delete from the table.
> sql2k
> TIA, ChrisR
>
|||Hmmh, I thought i understood you ;-) You want to ignore inserting data, even
if there is no parent row in the other entity, but you want a Cascading
delete on the parent table ?
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:eMFPylaVFHA.628@.tk2msftngp13.phx.gbl...
> With nocheck doesnt enable me to delete data on a table that is a parent
> to another table.
>
> "ChrisR" <noemail@.bla.com> wrote in message
> news:%23pegtSaVFHA.3280@.TK2MSFTNGP09.phx.gbl...
>
|||No. I just want to delete a parent, leaving the child untouched.
"Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in
message news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
> Hmmh, I thought i understood you ;-) You want to ignore inserting data,
> even if there is no parent row in the other entity, but you want a
> Cascading delete on the parent table ?
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
> "ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
> news:eMFPylaVFHA.628@.tk2msftngp13.phx.gbl...
>
|||Ok, thats kinda weird, but ok ;-)
Do this with a trigger, as the follwoing example:
CREATE TRIGGER TRG_DEL_ChildTabel ON ChildTable
FOR DELETE
AS
BEGIN
Delete from parenttable where ReferencedIdColumn IN
(Select ReferencedIdColumn From Deleted)
END
That should work,
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"ChrisR" <noemail@.bla.com> schrieb im Newsbeitrag
news:eKsCiyaVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> No. I just want to delete a parent, leaving the child untouched.
>
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote
> in message news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
>
|||Disabling a foreign key constraint allow you to do just that:
USE tempdb
GO
CREATE TABLE t1(c1 int primary key)
CREATE TABLE t2(c1 int primary key)
GO
alter table t2
add constraint cnstr foreign key (c1) references t1(c1)
GO
alter table t2 nocheck constraint cnstr
go
insert into t1 values(1)
insert into t2 values(1)
delete from t1 where c1 = 1
select * from t1
select * from t2
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"ChrisR" <noemail@.bla.com> wrote in message news:eKsCiyaVFHA.3152@.TK2MSFTNGP12.phx.gbl...
> No. I just want to delete a parent, leaving the child untouched.
>
> "Jens Smeyer" <Jens@.Remove_this_For_Contacting.sqlserver2005.de> wrote in message
> news:O$glUoaVFHA.2560@.TK2MSFTNGP10.phx.gbl...
>

Disable database diagram creation

I have a MSSQL 2000 SP4 server.
I need to disable ability to create database diagrams for users.
How can I do this?To create a diagram, they would need to be the database
owner or a member of the db_owner role (or a sysadmin).
Don't add them to those roles.
You can figure out the specific object permissions in the
following article - different issue than yours but it lists
the permissions.
http://support.microsoft.com/?id=327145
-Sue
On 24 Oct 2006 08:38:06 -0700, slousch@.gmail.com wrote:

>I have a MSSQL 2000 SP4 server.
>I need to disable ability to create database diagrams for users.
>How can I do this?|||User is not db_owner and not in sysadmin,
there are no permissions to public database role,
but he is still able to create diagrams.
I want to get "You do not have sufficient privileges to create the new
diagram." message,
when user trying to creaate diagram.
Sue Hoegemeier wrote:
> To create a diagram, they would need to be the database
> owner or a member of the db_owner role (or a sysadmin).
> Don't add them to those roles.
> You can figure out the specific object permissions in the
> following article - different issue than yours but it lists
> the permissions.
> http://support.microsoft.com/?id=327145
> -Sue|||Check the permissions on the objects listed in the article.
-Sue
On 25 Oct 2006 04:09:54 -0700, slousch@.gmail.com wrote:
[vbcol=seagreen]
>User is not db_owner and not in sysadmin,
>there are no permissions to public database role,
>but he is still able to create diagrams.
>I want to get "You do not have sufficient privileges to create the new
>diagram." message,
>when user trying to creaate diagram.
>Sue Hoegemeier wrote:

Disable constraint creation for subscriber

Hello,

It seems we have a table that is on merge replication the table by default doesn't have a PK on it. This table only has about 50 rows of data, somewhere during the initialization process it's trying to create a PK by default on the client end. My assumption is during the creation of the snapshot a script is being generated that we do not want. How can we prevent them from happening as it's creating a PK violation.

The schema script 'if object_id(N'[dbo].[checklistimported]') is not null exec('ALTER TABLE [dbo].[checklistimported] ADD CONSTRAINT
PK_listimported PRIMARY KEY CLUSTERED
(
projectid,
chklstid,
unit,
lot
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

')' could not be propagated to the subscriber due to an error in creating index. A possible cause of this error is one or more join filters has the join_unique_key property se

server SQL2k5 SP1

client SQL Express

Actually the PK should have existed at the publisher side. If it does not exist at the publisher side, it will not be created at the subscriber side.

Are the two servers (publisher and subscriber) with the same case sensitivity? I am suspecting that's the problem.