Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server






SuperbHosting.net & Arvixe.com have generously sponsored dedicated servers and web hosting to ensure a reliable and scalable dedicated hosting solution for BigResource.com.







Trapping BCP Error From SP


HI

I am using the following code in an SP, it seems like an ugly hack I
have done to check if the BCP was working or not, I check the table it
shold have filled instead of checking the error from BCP itself.

Does anyone know how I can check the BCP errors directly?

this is the code I am using.

--------------------------------------
create procedure q_spr_autoinventering

AS

create table ##q_tbl_autoinventering (

ean13 varchar(13),
antal decimal,
signatur varchar(10),
lagstalle int
)

exec master..xp_cmdshell"bcp ##q_tbl_autoinventering in
c:outpathhd1invent.txt -t ; -Usa -P13hla -c -C "

declare@invjournal int,
@lagstalle int,
@invdatum datetime,
@ean13 varchar(15),
@antal decimal,
@artnr varchar(50),
@lagplats varchar(20),
@lagsaldo decimal,
@mysubject nvarchar(4000)

IF EXISTS (select * from ##q_tbl_autoinventering)
begin
-----------------------------------------------

it seems so ugly to check the table instead of the BCP error itself so
any pointers would be gladly appreciated, I tried to check @@error but
that did not seem to worked how I needed it.

in short what I want is this

if bcp did not work break out of the SP and wait until called next
time by sql server agent. and by not working I only mean that there
was no file to fetch, if there is a file to fetch and the table is
created I have lots of checks in the SP to make sure the values are
correct

rgds

Matt


View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
DTS Error Trapping
Hi All,

I'm running a vb script to execute a dts pkg. Need to trap errors returned by the dts pkg.
How can be this acheived?

Many thanks
Barath

View Replies !   View Related
Trapping SQL UpDate Error In VWD
Hi:I am trying to update a UserInfo record using a stored procedure.  It uses a uniqueidentifier UserId as the primary key.  I keep getting an error and am trying to trip it using try-catch statements in both SQL Server Express and VWD 2005.My challenge is that I cannot enter a sample UserId to test the query in SQL Server because it sees my unique identifier as a string and I cannot get the error back to VWD to see where the problem is.  The stored procedure looks something like:ALTER PROCEDURE [dbo].[UpDateUserInfo]    @Userid uniqueidentifier,    @FirstName nvarchar(50),    @LastName nvarchar(70),    @WorkPhone nvarchar(50),ASBEGIN TRY    SET NOCOUNT OFF;        UPDATE Members    SET FirstName = @FirstName,     LastName = @LastName,    WorkPhone = @WorkPhone,    CellPhone = @CellPhone    WHERE UserID = @Userid;END TRYBEGIN CATCH  EXECUTE usp_GetErrorInfo;END CATCH;  CREATE PROCEDURE [dbo].[usp_GetErrorInfo]AS    SELECT        ERROR_NUMBER() AS ErrorNumber,        ERROR_SEVERITY() AS ErrorSeverity,        ERROR_STATE() AS ErrorState,        ERROR_PROCEDURE() AS ErrorProcedure,        ERROR_LINE() AS ErrorLine,        ERROR_MESSAGE() AS ErrorMessage; When I put in the value d2dbf5-409d-4ef4-9d35-0a938f6ac608 which is an actual UserId in SQL server when I execute, the program tells me there incorrect syntax.   So I would greatly appreciate it if somebody could help me with the following two questions: 1.  How do I input a uniqueidentifier when executing a query in SQL Server Express?2.  How can I get any errors that I trap (I think I have the right set up here) to show up back in my ASP.Net application? Any help greatly appreciate.Roger Swetnam 

View Replies !   View Related
Trapping Error Messages
Hi everybody,I need to trap error messages in my stored procedures and log them. I canuse @@ERROR global variable to get the error code and look it up insysmessages table to get the description. Then using xp_logevent I log theerror.The problem is this description needs to be formatted. For example if I tryto insert NULL into a column which is not nullable, I'll get error #515. Thedescription of error #515 in sysmessages is:Cannot insert the value NULL into column '%.*ls', table '%.*ls'; columndoes not allow nulls. %ls fails.Is there a way to get the formatted message? What is the best approach totrap errors, filter them, add some additional information to the message andsend it to server's event logger?TIA,Shervin

View Replies !   View Related
Divide By Zero Error Trapping
I have the following line in a select statement which comes up with adivide by zero error.CAST(CASE Splinter_StatusWHEN 'SUR' THEN 0ELSE CASE WHEN Sacrifice>=1THEN 3*m.Premium/100-(m.Sacrifice * 3*m.Premium/100)/(m.Gross+m.Sacrifice)ELSE 0ENDEND AS Float)AS Bond2,The error happens on the section (m.Gross + m.Sacrifice) as this canequal zero and throws out the part of the calc that divides by it. Itis correct in some instances that it does so. The full SQL statementhas a large number of these expressions so I need a method I can applyto any line if possible.I know that it is mathmatically correct to error where this value iszero, but what I want to do is set the output of the entire expressionto zero if there is an error.Realistically an error such as this could happen at a few points inthe expression (or one of many others), so I need to find a way ofcatching any error in the expression and setting the return value to0. I thought of using a CASE statement, but wondered if there was abetter way of looking at this as the case statement would have tocheck each variation where it could throw an error.Any ideas ?ThanksRyan

View Replies !   View Related
Error Trapping In StoredProcedure
I have a DTS package (AdIns) that inserts to an administrative table. The Administrative table utilizes the "with ignore_dup_key" option on the index. There are other admin jobs in the DTS that are based on the return code of a parent package.

The "3604:duplicate key ignored" is an expected result of the parent package, yet it sends an failure return code to the dependent (AdIns) package, causing erroneous entries to the final audit table.

How can I reset the return code from the parent package?

TIA!:mad:

View Replies !   View Related
Linkedserver & Error Trapping
Hello,

Could someone please tell me how to trap an OLE/DB error while using a Stored Procedure that executes the OPENQUERY command? What I want to be able to do is know when a table in the Linked Server is not available. The data is in a VFP table and I can cause the error if I first get the table exclusive in FoxPro. It will return the following when I call the sp in Query Analyzer:

Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'MSDASQL' reported an error.
[OLE/DB provider returned message: [Microsoft][ODBC Visual FoxPro Driver]Cannot open file rolls.dbf.]

The sp then stops after the line EXEC (SqlString) in my sp and returns to the Query Analyzer displaying the above message. I'm uncertain as to how to trap the OLE/DB error since @@Error does not seem to set anything.

Thanks for any help.

Darrell

View Replies !   View Related
Error Trapping Of Datasource Control
Hello,
I encountered an interesting situation. I have a gridview and a sqldatasource. It has delete function. When I delete a record an error of foreign key violation is raised. I would like to trap this error and give a user friendly message to the user.
If I use ADO.Net I can use Try/Catch, but it seems there is no way to do the same thing using datasource. Anyone knows?
Thank you,
J

View Replies !   View Related
Trapping Keyviolation Error Code
I have the following code that will trap a keyviolation error message. Id prefer to trap the actual error code so i can give users a more relevant error message. Ive checked the exception object on MSDN but can find no reference to an actaul error code, anyone have any ideas ?

TIA


try
{
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
//Response.Redirect raises an exception
//For Response.Redirect, use an overload,
//Response.Redirect(String url, bool endResponse) that passes false for the
//endResponse parameter to suppress the internal call to Response.End
Response.Redirect("PDFForm.aspx",false);
}
catch ( Exception e )
{
conn.Close();
//ErrorLabel.Text = (e.Message);
Response.Redirect("PostError.aspx?em=" + e.ToString(),false);
//Response.Redirect("PostError.aspx?em=" + e.Message,false);
}

View Replies !   View Related
Primary Key Error Trapping On IDC-files
How do I make the SQL server return a HTML-document instead of the standard error message when a user tries to enter a primary key which already is in the base?

View Replies !   View Related
Trapping Package Validation Error
Hello,

 

I created a new SSIS Package.  I want to send an e-mail when an error occurrs.

 

I set the OnError event to send an e-mail. I then decided to test this so I dropped my input SQL table.  When I drop the import SQL table I get a Package Validation Error and I don't get my e-mail.

 

Am I making a mistake.  I want to always send an e-mail when an error occurrs in my SSIS package. 

By the way I did add an e-mail at the end of my SSIS package to verify my SMTP is working - it did.

 

Thanks,

 

Michael

 

View Replies !   View Related
ForEach Trapping An Error And Continuing
I have a ForEach loop that processes a list of databases.  Inside the loop I many steps, one of which is a sequence that contains two steps.  Either of these steps may fail (they are attempting to start mirroring and could fail for any number of reasons).  I would like to trap this error and ignore it so the For loop will continue, but still fail if other steps than this one fail.  The only thing I've been able to do so far is to tell the whole loop to continue through some insane number of errors.  Is there a way to identify or actually ignore the error?  In the sequence I have have on completion and from the sequence to the next step (which checks if mirroring actually started) is running on completion.

 

Thanks.

View Replies !   View Related
SQL Error Trapping Using @@Error Without ABORTING....
I am trying to cycle a bunch of tables (actually doing my own refresh from another database); if one in the middle of the list fails, the whole script fails. My question is, how does one do an "ON ERROR" statement in SQL. Even though I preserve the error code using:
set @RetCode=@@ERROR, I never get the chance to ask (IF @retCode <> 0)
and then try to case on it, it seems the system wants no part of it and exits while printing the SQL system error (which is usally the dreaded deadlock and I 've been selected).

Any help would be greatly appreciated!

Thanks!

View Replies !   View Related
Trapping Errors
Hi,I have a stored proc StoredProc1 ={INSERT INTO Table1SELECT *FROM View1Return @@ERROR}StoredProc1 is used in another sp StoredProcMain ={(some code before)...EXEC @iResult = StoredProc1If @iResult <> 0BEGINROLLBACK TRANSACTIONReturn @iResultEND.... (continue)}So I want to rollback if StoredProc1 is not successful.Then I ran into a problem. I added a column to Table1 but forgot toupdate View1 to add the equivalent column. When I executedStoredProc1, I got the "Insert Error: Column name or number ofsupplied values does not match table definition." But the error isNOT trapped. It seems the instruction "Return @@ERROR" returns 0 andStoredProcMain goes on as if there wasn't an error.How can I trap this error?ThanksWalter

View Replies !   View Related
Trapping Errors In SPs
Hi,

Here is what I am trying to do:

CREATE PROCEDURE usp_deleteSomething

@theThing_i char(11)

AS

BEGIN

SET NOCOUNT ON

delete from myTable where thing=@theThing_i

return(@@ERROR)


END

I thought this SP would return 547(foreign key constraint voilation) when column 'thing' was being referenced in another table. Instead, when the front-end application code calls this SP it gets a 1 from the delete statement itself. In other words, my return statement never seems to get executed. Is there any way of achieving this? In other words, I want to trap the error 547 and return that to the front-end.

Any replies would be greatly appreciated.

Thanks in advance,

Nishi

View Replies !   View Related
DTS - Trapping SQL Errors
 

I am panning to write a DTS package whcih alter the table and output any error messages if the alter statement fails.

I have created Execute SQL Task in which I have wrote the following command.

Alter table Employee ADD EmpStatus char(4) DEFAULT A not null;

I have created a work flow to write the error message to a text file. But I am having trouble to trap the error message prduced by the Alter statement (like "column names in each table must be unique.  Column name specified int the table more than once").

Any help will be appreciated.

Thanks

Sankar

View Replies !   View Related
Trapping SQLDataSource Errors
I have read some ideas on this, but nothing is working for me.I have an SQLDataSource bound to a FormView.  I need to use the FormView to Insert new rows.  When I type new values, all is well.  When I type a duplicate, a get a runtime primary key error.  That's fine, but how do I trap that?  Overriding Page_Error  doesn't work for me.Anyone please?

View Replies !   View Related
Erro Trapping Question
I have a batch file that runs SQL Server scripts using commands like:OSQL -Umyname -Pmypassword -iScript_01.sql -w200 -e -n[color=blue][color=green]>>Consolidation.log[/color][/color]Script_01.sql will contain statements like:Update SASI.AACT set schoolnum='071' where schoolnum in ('000',' ')update SASI.AATD set schoolnum='071' where schoolnum in ('000',' ')update SASI.AATP set schoolnum='071' where schoolnum in ('000',' ')update SASI.ACHS set schoolnum='071' where schoolnum in ('000',' ')update SASI.ACLS set schoolnum='071' where schoolnum in ('000',' ')If one of those tables should not exist, how could I have it continue,but hopefully the log would have a reference to the error?I am experimenting, but I am unsuccessfull with something like:BEGIN TRANselect count(*) from sasi.aact --this could be an updatestatementif @@ERROR =208 GOTO err_handleselect count(*) from sasi.astuif @@ERROR <> 0 GOTO err_handleselect count(*) from sasi.astuif @@ERROR <> 0 GOTO err_handleselect count(*) from sasi.astuif @@ERROR <> 0 GOTO err_handleerr_handle:returncommit Tran

View Replies !   View Related
Trapping Cmdexec Errors
I would like to trap a return value from a cmdexec that is scheduled. The cmdexec returns 0 if it is a success and something other than 0 if it doesn't.

Can I raise an error from a command file. The command file calls a console application ( i.e. no interface ).

Any help is appreciated.

View Replies !   View Related
Trapping SQL Messages Using LOGMON
We want to setup message traps using a product called LOGMON, so that we
can notify support groups of problems.
The Microsoft documentation seems to indicate that severity level 19-25 is
recorded in the Windows NT event log. Severity level 22-23 seem to relate to
SQL Server database problems.

Has anyone setup any products to trap messages ? If so, is it possible to obtain
a list of the messages numbers they have trapped ? We are using SQL Server 6.5.

Thanks in advance.

View Replies !   View Related
SQL Errors, Trapping In Server Agent
Hello to all,I've fallow problem. I've a sp called as a job of SA each minute. Thisruns pretty nice, but from time to time, the job is aborted, and Idon't know why.Considering my logging, which is implemented in DB, I know, in whichpoint it is happening, but I don't know the exact error.This one is for sure any SQL server exception.I wanted to track this error, but reading all news, and help, andperforming some tests, I've find out, that this is almost likeimpossible, to catch the error in t-sql code (for example in this sp),and wirte it to any table for futher review.Reading great documentation from Erland Sommarskog, I know, there isno way to catch this error in t-sql, because, usualy the sql terminatesexecution of the code immieadetly (so I found it also by my tests).Now, my question is: sice I'm calling this sp continously in ServerAgent as a job scheduled to be called each one minute, is it any way,to trap this error on this level? In SA? and THEN save it somewhere inmy db?I'm calling the sp as a 'command' in job step as 'execsp_name_of_procedure'.If I'll try like this:declare @err intset @err = 0exec sp_name_of_procedureset @err = @@errorif @err <> 0begininsert into tbl_logger (sql_error, msg) values (@err, 'SQL raised anerror')endwill it work, or the sql will assume the whole code as a one batch, andwill terminate after call of sp?Thank you in advance for reply.GreatingsMateusz

View Replies !   View Related
Trapping Errors In Stored Procedure
Hi there,I am converting a large PL/SQL project into Transact-SQL and have hitan issue as follows:I have a PL/SQL procedure that converts a string to a date. Theprocedure does not know the format of the date in the string so ittries loads of formats in converting the string to a date until itsucceeds.After trying each potential format it uses the Oracle 'EXCEPTION WHENOTHERS' construct to trap the failure so it can try another format.Is it possible to do this with SQLServer ? If I do a CONVERT and it isnot one of the standard formats it fails. This is part of a backgroundscheduled process and I cannot afford the procedure to bomb out.I suspect the answer is I cannot do this and will need to impose somecontrol over the string being received (from various externalsystems!!) to ensure it is a specific known format. Even if I know itwill be one of the known SQLServer formats this will not be enoughsince if the first one I try is not correct the process will crash.Any ideas ?Thanks

View Replies !   View Related
Trapping Sqlcmd Errors When Executed From A Job
Hi I am running some scripts in files using sqlcmd via a SQL Server Agent job. If sqlcmd generates an error (for example if it is unable to connect) then the job fails. However, if the T-SQL within the script is invalid (syntax, name resolution etc etc) the job completes reporting success. If sqlcmd is invoked directly via the query window then no error is raised however there is a result set returned reporting the error. Anyone know why and whether is it possible to get the error to be recognised by the job? invalid_sql.sql--The below is not actually valid SQL.do SOME stuff, innit! sqlcmdEXEC master.dbo.xp_cmdshell "sqlcmd -S my_server -i C:invalid_sql.sql" Cheers

View Replies !   View Related
Trapping A SQL User Id In Update Trigger
Is it possible to trap the SQL user who updated a record in a table through a trigger. For example if jqpublic updates a record in table1 can a trigger fire off updating a last_user update field in the same record?

View Replies !   View Related
Trapping Errors In EXEC Statements
There are a few threads already with similar questions, but such replies as have been posted don't address the basic problem. I have a stored procedure which ddeletes related records from a large number of tables, which involves using many EXECs as I need to substitute parameters for table owners & WHERE conditions. These basically work fine, but in development I inevitably dropped the odd character and ended up with an incorrect table name after substitution in one EXEC statement. This resulted in error 208 (invalid object name). I have error trappimg in place (save @@error after each EXEC & check & at various points). This was not triggered by the error, although the check was straight after the EXEC. I put a 'print @@error' there instead, but it just returns 0. I then tried putting the 'print @@error' INSIDE the EXEC, immediately after the failed DELETE, but it doesn't print anything! i.e. it looks like the EXEC exits instantly on getting the error without going on to the next statement in the block. Unfortunately, execution of the procedure continues after the EXEC, so I can't find a way of stopping execution & rolling back the transaction. I have tried everything I can think of - has anyone any ideas? Is there a way round this? The statements are something like this (assume the DELETE causes a 208 error)...

EXEC ('
DELETE ' + @tablename + 'FROM blah blah WHERE blah = ' + @RecId
)
print @@error

This prints 0.

EXEC ('
DELETE ' + @tablename + 'FROM blah blah WHERE blah = ' + @RecId +
'print @@error'
)

This doesn't print at all!

Please help preserve my sanity.
This prints 0.

View Replies !   View Related
Trapping Stored Procedure Errors
In Stored Procedures that have a group of statements wrapped in a Begin and End Statement What is the best way of trapping errors ?

View Replies !   View Related
Trapping Errors In The Control Flow
SSIS GURUS:

I have read several posting about various modes of trapping errors, but none seem to directly address what I am looking for (SQLIS.com.MSDN, etc)

 

Coming from a Java/C# background, I am looking for a way to trap errors that arise within the ssis control flow much like the said languges:

try {

do something

} catch(AnExceptionType myException) {

handle my exception

}

/ ** my code at this point is unperterbed by the exception unless I explicitly raise the exception out of the scope of the exception handler. */

To make the analogy in SSIS, I want to be able to handle an error within a "container" and not have to handle the same error in surrounding containers.

Example:

I have a "Foreach" container (call it container FEC) that contains several other containers.  One of the subordinate containers is a "For Loop" (call it FLC).  The FLC in turn has some nested tasks, some of which are expected to fail and therefore I want to handle in a graceful manner.   The tasks that are expected to fail have a "fail" constraint that links them to a task that I want to occur when the failure occurs, and that works, but the failure is not trapped as it percolates out of the container to the FEC.  I also tried to trap it with event handler, but that is also an incorrrect trail to follow.

 I don't want the failure to percolate up to the FEC.  I have set the max errors to a reasonable value for FLC and my "program" is not exceeding that value; however, the FEC still sees that error so it fails.  How do I keep FEC from seeing the error (without upping the max errors for the FEC)? 

BTW, I am using the script task to set a variable value to indicate successes or fails for those tasks where I can set the max errors to a high enough level (allow the error to occur, then let the fail/success precedent constraint pass control to the script task so that the variable can be set).  This is only a partial solution.

 

I am new to SSIS, in fact to the MS world having been a code slinger for Java and Oracle.  So far I have been very impressed with SSIS.  Analogous structures that I expect to find in modern development environments have been within easy reach.  This is my first serious challenge.   Please help.

SCott

View Replies !   View Related
Trapping Rows With Truncated Columns
I am writing a package where, at one step, I need to copy data from a source with text columns of 150 characters to a destination with matching text columns of only 60 characters. The data present in the source is all less than 60 characters in length, but if this changes in the future and data begins to be truncated, I want to be informed of this.
 
This raises two problems. First, because I'm not pre-emptively truncating the columns, my Data Flow Destination allows shows a validation warning. Is there any way I can tell SSIS "I know that data might be truncated, but I want to deal with that at run-time, not as design-time"?
 
Second, I'm not sure how to pass myself a notification using the options provided by Error Output on the Data Flow Destination. Fail Component would allow me to alter the control flow, but I would prefer not to have the process fail utterly because of one truncated record. I'm not sure if Ignore Failure will simply omit the row that would be truncated (not an acceptable solution) or truncate the data (could work temporarily, but I still need to be warned). Redirect Row is appealing but has a different problem - if I redirect the error/truncated rows to a separate table, that Data Flow Task no longer fails, which means I have no way to raise a notification.
 
Is there a better way to do this? The only option I can think is to do Redirect Row, and then have the next step in the Control Flow be a script that checks for the presence of records in my error table, and send a notification if there are, but that seems unnecessarily circuituous. Is there a way in SSIS to arbitrarily send a Failure message if a given step is hit (possibly with Events), or is that case reserved strictly for halting failures?

View Replies !   View Related
Performane Tuning And Deadlock Trapping In This Scenario.
SQL2K
SP4


Howdy all. I have done a fair amount of performance tuning and deadlock resolving in my day, but never under these circumstances. Here is the scenario:

A sproc written in Dynamic SQL (with a dynamic WHERE clause I should add) queries a View. This View is joined to several more Views, that are joined to several more Views, that are joined to several more Views, that are.......

So, what I've been having to do to find out if my column is indexed or not is read View1, then View2, and so on and so forth until I figure out what the table really is.

This is extremely time consuming. I can actually have 10 - 20 joins by the time all is said and done.

Now, I am aware that Dynamic SQL is bad, and I'm also aware that 10 - 20 joins is bad. But that doesn't solve anything for me. Can anyone provide any ideas on how to troublshoot perfomance issues and deadlocks in this scenario?

TIA, ChrisR

View Replies !   View Related
Trapping &#39;curent Activity; In Batch Overnight?
Hello:

We are using Mssql 6.5, with sp4.

During the day I frequently use watch the current activity window under
Enterprise Manager to see who is doing what and when.

However, overnight there are various users running various jobs that I am
not always informed about. Wactcing the current activity isn't an option
here.

Does anyone have a job that I could periodically run overnight to perfrom
the same function as the current activty box? Which system tables does the
current activity functionality use?

Thanks. Any information that can be provided here will be appreciated.

DAvid Spaisman

View Replies !   View Related
Trapping Validation Errors And Sending Email
I have a DTS package that I'm moving over to SSIS.  In place of migrating this package, I've choosen to recreate it.  This package moves data from an Informix database to a SQL database.

In the old package the first task was to make a simple connection to the Informix database and if the task failed, it would send an email and stop the package.

The biggest reason for this is because the Unix server that I'm getting the Informix data from forces the user passwords to be reset ever 90 days.  So in my old package, if I forgot to change the password and the connection started to fail it would send me an email.

In my new package, SSIS performs a validation before starting.  There are a number of task that uses the connection to the Informix database.  Under testing, if I put in a bad password, the validation process generates a validation error.  I've tried catching this validation error using the Error Handling events but I've had no luck.  I can send out errors PreValidation and PostValidation but OnError appears not to fire under a validation error.

Might anyone have any suggestions on a proper way to validate and be able to send out email notification if a connection fails?  Any assistance would be appreciated.

View Replies !   View Related
Trapping Parameter Passing From URL To Stored Procedure
I have a Stored Procedure that takes a hand full of parameters to retrieve the data. I€™m using the exec sp_name @param1, @param2€¦ pattern in my dataset definition. This report is a sub-report and I€™m opening by sing the Jump hyperlink action. To query string contains the parameters to be passed. The problem I€™m having is that for some reason not all the parameters are passed every time. My question is how can I validate what values is passed to the SP from RS when it execute the SP.

View Replies !   View Related
Trapping Sql Server 2000 Generated Errors In Vb (client) Program
Hello...

can ne one give me info on trapping sql server 2000 error messages in my client application?

View Replies !   View Related
Exec Pkg Task: Error 0xC0202009 While Preparing To Load The Package. An OLE DB Error Has Occurred. Error Code: 0x%1!8.8X!.
I cannot execute a package by using Execute Package task.
I supplied sa credentials to connection manager, and it shows the list of Packages on SQL Server but when running the task it says

Error 0xC0202009 while preparing to load the package. An OLE DB error has occurred. Error code: 0x%1!8.8X!.



Any clue ?


Thanks,
Fahad

View Replies !   View Related
SQL Server 2005 Install Error (Error 29528. Unexpected Error While Installing Performance Counters. )
I'm currently receiving the following error message whilst attempting to install SQL Server 2005 Standard Edition on Windows Server 2003 (32 Bit):
Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

This server already has an install of SQL Server 2000 as the default instance. I'm attempting to install a new named instance of SQL Server 2005.

Extract from log:

<Func Name='LaunchFunction'>
Function=Do_sqlPerfmon2
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='0'>
Doing Action: Do_sqlPerfmon2
PerfTime Start: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
<Func Name='Do_sqlPerfmon2'>
<EndFunc Name='Do_sqlPerfmon2' Return='0' GetLastError='2'>
PerfTime Stop: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
MSI (s) (4C:FC) [10:20:02:833]: Executing op: ActionStart(Name=Rollback_Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,Description=Removing performance counters,)
<EndFunc Name='LaunchFunction' Return='0' GetLastError='0'>
MSI (s) (4C:FC) [10:20:02:849]: Executing op: CustomActionSchedule(Action=Rollback_Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,ActionType=1281,Source=BinaryData,Target=Rollback_Do_sqlPerfmon2,CustomActionData=100Removing performance counters200000DTSPipelineC:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.INI)
MSI (s) (4C:FC) [10:20:02:849]: Executing op: ActionStart(Name=Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,Description=Installing performance counters,)
MSI (s) (4C:FC) [10:20:02:849]: Executing op: CustomActionSchedule(Action=Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,ActionType=1025,Source=BinaryData,Target=Do_sqlPerfmon2,CustomActionData=100Installing performance counters200000C:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.INIC:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.HC:Program FilesMicrosoft SQL Server90DTSBinnDTSPipelinePerf.dllDTSPipeline0DTSPipelinePrfData_OpenPrfData_CollectPrfData_Close)
MSI (s) (4C:94) [10:20:02:864]: Invoking remote custom action. DLL: C:WINDOWSInstallerMSI1683.tmp, Entrypoint: Do_sqlPerfmon2
<Func Name='LaunchFunction'>
Function=Do_sqlPerfmon2
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='0'>
Doing Action: Do_sqlPerfmon2
PerfTime Start: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
<Func Name='Do_sqlPerfmon2'>
<EndFunc Name='Do_sqlPerfmon2' Return='2' GetLastError='2'>
PerfTime Stop: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
Gathering darwin properties for failure handling.
Error Code: 2
MSI (s) (4C!F0) [10:23:46:381]: Product: Microsoft SQL Server 2005 Integration Services -- Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

You can ignore this and it will complete the installation, but subsequently trying to patch with SP2 will fail on the same sections - Hotfix.exe crashes whilst attempting to patch Database Services, Integration Services and Client Components (3 separate crashes).

I've removed SQL Server 2005 elements and tried to re-install, but it's not improved the situation.

Any ideas?

View Replies !   View Related
Error Source : Microsoft Data Transformation Services (DTS) Package Error Description : Error Accessing Windows Event Log
 

Hi,
 
I am running dts in Sql Server 2005 management studio from Management, Legacy and data Transformation Services.
 
Once the dts has run, I get this error message "Error Source : Microsoft Data Transformation Services (DTS) Package  Error Description : Error accessing Windows Event Log."
 
Please help me
 
thanks in advance
 
Srinivas
 
 
 
 

View Replies !   View Related
[XML Task] Error: An Error Occurred With The Following Error Message: There Are Multiple Root Elements.
I'm trying to use an XML Task to do a simple XSLT operation, but it fails with this error message:

[XML Task] Error: An error occurred with the following error message: "There are multiple root elements. Line 5, position 2.".

The source XML file validates fine and I've successfully used it as the XML Source in a data flow task to load some SQL Server tables.  It has very few line breaks, so the first 5 lines are pretty long: almost 4000 characters, including 34 start-tags, 19 end-tags, and 2 empty element tags.  Here's the very beginning of it:

<?xml version="1.0" encoding="UTF-8"?>
<ESDU releaselevel="2006-02" createdate="26 May 2006"><package id="1" title="_standard" shorttitle="_standard" filename="pk_stan" supplementdate="01/05/2005" supplementlevel="1"><abstract><![CDATA[This package contains the standard ESDU Series.]]></abstract>

There is only 1 ESDU root element and only 1 package element.

Of course, the XSLT stylesheet is also an XML document in its own right.  I specify it directly in the XML Task:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/>

<xsl:template name="identity" match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>

<xsl:template match="kw">
  <xsl:copy>
    <xsl:apply-templates select="@*"/>
      <xsl:attribute name="ihs_cats_seq" select="position()"/>
    <xsl:apply-templates select="node()"/>
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>


Its 5th line is the first xsl:template element.

What is going on here?  I do not see multiple root elements in either the XML document or the XSLT stylesheet.

Thanks!

View Replies !   View Related
An Internal Error Occurred On The Report Server. See The Error Log For More Details. RsInternal Error)
We have reports deployed in the Report Server. While connecting from client, we are getting the error
"An internal error occurred on the report server. See the error log for more details.   rsInternal Error)"
 
Then we went to Report Server, Reporting Service and SQL Server service are all are running fine.
 
Important thing is some time the reports are working fine, sometimes i am receiving this error. Please help.
 
We predict whether the services are automatically restarted or transaction logs exceeding the limit or any other parameters to set to avaoid this error?
 
Please help.
 

View Replies !   View Related
I Have The Dreaded Internal Error Occured On The Report Server. See Error Log For More Details No Error Log
I have the error above, but no error log.  I can preview the sub report - but this main report fails after working this morning.   This is for internal company reports and I rebuilt this one after converting from access. 
I have looked where the error logs should be, but there are no error logs. 
I rebuilt the query as I needed to change this, but this did not help.
Is there someone who could point me in the correct direction.

Thanks!
Terry

View Replies !   View Related
Just Started Getting This Error When Trying To Connect To SQL From ASP.NET--error: 26 - Error Locating Server/Instance Specified
This has worked fine for weeks, and months.

I'm running Vista Ultimate. SQL 2005 is set as my Default instance, and SQL2000 is set as (local)SQL2000.

Today, actually half way through today, I restarted my computer after installing Photoshop Updates.

Upon getting my computer back up and running, I cannot access SQL2000 from any website on my computer, nor can I access it from SQL2005 Management Stdio. I CAN access it from Enterprise Manager (SQL2000 tool).

Whenever I run an web app that connects to it I get this error:


An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Now I usually get these when ASP.NET can't point to the right spot, but in this case I'm pointing exactly where I need to go. Any thoughts?

--Edit

I should also add my password got changed a few days ago on our Domain. This was the first time restarting after the PW change.

View Replies !   View Related
Error 7399: OLE DB Provider 'MSDAORA' Reported An Error. OLE DB Error
My link server was working just fine until friday evening.
It stopped worked over the week end.
with and error Error 7399: OLE DB provider 'MSDAORA' reported an error. OLE DB error .

---my oracle 10g client is working just fine
--TNS names looks fine
---i recreated the link but i am still getting the same error.

I need your help because a lot of jobs are using that link on Monday it is going to be crazzzy.

View Replies !   View Related
[File System Task] Error: An Error Occurred With The Following Error Message: &&"Access To The Path Is Denied&&"
Hi -
 
I have an File System Task that copies a file from one directory ot another. When I hard code the  target directory (c:dirfile.txt) it works fine. When I change it to a virtual directory (\serverdirfile.txt) I get a security error:
 
[File System Task] Error: An error occurred with the following error message: "Access to the path '\gracehbtest oS2TMM_Live_Title_000002.xml' is denied.".
 
Where do I change the security settings?
 
Thanks - Grace

View Replies !   View Related
614 Error On A User Database And 806 Error On Tempdb Seen In The Error Log
Hi,

We have a production SQLServer 6.5 running with service pack SP5a update:

I got the following 2 errors.....

1.

Error : 806, Severity: 21, State: 1
Could not find virtual page for logical page 67833121 in database 'tempdb' database 'tempdb'

2.

I got error when I ran a job for Update statistics
Error : 614, Severity: 21, State: 3
A row on page 2697653 was accessed that has an illegal length of -8631 in database 'abc'.

For Error 2: I ran update statistics using query analyser. It is fine
Is there anything I have to do further?


For Error 1 : The work around given by Microsoft
=================================================
I ran
DBCC CHECKTABLE(syslogs)

I am getting the following message on :
master:
Checking syslogs
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 11 data rows.
DBCC execution completed. If DBCC printed error messages, see your System Administrator.

model:
Checking syslogs
The total number of data pages in this table is 47.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 532 data rows.
DBCC execution completed. If DBCC printed error messages, see your System Administrator.

tempdb:

Checking syslogs
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 31 data rows.
DBCC execution completed. If DBCC printed error messages, see your System Administrator.

I ran dbcc checkdb on master,model and tempdb . Still I get the same problem.

for tempdb:

Checking 8
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 19 data rows.

for master:
Checking 8
The total number of data pages in this table is 1.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 27 data rows.

for model:
Checking 8
The total number of data pages in this table is 47.
*** NOTICE: Notification of log space used/free cannot be reported because the log segment is not on its own device.
Table has 532 data rows.

All system databases and userdatabase recovered successfully when I restarted sqlserver.

Please advice how to get rid of this problem.


Thanks in advance,
Anu

View Replies !   View Related
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB Error Has Occurred. Error Code: 0x8000FFFF.
Hi All,
 
Recently in an SSIS package I am getting the following error for a particular Data flow task.
 




Error: 2008-01-25 12:01:48.58

Code: 0xC0202009

Source: Import Datasynapse Data User Events Source [3017]

Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x8000FFFF.

End Error

Error: 2008-01-25 12:01:48.73

Code: 0xC004701A

Source: Import Datasynapse Data DTS.Pipeline

Description: component "User Events Source" (3017) failed the pre-execute phase and returned error code 0xC0202009.

End Error
 
Our guess is when the data size of User Events table is more it throws this error. If we try to transfer small subset of data it succeeds. What could be reason for this error?
 
Since this is very urgent, immediate response would be very much appreciated.
 
Thanks & Regards,
Prakash Srinivasan

View Replies !   View Related
The Push Method Returned One Or More Error Rows. See The Specified Error Table. [ Error Table Name = ]
Hi,
I have application in which i am performing synchronization between SQL Server 2000 and SQL Server 2005 CE.
I have one table "ItemMaster" in my database.There is no relationship with this table,it is standalone.I am updating its values from Windows Mobile Device.

I am performing below operations for that.
Step : 1 Pull To Mobile



Code BlockmoSqlCeRemoteDataAccess.Pull("ItemMaster", "SELECT * FROM ItemMaster", lsConnectString,RdaTrackOption.TrackingOn);
 
 



Step : 2 Using one device form i am updating table "ItemMaster" table's values.
 
Step : 3 Push From Mobile



Code BlockmoSqlCeRemoteDataAccess.Push("ItemMaster", msConnectString);
 
 


So i am getting an error on 3rd step.
While i am trying to push it says, 
"The Push method returned one or more error rows. See the specified error table. [ Error table name = ]".
I have tried it in different ways but still i am getting this error.
 
Note : Synchronization is working fine.There is not issue with my IIS,SQL CE & SQL Server 2k.
 
Can any one help me?I am trying for that since last 3 days.

View Replies !   View Related
Strange Error In Error Log (error 17824)
We are encounrtering a strange error in out sql error log:

source: ods
error: 17824, severity 10, state 0
source: ods
unable to write to ListenOn connection '.pipesqlquery', loginname 'op', hostname 'BOR0181'

This error occurs multiple times per day from several client stations.

It started when we enabled replication on that server, and started replicating the whole database to another server.

Can somebody give me an idea on what the problem could be ?
Bart Roelant
Capsugel Belgium

View Replies !   View Related
Error Log Gets Duplicated Error Message For Each Error
I have a simple error log that only keeps the OnError's messages.

For each error, SSIS always writes the error message two times with the same id and language.

Please give me some idea to fix this duplication.

 

Thanks,

 

dnncpt

 

 

View Replies !   View Related
I Got The Following Error: Error: 823, Severity: 24, State: 4 I/O Error 33
I got the following error

Error: 823, Severity: 24, State: 4

I/O error 33(The process cannot access the file because another process
has locked a portion of the file.) detected during write at offset

0x0000000a796000 in file xxxxxxxxx.mdf'.

What happend with my database?

View Replies !   View Related
Error :(provider: Named Pipes Provider, Error: 40 - Could Not Open A Connection To SQL Server) (Microsoft SQL Server, Error: 53)
Hi,

   I am trying to connect to my SQL Server 2005 but it gave me following error message.

 


TITLE: Connect to Server
------------------------------

------------------------------
ADDITIONAL INFORMATION:

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)

 

So, Please help me to solve this problem.

 

tnks.

View Replies !   View Related
Error 7399: OLE DB Provider 'Microsoft.Jet.OLEDB.4.0' Reported An Error.Authentication Failed.
I am trying to create an excel file using openrowset in ms sql 2000.but i get the following error when I try to create the file...My stored procedure code is below as well...Error 7399: OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error.Authentication failed.What can I do?-- here is my codeCreate PROCEDURE MCA_SP_CREATE_EXCEL @File_Name as varchar(50) = ''ASBEGINSET NOCOUNT ONdeclare @File_Name as varchar(50)DECLARE @Cmd varchar(1000)DECLARE @fn varchar(500)DECLARE @provider varchar(100)DECLARE @ExcelString varchar(100)-- New File Name to be createdIF @File_Name = ''Select @fn = 'C:Test.xls'ELSESelect @fn = 'C:' + @File_Name + '.xls'-- FileCopy command string formationSELECT @Cmd = 'Copy C:Template.xls ' + @fn-- FielCopy command execution through Shell CommandEXEC MASTER..XP_CMDSHELL @cmd, NO_OUTPUT-- Mentioning the OLEDB Rpovider and excel destination filenameset @provider = 'Microsoft.Jet.OLEDB.4.0'set @ExcelString = 'Excel 8.0;Database=' + @fn-- Executing the OPENROWSET Command for copying the select contents to Excel sheet.exec('insert into OPENrowset(''' + @provider + ''',''' + @ExcelString + ''',''SELECT FirstName,LastName,Phone,Address,City,State,Zip FROM [Sheet1$]'') select au_fname as FirstName,au_lname as LastName,phone,address,city,State,Zip from authors')exec('insert into OPENrowset(''' + @provider + ''',''' + @ExcelString + ''',''SELECT StoreId, OrderNo, OrderDate, Quantity FROM [Sheet2$]'') select stor_id as StoreId,Ord_Num as OrderNo,Ord_Date as OrderDate,qty as Quantity from sales')SET NOCOUNT OFFEND

View Replies !   View Related

Copyright © 2005-08 www.BigResource.com, All rights reserved