[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Profile trace a SQL Job/DTS Package

Posted on 2006-03-27
4
Medium Priority
?
493 Views
Last Modified: 2012-05-05
Hey All,

I have a question to ask about profile tracing.  I'm not really good with tracing since I haven't done very much it.  Anyway I have a SQL Job that imports data from a file that I run manually sicne it is for testing purposes only.  I didn't create the DTS package (one of our developers or the app vendor did) that this Job was scheculded from so I'm not entirely sure what tables it is hitting but I do know the database that it is hitting.  I'm getting an error message from SQL stating that the import is trying to insert NULL values into a colum that cannot except Null values but the column name is cut off (cust....) and no table is listed.  I've told the developers that SQL doesn't like their file but they are telling me that there is nothing wrong with the file and there is something wrong with the JOB (although I've run this job several time without a problem).

So I need to know how I can create a trace that will show me all the data that is being imported from this file into the database so that I can find out where the problem exists/occurs and point out to them that their file is messed up.  Does anyone know how I can create a trace that will allow me to trap all the information that is being imnported from this file.

I don't know if this will help, but the job name it testimportdailyfile(created from a DTS package, not sure which one though since there are several on this server), the database name is testc2cip, and the name of the file that I'm importing from the daily.dat.  Is there a way that I can trap all the information coming from this file so that I can see it as is it being imported into the database and nothing else when I run the testc2cip job.

Thanks,

Pete J.



 
0
Comment
Question by:PJan8724
  • 2
4 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 1600 total points
ID: 16306310
Your best bet is to add (if it does not have it already) logging to the DTS Package.  
1. Go to DTS Package Properties
2. Select the Logging tab
3. In the Error file enter a file name.
4. Run the package.
5. Take a look at the error log defined at step 3
0
 
LVL 5

Assisted Solution

by:CIC Admin
CIC Admin earned 400 total points
ID: 16306385
ac : I don't think he can get to (or knows) the original DTS package.

If that is the case, you may be able to get more info from the job itself.  Have you looked at the job history?  Right-click on the job and choose "View Job History".  When the dialog pops up, check "Show Step Detail" and view the info for step one.  If the job has been failing it should show Failure for the results, and you should be able to get more detailed information than what I assume you are getting, a pop up error when you run the job.

As for using Profiler, you are not going to be able to obtain the data that is being transferred by using this program, only the SQL steps that were used.  I don't know if that is enough for your needs.

Good luck,
Kent
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 16306843
>>I don't think he can get to (or knows) the original DTS package.<<
Good point.  I overlooked that.
0
 
LVL 1

Author Comment

by:PJan8724
ID: 16364570
Hey Guys,

Well not the answer I was looking for entirely but your did point me in the right direction.  I finally managed to figure out which DTS package was running, and enabled logging on it.  In the end it turned out that the test enviroment didn't match the production enviroment.  I made a change to the table in question and everything works fine.  Thanks for the help though guys.

Pete J.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question