Return-Path: Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: (qmail 85725 invoked from network); 13 Jul 2006 07:19:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2006 07:19:34 -0000 Received: (qmail 75240 invoked by uid 500); 13 Jul 2006 07:19:33 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 75219 invoked by uid 500); 13 Jul 2006 07:19:33 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 75208 invoked by uid 99); 13 Jul 2006 07:19:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 00:19:33 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 00:19:31 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 800DD410503 for ; Thu, 13 Jul 2006 07:17:32 +0000 (GMT) Message-ID: <30775841.1152775052521.JavaMail.jira@brutus> Date: Thu, 13 Jul 2006 07:17:32 +0000 (GMT+00:00) From: "Thomas Dudziak (JIRA)" To: ddlutils-dev@db.apache.org Subject: [jira] Updated: (DDLUTILS-109) MSSqlBuilder can't drop a table with constraints with names longer than 60 characters In-Reply-To: <24648581.1148888249774.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DDLUTILS-109?page=3Dall ] Thomas Dudziak updated DDLUTILS-109: ------------------------------------ Component: Core - SqlServer > MSSqlBuilder can't drop a table with constraints with names longer than 6= 0 characters > -------------------------------------------------------------------------= ------------ > > Key: DDLUTILS-109 > URL: http://issues.apache.org/jira/browse/DDLUTILS-109 > Project: DdlUtils > Type: Bug > Components: Core - SqlServer > Reporter: Christoffer Hammarstr=C3=B6m > Assignee: Thomas Dudziak > Attachments: DDLUTILS-109.patch > > I get this error because the constraint name has been truncated to 60 cha= racters (These are the same foreign keys i had trouble with in DDLUTILS-106= , but on existing databases): > 'new_doc_permission_sets_ex_FK_meta_id_set_id_new_doc_permiss' is not a c= onstraint. Query: IF EXISTS (SELECT 1 FROM sysobjects WHERE type =3D 'U' AN= D name =3D 'Tmp_new_doc_permission_sets') > BEGIN > DECLARE @reftable nvarchar(60), @constraintname nvarchar(60) > DECLARE refcursor CURSOR FOR > select reftables.name tablename, cons.name constraintname > from sysobjects tables, > sysobjects reftables, > sysobjects cons, > sysreferences ref > where tables.id =3D ref.rkeyid > and cons.id =3D ref.constid > and reftables.id =3D ref.fkeyid > and tables.name =3D 'Tmp_new_doc_permission_sets' OPEN refcu= rsor > FETCH NEXT from refcursor into @reftable, @constraintname > while @@FETCH_STATUS =3D 0 > BEGIN > exec ('alter table '+@reftable+' drop constraint '+@constraintname= ) > FETCH NEXT from refcursor into @reftable, @constraintname > END > CLOSE refcursor > DEALLOCATE refcursor > DROP TABLE Tmp_new_doc_permission_sets > END; --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira