Showing posts with label tables. Show all posts
Showing posts with label tables. Show all posts

Thursday, March 29, 2012

Error loading tables of different file groups.

Hi All,

I am facing a peculier problem. Problem definition goes like this,

I have one staging DB in which all the tables resides in Primary file and one production DB in which tables resides in 2 secondary files.

Now when iam trying to load the data from the table A in staging which is on primary file to the table A1 in production DB which in secondary file, all the data are going to error log instead of table A1.

Can you please tell me, where am i going wrong.

Regards,

Chetan

No. Not without the error message. Can you provide it?

-Jamie

|||

HI Jamie,

Sorry for that, error code and error message is as follows.

Error code:-1071607685

Error Message: No status is available.

Regards,

Chetan

sql

Thursday, March 22, 2012

error in transfer sql task

I am trying to transfer tables from a 2000 database to a 2005 database. I selected only the tables I wanted and when executing the task I get:

Error: 0xC002F363 at Copy Tables, Transfer Sql Server Objects Task: Table "XXX" does not exist at the source.
Task failed: Copy Tables

I have the correct permisions on both (they are both dbo.) and I can create DataFlow tasks for each individual table, however there are about 50-75 tables I need to copy. I tried recreating the package with no luck. Any ideas?

Thanks,
Abe

Try using "Windows Authentication" instead of "SQL Server Authentication" at the destination. I remember seeing a bug (which has been fixed and will be made available in the next SP release).|||I am using windows authentication in the destiantion. I don't have a choice other than using sql authetication at the source though.|||Sorry. The information I gave was not correct.

I did not read your post carefully. I was referring to a different bug related to transfer of objects between two SQL Server 2005 servers.

As far as your problem is concerned, it has been identified as a bug and being handled.

Hopefully the fix will be available soon.

Wednesday, March 7, 2012

Error in Inintial Replication

I'm Replicating from one SQL200 db to another on our LAN. The target db is
blank, but on some of the tables, it fails with:
Could not bulk insert. Bulk data stream was incorrectly specified as sorted.
(Source: STAN (Data source); Error number: 4819)
I've verified that the collation and sort order are the same. Any ideas?
Jeff
Jeff,
Make sure the publisher and subscriber have the same collations - this
is normally due to differing collations.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Jeff Dillon wrote:
> I'm Replicating from one SQL200 db to another on our LAN. The target db is
> blank, but on some of the tables, it fails with:
> Could not bulk insert. Bulk data stream was incorrectly specified as sorted.
> (Source: STAN (Data source); Error number: 4819)
> I've verified that the collation and sort order are the same. Any ideas?
> Jeff
>
|||As I stated, they do have the same collation. Even using an empty database
as the subscriber causes this. So far, it appears the tables that are
failing have text columns.
I did a Google search on this, and the common reply is to check collation.
In neither of the 2 cases I found was collation the issue. It was never
resolved. Appears to be a bug.
I run sp_helpsort in each database, and it returns the same results. Is
there somewhere else I need to check?
Jeff
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:O8JpwvUpEHA.2948@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Jeff,
> Make sure the publisher and subscriber have the same collations - this
> is normally due to differing collations.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Jeff Dillon wrote:
is[vbcol=seagreen]
sorted.[vbcol=seagreen]
|||I found the problem. I had a wide clustered index (by wide I mean several
fields, including varchar).
I changed it to non-clustered, and it works. Bug? maybe...
Jeff
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:eEnFD0WpEHA.2612@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> As I stated, they do have the same collation. Even using an empty database
> as the subscriber causes this. So far, it appears the tables that are
> failing have text columns.
> I did a Google search on this, and the common reply is to check collation.
> In neither of the 2 cases I found was collation the issue. It was never
> resolved. Appears to be a bug.
> I run sp_helpsort in each database, and it returns the same results. Is
> there somewhere else I need to check?
> Jeff
> "Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
> news:O8JpwvUpEHA.2948@.TK2MSFTNGP11.phx.gbl...
db[vbcol=seagreen]
> is
> sorted.
ideas?
>

Error in Inintial Replication

I'm Replicating from one SQL200 db to another on our LAN. The target db is
blank, but on some of the tables, it fails with:
Could not bulk insert. Bulk data stream was incorrectly specified as sorted.
(Source: STAN (Data source); Error number: 4819)
I've verified that the collation and sort order are the same. Any ideas?
JeffJeff,
Make sure the publisher and subscriber have the same collations - this
is normally due to differing collations.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Jeff Dillon wrote:
> I'm Replicating from one SQL200 db to another on our LAN. The target db is
> blank, but on some of the tables, it fails with:
> Could not bulk insert. Bulk data stream was incorrectly specified as sorted.
> (Source: STAN (Data source); Error number: 4819)
> I've verified that the collation and sort order are the same. Any ideas?
> Jeff
>|||As I stated, they do have the same collation. Even using an empty database
as the subscriber causes this. So far, it appears the tables that are
failing have text columns.
I did a Google search on this, and the common reply is to check collation.
In neither of the 2 cases I found was collation the issue. It was never
resolved. Appears to be a bug.
I run sp_helpsort in each database, and it returns the same results. Is
there somewhere else I need to check?
Jeff
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:O8JpwvUpEHA.2948@.TK2MSFTNGP11.phx.gbl...
> Jeff,
> Make sure the publisher and subscriber have the same collations - this
> is normally due to differing collations.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Jeff Dillon wrote:
> > I'm Replicating from one SQL200 db to another on our LAN. The target db
is
> > blank, but on some of the tables, it fails with:
> >
> > Could not bulk insert. Bulk data stream was incorrectly specified as
sorted.
> > (Source: STAN (Data source); Error number: 4819)
> >
> > I've verified that the collation and sort order are the same. Any ideas?
> >
> > Jeff
> >
> >|||I found the problem. I had a wide clustered index (by wide I mean several
fields, including varchar).
I changed it to non-clustered, and it works. Bug? maybe...
Jeff
"Jeff Dillon" <jeff@.removeemergencyreporting.com> wrote in message
news:eEnFD0WpEHA.2612@.TK2MSFTNGP15.phx.gbl...
> As I stated, they do have the same collation. Even using an empty database
> as the subscriber causes this. So far, it appears the tables that are
> failing have text columns.
> I did a Google search on this, and the common reply is to check collation.
> In neither of the 2 cases I found was collation the issue. It was never
> resolved. Appears to be a bug.
> I run sp_helpsort in each database, and it returns the same results. Is
> there somewhere else I need to check?
> Jeff
> "Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
> news:O8JpwvUpEHA.2948@.TK2MSFTNGP11.phx.gbl...
> > Jeff,
> >
> > Make sure the publisher and subscriber have the same collations - this
> > is normally due to differing collations.
> > --
> > Mark Allison, SQL Server MVP
> > http://www.markallison.co.uk
> >
> > Looking for a SQL Server replication book?
> > http://www.nwsu.com/0974973602m.html
> >
> >
> > Jeff Dillon wrote:
> > > I'm Replicating from one SQL200 db to another on our LAN. The target
db
> is
> > > blank, but on some of the tables, it fails with:
> > >
> > > Could not bulk insert. Bulk data stream was incorrectly specified as
> sorted.
> > > (Source: STAN (Data source); Error number: 4819)
> > >
> > > I've verified that the collation and sort order are the same. Any
ideas?
> > >
> > > Jeff
> > >
> > >
>

Sunday, February 26, 2012

error in Enterprise Manager while returning all or few rows.

Hi, Everyone
I use SQL Server Enterprise Manager to access DB server.
I can connect and see the tables fine. But when i tried
to open table returen all rows or open design table, I
got an error saying:
An unexpected error happend during this operation.
[MS Desgin Tools] -- Not enough storage is available to
complete this operation.
Any idea how to fix this? This is SQL2K SP4 on WIN2K SP4.
Thanks
Adi ..adi wrote:
> Hi, Everyone
> I use SQL Server Enterprise Manager to access DB server.
> I can connect and see the tables fine. But when i tried
> to open table returen all rows or open design table, I
> got an error saying:
> An unexpected error happend during this operation.
> [MS Desgin Tools] -- Not enough storage is available to
> complete this operation.
> Any idea how to fix this? This is SQL2K SP4 on WIN2K SP4.
> Thanks
> Adi ..
>
Don't use Enterprise Manager to view or modify data - use Query Analyzer.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||I appreciate your advice. But what I am looking for is a solution for the
problem I mentioned.
"Tracy McKibben" wrote:
> adi wrote:
> > Hi, Everyone
> >
> > I use SQL Server Enterprise Manager to access DB server.
> > I can connect and see the tables fine. But when i tried
> > to open table returen all rows or open design table, I
> > got an error saying:
> >
> > An unexpected error happend during this operation.
> > [MS Desgin Tools] -- Not enough storage is available to
> > complete this operation.
> >
> > Any idea how to fix this? This is SQL2K SP4 on WIN2K SP4.
> >
> > Thanks
> > Adi ..
> >
> Don't use Enterprise Manager to view or modify data - use Query Analyzer.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||adi wrote:
> I appreciate your advice. But what I am looking for is a solution for the
> problem I mentioned.
>
Start reading:
http://www.google.com/search?q=%22enterprise+manager%22+%22Not+enough+storage+is+available+to%22
You could avoid the whole mess by using the proper tools, i.e. using
Query Analyzer instead of Enterprise Manager.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Adi,
The nature of the problem mentioned is using the wrong tool for the job.
Enterprise Manager is NOT the 'right' tool to use for table alteration, data
manipulation, or, as you noticed, even viewing large amounts of data.
Tracy's advise is good advise. Continuing to use EM sets you up for
numerous, as of yet, inexperienced, problems -of which this is just the tip
of the iceberg.
Your question is like asking how to hammer a nail with a screwdriver. And
when someone mentions that a hammer would be better, your response is like
saying "I don't care, I am going to hammer the nail with the screwdriver."
You won't find many skilled SQL Server folks actively encouraging or
abetting the use of Enterprise Mangler.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"adi" <adi@.discussions.microsoft.com> wrote in message
news:4BFDAB54-4ED5-48C7-A19A-2CEAFBA31E02@.microsoft.com...
>I appreciate your advice. But what I am looking for is a solution for the
> problem I mentioned.
> "Tracy McKibben" wrote:
>> adi wrote:
>> > Hi, Everyone
>> >
>> > I use SQL Server Enterprise Manager to access DB server.
>> > I can connect and see the tables fine. But when i tried
>> > to open table returen all rows or open design table, I
>> > got an error saying:
>> >
>> > An unexpected error happend during this operation.
>> > [MS Desgin Tools] -- Not enough storage is available to
>> > complete this operation.
>> >
>> > Any idea how to fix this? This is SQL2K SP4 on WIN2K SP4.
>> >
>> > Thanks
>> > Adi ..
>> >
>> Don't use Enterprise Manager to view or modify data - use Query Analyzer.
>>
>> --
>> Tracy McKibben
>> MCDBA
>> http://www.realsqlguy.com|||Arnie,
Now, I'm not against your advice or anyones for that matter. In fact that's
what we are looking for through these forums. I agree with what you said as
I've been managing SQL Servers since v6.5 days. But if I come accross this
problem and google or MS KB not being able to shortlist the problem
resolution then my search is always for the possible answer to the question.
Thanks again for your wise words. have a good day.
Adi ..
"Arnie Rowland" wrote:
> Adi,
> The nature of the problem mentioned is using the wrong tool for the job.
> Enterprise Manager is NOT the 'right' tool to use for table alteration, data
> manipulation, or, as you noticed, even viewing large amounts of data.
> Tracy's advise is good advise. Continuing to use EM sets you up for
> numerous, as of yet, inexperienced, problems -of which this is just the tip
> of the iceberg.
> Your question is like asking how to hammer a nail with a screwdriver. And
> when someone mentions that a hammer would be better, your response is like
> saying "I don't care, I am going to hammer the nail with the screwdriver."
> You won't find many skilled SQL Server folks actively encouraging or
> abetting the use of Enterprise Mangler.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "adi" <adi@.discussions.microsoft.com> wrote in message
> news:4BFDAB54-4ED5-48C7-A19A-2CEAFBA31E02@.microsoft.com...
> >I appreciate your advice. But what I am looking for is a solution for the
> > problem I mentioned.
> >
> > "Tracy McKibben" wrote:
> >
> >> adi wrote:
> >> > Hi, Everyone
> >> >
> >> > I use SQL Server Enterprise Manager to access DB server.
> >> > I can connect and see the tables fine. But when i tried
> >> > to open table returen all rows or open design table, I
> >> > got an error saying:
> >> >
> >> > An unexpected error happend during this operation.
> >> > [MS Desgin Tools] -- Not enough storage is available to
> >> > complete this operation.
> >> >
> >> > Any idea how to fix this? This is SQL2K SP4 on WIN2K SP4.
> >> >
> >> > Thanks
> >> > Adi ..
> >> >
> >>
> >> Don't use Enterprise Manager to view or modify data - use Query Analyzer.
> >>
> >>
> >> --
> >> Tracy McKibben
> >> MCDBA
> >> http://www.realsqlguy.com
> >>
>
>

error in Enterprise Manager while returning all or few rows.

Hi, Everyone
I use SQL Server Enterprise Manager to access DB server.
I can connect and see the tables fine. But when i tried
to open table returen all rows or open design table, I
got an error saying:
An unexpected error happend during this operation.
[MS Desgin Tools] -- Not enough storage is available to
complete this operation.
Any idea how to fix this? This is SQL2K SP4 on WIN2K SP4.
Thanks
Adi ..adi wrote:
> Hi, Everyone
> I use SQL Server Enterprise Manager to access DB server.
> I can connect and see the tables fine. But when i tried
> to open table returen all rows or open design table, I
> got an error saying:
> An unexpected error happend during this operation.
> [MS Desgin Tools] -- Not enough storage is available to
> complete this operation.
> Any idea how to fix this? This is SQL2K SP4 on WIN2K SP4.
> Thanks
> Adi ..
>
Don't use Enterprise Manager to view or modify data - use Query Analyzer.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||I appreciate your advice. But what I am looking for is a solution for the
problem I mentioned.
"Tracy McKibben" wrote:

> adi wrote:
> Don't use Enterprise Manager to view or modify data - use Query Analyzer.
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||adi wrote:
> I appreciate your advice. But what I am looking for is a solution for the
> problem I mentioned.
>
Start reading:
http://www.google.com/search? q=%22...
vailable+to%22
You could avoid the whole mess by using the proper tools, i.e. using
Query Analyzer instead of Enterprise Manager.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Adi,
The nature of the problem mentioned is using the wrong tool for the job.
Enterprise Manager is NOT the 'right' tool to use for table alteration, data
manipulation, or, as you noticed, even viewing large amounts of data.
Tracy's advise is good advise. Continuing to use EM sets you up for
numerous, as of yet, inexperienced, problems -of which this is just the tip
of the iceberg.
Your question is like asking how to hammer a nail with a screwdriver. And
when someone mentions that a hammer would be better, your response is like
saying "I don't care, I am going to hammer the nail with the screwdriver."
You won't find many skilled SQL Server folks actively encouraging or
abetting the use of Enterprise Mangler.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"adi" <adi@.discussions.microsoft.com> wrote in message
news:4BFDAB54-4ED5-48C7-A19A-2CEAFBA31E02@.microsoft.com...[vbcol=seagreen]
>I appreciate your advice. But what I am looking for is a solution for the
> problem I mentioned.
> "Tracy McKibben" wrote:
>|||Arnie,
Now, I'm not against your advice or anyones for that matter. In fact that's
what we are looking for through these forums. I agree with what you said as
I've been managing SQL Servers since v6.5 days. But if I come accross this
problem and google or MS KB not being able to shortlist the problem
resolution then my search is always for the possible answer to the question.
Thanks again for your wise words. have a good day.
Adi ..
"Arnie Rowland" wrote:

> Adi,
> The nature of the problem mentioned is using the wrong tool for the job.
> Enterprise Manager is NOT the 'right' tool to use for table alteration, da
ta
> manipulation, or, as you noticed, even viewing large amounts of data.
> Tracy's advise is good advise. Continuing to use EM sets you up for
> numerous, as of yet, inexperienced, problems -of which this is just the ti
p
> of the iceberg.
> Your question is like asking how to hammer a nail with a screwdriver. And
> when someone mentions that a hammer would be better, your response is like
> saying "I don't care, I am going to hammer the nail with the screwdriver."
> You won't find many skilled SQL Server folks actively encouraging or
> abetting the use of Enterprise Mangler.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "adi" <adi@.discussions.microsoft.com> wrote in message
> news:4BFDAB54-4ED5-48C7-A19A-2CEAFBA31E02@.microsoft.com...
>
>

Friday, February 17, 2012

error importing data from Access to SQL Server

Hi
I am trying to import of data from my Access 2003 tables in to SQL Server
2005, via SQL Server Management Studio (Import and
export wizard). All accesstables have been imported with no errors except for
this last one "Transaktionsrader"
I have tried to run some different queries to find Unmatched data in this
tables foreign key, inside Access, found some (removed it from the table)
then tried the same import of table again, but still keep getting this error.
I receive this error below:
Regards
Mattias
- Copying to [MbaseMuseumServerNetSQL].[dbo].[Transaktionsrader] (Error)
Messages
Information 0x402090df: Data Flow Task: The final commit for the data
insertion has started.
(SQL Server Import and Export Wizard)
Error 0xc0202009: Data Flow Task: An OLE DB error has occurred. Error code:
0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client"
Hresult: 0x80004005 Description: "The statement has been terminated.".
An OLE DB record is available. Source: "Microsoft SQL Native Client"
Hresult: 0x80004005 Description: "The INSERT statement conflicted with the
FOREIGN KEY constraint "ITransaktionsrader11". The conflict occurred in
database "MbaseMuseumServerNetSQL", table "dbo.Transaktionhuvud", column
'TransaktionhuvudTransaktionsnr'.".
(SQL Server Import and Export Wizard)
Information 0x402090e0: Data Flow Task: The final commit for the data
insertion has ended.
(SQL Server Import and Export Wizard)
Error 0xc0047022: Data Flow Task: The ProcessInput method on component
"Destination - Transaktionsrader" (115) failed with error code 0xC0202009.
The identified component returned an error from the ProcessInput method. The
error is specific to the component, but the error is fatal and will cause the
Data Flow task to stop running.
(SQL Server Import and Export Wizard)
Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error
code 0xC0202009.
(SQL Server Import and Export Wizard)
It appears that there is a Foreign Key issue.
(I'm only guessing about your table and column names since you didn't include any DDL.)
Try a query somewhat like this to find the 'orphan' rows -and then correct them.
SELECT th.TransaktionhuvudTransaktionsnr
FROM Transaktionsrader tr
RIGHT JOIN MbaseMuseumServerNetSQL.dbo.Transaktionhuvud th
ON tr.TransaktionsraderTransaktionsnr = th.TransaktionhuvudTransaktionsnr
WHERE TransaktionsraderTransaktionsnr IS NULL
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the top yourself.
- H. Norman Schwarzkopf
"Mattias" <Mattias@.discussions.microsoft.com> wrote in message news:8178B69D-4227-4C49-95A5-D7C67490CD7F@.microsoft.com...
> Hi
> I am trying to import of data from my Access 2003 tables in to SQL Server
> 2005, via SQL Server Management Studio (Import and
> export wizard). All accesstables have been imported with no errors except for
> this last one "Transaktionsrader"
> I have tried to run some different queries to find Unmatched data in this
> tables foreign key, inside Access, found some (removed it from the table)
> then tried the same import of table again, but still keep getting this error.
> I receive this error below:
> Regards
> Mattias
> - Copying to [MbaseMuseumServerNetSQL].[dbo].[Transaktionsrader] (Error)
> Messages
> Information 0x402090df: Data Flow Task: The final commit for the data
> insertion has started.
> (SQL Server Import and Export Wizard)
> Error 0xc0202009: Data Flow Task: An OLE DB error has occurred. Error code:
> 0x80004005.
> An OLE DB record is available. Source: "Microsoft SQL Native Client"
> Hresult: 0x80004005 Description: "The statement has been terminated.".
> An OLE DB record is available. Source: "Microsoft SQL Native Client"
> Hresult: 0x80004005 Description: "The INSERT statement conflicted with the
> FOREIGN KEY constraint "ITransaktionsrader11". The conflict occurred in
> database "MbaseMuseumServerNetSQL", table "dbo.Transaktionhuvud", column
> 'TransaktionhuvudTransaktionsnr'.".
> (SQL Server Import and Export Wizard)
> Information 0x402090e0: Data Flow Task: The final commit for the data
> insertion has ended.
> (SQL Server Import and Export Wizard)
> Error 0xc0047022: Data Flow Task: The ProcessInput method on component
> "Destination - Transaktionsrader" (115) failed with error code 0xC0202009.
> The identified component returned an error from the ProcessInput method. The
> error is specific to the component, but the error is fatal and will cause the
> Data Flow task to stop running.
> (SQL Server Import and Export Wizard)
> Error 0xc0047021: Data Flow Task: Thread "WorkThread0" has exited with error
> code 0xC0202009.
> (SQL Server Import and Export Wizard)
>
>
>
|||Hi
Thank you for your reply.
I have already transfered the Transaktionshuvud table from Access to SQL
Server.
Transaktionsrader in SQL Server is an empty table right now.
How do I run your query here?
The best would be if I could run it based on the Transaktionshuvud and
Transaktionsrader in the Access db.
Is it possible?
Mattias
"Arnie Rowland" wrote:
[vbcol=seagreen]
> It appears that there is a Foreign Key issue.
> (I'm only guessing about your table and column names since you didn't include any DDL.)
> Try a query somewhat like this to find the 'orphan' rows -and then correct them.
> SELECT th.TransaktionhuvudTransaktionsnr
> FROM Transaktionsrader tr
> RIGHT JOIN MbaseMuseumServerNetSQL.dbo.Transaktionhuvud th
> ON tr.TransaktionsraderTransaktionsnr = th.TransaktionhuvudTransaktionsnr
> WHERE TransaktionsraderTransaktionsnr IS NULL
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to the top yourself.
> - H. Norman Schwarzkopf
>
> "Mattias" <Mattias@.discussions.microsoft.com> wrote in message news:8178B69D-4227-4C49-95A5-D7C67490CD7F@.microsoft.com...
|||What I've done in the past is use the access query wizard to create an
'unmatched' query on the child table using the FK>PK in parent table to find
the orphaned records.
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Mattias" wrote:
> Hi
> Thank you for your reply.
> I have already transfered the Transaktionshuvud table from Access to SQL
> Server.
> Transaktionsrader in SQL Server is an empty table right now.
> How do I run your query here?
> The best would be if I could run it based on the Transaktionshuvud and
> Transaktionsrader in the Access db.
> Is it possible?
> Mattias
|||Hi
I did excactly what you suggested, but still getting this error when
importing the Transaktionsrader table
Mattias
"Dave Patrick" wrote:

> What I've done in the past is use the access query wizard to create an
> 'unmatched' query on the child table using the FK>PK in parent table to find
> the orphaned records.
> --
> Regards,
> Dave Patrick ...Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
> "Mattias" wrote:
>
|||Mattias (Mattias@.discussions.microsoft.com) writes:
> I did excactly what you suggested, but still getting this error when
> importing the Transaktionsrader table
Well, that is sort of expected. Dave suggested that you would create a
third table without foreign keys, import into this table to track
down the suspect rows. From this follows that the import into the
original table would still fail as long as you don't repair the data.
But it appears to akward to import to SQL Server to track down problems
in your access data. What does this query return in Access:
SELECT *
FROM Transaktionsrader R
WHERE NOT EXISTS (SELECT *
FROM Transaktionshuvud H
WHERE H.TransaktionhuvudTransaktionsnr =
R.TransaktionsraderTransaktionsnr)
(I'm making a guess on the last column name here.)
If foreign keys are properly implemented in your Access database,
this query should not return any rows. But in such case the import
would not fail.
Once you have tracked down the wacko rows, insert/delete/updated and
re-import.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Sorry, I should have mentioned and as Erland pointed out I meant to use the
result as a guide to what records need repaired or deleted.
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"Mattias" wrote:
> Hi
> I did excactly what you suggested, but still getting this error when
> importing the Transaktionsrader table
> Mattias
|||Hi
I tried your Select in Access but no rows was to find, unfortunatly.
Do you have any more ideas?
Mattias
"Erland Sommarskog" wrote:

> Mattias (Mattias@.discussions.microsoft.com) writes:
> Well, that is sort of expected. Dave suggested that you would create a
> third table without foreign keys, import into this table to track
> down the suspect rows. From this follows that the import into the
> original table would still fail as long as you don't repair the data.
> But it appears to akward to import to SQL Server to track down problems
> in your access data. What does this query return in Access:
> SELECT *
> FROM Transaktionsrader R
> WHERE NOT EXISTS (SELECT *
> FROM Transaktionshuvud H
> WHERE H.TransaktionhuvudTransaktionsnr =
> R.TransaktionsraderTransaktionsnr)
> (I'm making a guess on the last column name here.)
> If foreign keys are properly implemented in your Access database,
> this query should not return any rows. But in such case the import
> would not fail.
> Once you have tracked down the wacko rows, insert/delete/updated and
> re-import.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>
|||Mattias (Mattias@.discussions.microsoft.com) writes:
> I tried your Select in Access but no rows was to find, unfortunatly.
> Do you have any more ideas?
One possibility is that comparison is case-insensitive on the Access
side, but you have a case-sensitive collation on the SQL Server side, and
the usage of case in the data is inconsistent. That presume that the columns
are character data.
Or else something goes wrong during import, for instance the tables being
imported in the wrong order.
I would disable the foreign-key constraint with:
ALTER TABLE Transaktionsrader NOCHECK CONSTRAINT ITransaktionsrader11
and then run the import. Then use the query from my previous post, to see
if there are bad rows.
To enable the constraint again, do:
ALTER TABLE Transaktionsrader WITH CHECK CHECK
CONSTRAINT ITransaktionsrader11
(Yes, it should really be CHECK CHECK.)
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
|||Hi
Thank you for your effort your idea worked fine imported it and could
remove 16 rows
All the best
Mattias
"Erland Sommarskog" wrote:

> Mattias (Mattias@.discussions.microsoft.com) writes:
> One possibility is that comparison is case-insensitive on the Access
> side, but you have a case-sensitive collation on the SQL Server side, and
> the usage of case in the data is inconsistent. That presume that the columns
> are character data.
> Or else something goes wrong during import, for instance the tables being
> imported in the wrong order.
> I would disable the foreign-key constraint with:
> ALTER TABLE Transaktionsrader NOCHECK CONSTRAINT ITransaktionsrader11
> and then run the import. Then use the query from my previous post, to see
> if there are bad rows.
> To enable the constraint again, do:
> ALTER TABLE Transaktionsrader WITH CHECK CHECK
> CONSTRAINT ITransaktionsrader11
> (Yes, it should really be CHECK CHECK.)
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
>

Error import/export tables!

Hi,
I am getting " could not create an instance of DTS
package " when i try to import/export tables.
though i reinstalled everything it is happening? how can i
solve it?
pls. guide me.
regards,
Joao SousaSee if this helps:
http://www.databasejournal.com/features/mssql/article.php/1461391#1
--
- Anith
( Please reply to newsgroups only )

Error Handling with openrowset

I am using openrowset to interact with some fox pro tables.
I want to be able do error handling if the openrowset quiery fails.
When the quiery gets and error it terminates and does not seem to return and
error status.
Here is a code sample.
Update openrowset('MSDASQL',
'Driver={Microsoft Visual FoxPro
Driver};UID=;PWD=;SourceDB=\\dataserver\prod\apps\ tele\;SourceType=DBF;Exclusive=No;Background
Fetch=Yes;Collate=Machine;Null=Yes;Deleted=Yes',
'select PROMO_CODE from prospect_conf
where area_code+home_phone in (select parea_code+phome_phon from
prospext_conf
where ctod(misc5) = date())')
set promo_code = LEft(promo_code,3)+'0'
Thanks in advance
Regarding Trapping the error from an OpenRowset failure.
I have had similar problems using OpenRowset with FoxPro tables, and found the workaround to be as follows.
1. Build the Openrowset query inside a stored procedure.
2. Call that procedure from inside a parameterised DTS package (Exec usp_Procname ?,?,?)
3. Call the DTS package from another stored procedure.
The DTS package will return a trapable error, so if you are trying to do some type of batch processing your process can continue on.
Admittedly it's a bit convoluted, but it works.