HomeForum
Welcome, Guest

Import run manually or in package
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Import run manually or in package

Import run manually or in package 5 years, 8 months ago #311

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
I've developed a series of import scripts and packages to run the scripts. I've developed these using a test database which has the same table structures as the production database. I'm having trouble getting the packages to run against the production database.

After a sequence of attempts to make this work and trying different approaches our latest attempt was this morning and I've encountered something that has me stumped so that I don't know what else to try.

The import scripts have "SQL Before" code which clears the table being loaded as the file to be loaded is a complete replacement. The import script being run from the package successfully clears the table. However, when it tried to load the table with new data I got the following error:

Access violation at address 00887CEB in module 'VImpPro.exe'. Read of address 0000004C

This is similar to the errors I've gotten in the past, though the addresses change on different days. The addresses are the same for every table I attempt to run during a test. Thus I am clearing the table but then it is left blank (clearly unacceptable on a production system).

In an attempt to watch it run more closely as opposed to simply reviewing the execution monitor I tried running the import script manually. I was stunned when it ran successfully! I double checked that the file specified in the Advanced settings of the import module of my package is the same as the default file specified in the import script. Why would running the script from within a package work differently from running it directly using the little green "Run" arrow from the import edit screen?

One problem we've encountered before when loading these production tables using other methods (stored procedures) is trying to load the data while the user application is attempting to access the table caused problems. In order to work around this we now load a temporary table and then execute a SQL statement to insert into the production table from the temporary table. We have successfully loaded our test database while simulating user activity on the test database. Since these temporary tables are not used at all by the user application the import cannot be getting interference from the user application as it runs.

Note that the package which is attempting to load the table is being run as a module within another package. In fact, there are multiple levels of package definition. First I have a driver package which runs the entire process beginning with using ftp to get new files. Then the driver package invokes a series of packages, one for each state (AZ, CO, CT, GA, etc.). Each of these state specific packages run a sequence of packages, one for each table to be updated. It is while running these table specific packages that the import fails. Actually, in my test this morning I was running a state group so I could limit my test to just one state, so there was only one extra level of package above the table specific packages.

I don't know what else to try. When I saw my import fail when run from a package but succeed when run directly I don't see what the difference could be. I have run these successfully against the test database and there doesn't appear to be any difference between running the imports directly or from within a package. Do you have any ideas of what could be different between running the package and running the import directly?

RE: Import run manually or in package 5 years, 8 months ago #320

  • mike8888
  • OFFLINE
  • Expert Boarder
  • Posts: 131
  • Karma: 0
Hi.

Couple of questions.

Are you using same PC to load data into production and test system?


Do you have any ideas of what could be different between running the package and running the import directly?

Packages can be run in sepaparate thread.

File->options->Execution-> Execute Package in separate thread

Can you try to change it may be you will get more usefull message.

RE: Import run manually or in package 5 years, 8 months ago #326

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
Question 1: Yes, I am using the same PC to run both the test database and the production database. The only change needed to run against the production database instead of the test database is to change which database the connection points to.

Question 2: Further testing today has revealed a bit more about when it fails. Remembering my driver package which runs a series of state packages each of which runs a series of packages for a set of tables/files, I tried some more things today. First, I tried running a package for a specific table for a specific state. This worked. I then moved up a level and tried running a group package for all of the tables in a specific state (this is what I tried yesterday). All of the table loads here failed. So, it does not appear to happen simply because I am running a package, but instead appears to be related to the fact that I am running packages within a package.

Separate thread: I had noticed that option earlier and had separate thread execution selected. In this morning's testing I changed it back to not using a separate thread. This did not seem to make any difference in whether it fails or not.

I suppose I could simply schedule scores of primary level packages, but it would be a lot easier to manage if I can simply schedule my driver package which runs a set of related packages in sequence.

Thanks for your help.

RE: Import run manually or in package 5 years, 8 months ago #327

  • Mike84
Hi.

We are trying to reproduce the problem in our office without any luck so far.
I would be great if you can send us a copy of your repository some data and tables creation script so we can reproduce your environment

Mike

RE: Import run manually or in package 5 years, 8 months ago #329

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
It will take me a little while to put together everything. This has been working against my test database. Can you imagine anything in the creation of SQL Server databases that could differ which might affect this? I'm going to try recreating my test database and see if I can get it to match the production database in order to see if I can reproduce the problem there.

RE: Import run manually or in package 5 years, 7 months ago #335

  • kriviere
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 0
I have reproduced the problem in a newly created database. I have zipped up files which I hope will enable you to reproduce it and have emailed it to you. I hope that this will help as we continue trying to figure out what is going on. Thanks for your help.
  • Page:
  • 1
Time to create page: 0.23 seconds

Testimonials

"Advanced ETL Processor is superior software... I highly recommend this to anyone who is building datawarehouse. I would and I  have recommended it to many colleagues and customers."

- Peter Jonson, Data Integration Consultant, MPI

User Login

You only need to log in or register to use our support forum



Our customers

BP

BBC

HSBC


Databases we work with

Go to top