Re: Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'ClGeClie'

Tech-Archive recommends: Fix windows errors by optimizing your registry



On Jul 4, 11:13 pm, "Christiano" <cdo...@xxxxxxxxxxxxxxxxxx> wrote:
thank you very much....

just one more thing...

the application that uses that database is 24-7 on...

can i somehow make this modification on the fly during the dts copy???

tks in advance...
christiano.

"matteus" <matteog...@xxxxxxxxx> escreveu na mensagemnews:62b79657-0137-46a1-8a2e-f36ddb915fbb@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

On Jul 4, 3:56 pm, "Christiano" <cdo...@xxxxxxxxxxxxxxxxxx> wrote:
I have 3 tables:
Clientes
Gerenciadoras
ClientesGerenciadoras..

The first lists all the clientes
The second the companies
The 3rd is a relation table n:n that crosses those 2 other tables
with
foreign keys

When i'm copying these with DTS (with the Copy SQL Server Objects
method),
at 96% it crashes, returning the message in the title...
The tables are all consistent... all data are valid...

what can I do to solve this???

the code generate codes and DTS config are following:

------------------------------

CREATE TABLE [dbo].[Gerenciadoras](
[GereCodi] [int] IDENTITY(1,1) NOT NULL,
[GereNome] [varchar](50) COLLATE Latin1_General_CI_AS NULL,
CONSTRAINT [PK_GereCodi] PRIMARY KEY CLUSTERED
(
[GereCodi] ASC
) ON [PRIMARY]
) ON [PRIMARY]

--------------------------------

CREATE TABLE [dbo].[Clientes](
[ClieCodi] [int] IDENTITY(1,1) NOT NULL,
[ClieNome] [varchar](100) COLLATE SQL_Latin1_General_CP850_CI_AI NULL,
[ClieCNPJ] [varchar](20) COLLATE Latin1_General_CI_AS NULL,
[cliegere] [int] NULL,
CONSTRAINT [PK_ClieCodi] PRIMARY KEY CLUSTERED
(
[ClieCodi] ASC
) ON [PRIMARY]
) ON [PRIMARY]

------------------------------

CREATE TABLE [dbo].[ClientesGerenciadoras](
[ClGeClie] [int] NULL,
[ClGeGere] [int] NULL
) ON [PRIMARY]

GO
USE [EscoltaOnline]
GO
ALTER TABLE [dbo].[ClientesGerenciadoras] WITH CHECK ADD FOREIGN
KEY([ClGeClie])
REFERENCES [dbo].[Clientes] ([ClieCodi])
GO
ALTER TABLE [dbo].[ClientesGerenciadoras] WITH CHECK ADD FOREIGN
KEY([ClGeGere])
REFERENCES [dbo].[Gerenciadoras] ([GereCodi])

------------------

DTS:
Create destination objects with include dependent objects and extended
properties checked (already tried with drop first check and unchecked),
copy data replacing ,
use colation,
copy all objects,
not using default options, instead i'm using the 1st and 3rd security
options.

Hi Christiano,
try to UNCHECK the 'Copy primary and Foreign Keys' Option of the copy
sql objects task, delete the costraints (pk and fk) and set the pk
field of the two entity-tables (customers and companies) to a simple
int field (i mean trasfomr it form an identity to a normal int)

If it works then attach an execute sql task to rebuild your
constraints and original table structure.
Hope this helps!
M.

no, you cannot modify a dts while it's running.
I gave you a hint on which could be the cause of dts failure... if
it's fail because of pk and fk i would rather investigate to find
another way to move data. i would never use this process (removing pk
and fk constraints and creating them after the data has moved) in
production.
Bye,
M.
.



Relevant Pages

  • Re: Cannot execute a DTS that imports
    ... The DTS has a ActiveX-script: ... Enable identiy Insert is turned off; check constraint is checked. ... >> violation; attempt to insert NULL data or data which violates ... Unspecified error." ...
    (microsoft.public.sqlserver.dts)
  • Re: Primary key error handling SSIS
    ... ssis does not appear under the Enterprise Development newsgroup, ... often referred to as dts. ... cannot handle the PK constraint error? ... Are there any better methods than a staging table to cleanse the data? ...
    (microsoft.public.sqlserver.dts)
  • Re: Error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name ClGeClie
    ... When i'm copying these with DTS (with the Copy SQL Server Objects ... CONSTRAINT PRIMARY KEY CLUSTERED ... int field ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS Database Transfer Problem
    ... The DTS package is very simple, it consists of one 'Copy SQL Server Objects' task. ... This task is set to drop all objects, recreate them, transfer the data and then restore all constraints and relationships. ... that there's no consistency to exactly which constraint ... I suspect that the problem is due to the fact that the database is being ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS does not exlude non-selected tables
    ... In the task make sure you uncheck "Include dependent objects" ... Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) ... www.SQLDTS.com - The site for all your DTS needs. ... > Using enterprose manager I build a DTS package that uses the copy object task. ...
    (microsoft.public.sqlserver.dts)