Timeout Error While Executing Oracle Function

Jan 11, 2007

Hi,

I have developed reports for Oracle database. I wanted to avoid use of OUT REF cursor hence am using function & calling it from reports.

The logic in SP/function is so complex that it takes 5 mins to execute n get the result. I see the results on the report server, But when I call that report from web application, I get System.Net.WebException - Time out error.

My questions:

1. What setting I make on report server to avoid timeout?

--Are these settings applied on report server restart?

2. Is there any setting needed for Datasource also?

TIA

Tanmaya

View 2 Replies


ADVERTISEMENT

Timeout Error While Executing Procedure

Aug 17, 2006

Hi,

I have written a stored procedure that i then execute in a loop within a wrapper procedure:

WHILE somecondition

BEGIN

EXEC dbo.PROC1

END

If i run the procedure manually i can run it time after time with no error. However if i execute the procedure above i get a timeout error after about 2 or 3 loops.



How can i avoid this?

I have been reading everywhere and i dont seem to be able to find a solution...

View 1 Replies View Related

Error Executing Non Query: Timeout Expired

May 23, 2007

I was having some errors from the webpage accessing the OLlinks table in the database.
Error executing non query: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
StackTrace:   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)   at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)   at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()   at System.Data.SqlClient.SqlDataReader.get_MetaData()   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)   at System.Data.SqlClient.SqlCommand.ExecuteReader()   at admin_admOLEditLinks.selectData(String strID) in e:wwwroothomeadminadmOLEditLinks.aspx.cs:line 101DateTime:5/23/2007 1:14:10 PMSource:http://www.myDomain.comiAdmin/admOLEditLinks.aspx?ID=3ErrorMessage:Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
I kept getting the above error so then I try to access the table directly inside of MS SQL Server Management Studio and then I recieved the following error:
SQL Execution Error.
Executed SQL statement: SELECT lnkID, linkFromID, linkToID FROM OLlinks
Error Source: .Net SqlClient Data Provider
Error Message: Timeout expired. The timeout period elapsed prior to completion of the opration or the server is not responding.
 
Open any other table works fine except this table only. Any help is much appreciated.

View 7 Replies View Related

SQL Express Timeout Error When Executing A View

Apr 17, 2007

I get the following error message:

SQL Exectution error,

Exectuted SQL statement: SELECT...

Source: .Net SqlClient data provider

Message: Timeout expired, timeout period elapsed prior to completion of the operation...



The view is operating on a table of ~250,000 records. The timeout occurs after 45 seconds, and none of the changes I make to the various timeout settings in the server or database seem to affect this.

When I execute the same sql statement in a query window it does complete, requiring about 7 minutes to execute.

How can I configure the view not to timeout when executing this query?



- Jim

View 6 Replies View Related

Timeout Error When Executing SQL Command From The Script Task

Apr 18, 2008



The SQL query takes about 4 minutes to execute in SQL Management Studio. But when I run it from the Script Task using the OleDBCommand, I got the timeout error in 40 seconds. The timeout setting on the SSIS DB connection is 0. I do not see how to set the timeout for an SSIS task. Any thoughts on this problem? TIA.

View 8 Replies View Related

Strange Timeout Problem When Executing Stored Proc

Jul 27, 2004

We have a stored procedure that will return at most about 600 records. In almost all cases it works fine, but in a few odd cases the command times out when used from a webform. We changed the CommandTimeout property to 120 seconds... no difference. If we run a query that times out in Query Analyzer, it runs in under 3 seconds (on the SQL Server machine). We also did a lot of profiling, and for any page that runs fine, the query takes about the same time when called from a webform and run in the Query Analyzer.
We ran our tests on the pre-production environment with absolutely no one else on the machines. We also created a test page that just fills a DataSet. Straightforward... get connection object, create command, set params, create data adapter, fill dataset. It suffers the same problem.

The web server and SQL server are two separate machines. Oh, and before I forget... This is SQL 2000. It used to run SQL 7, and all the queries there were (slightly) slower, but none timed out, not even the ones that do now.

Maybe the first question should be:
How can it be that a query that runs fine in Query Analyzer times out from a webform?

View 8 Replies View Related

Error : Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The Server Is Not Responding.

Jul 3, 2007

Hi,
I am running a stored procedure that collects some records from two tables do some calculations with those records and insert those calculation result in a temp. table. I am calling this stored procedure in my aspx page and then later select all the records from temp table and show it in a table.
When I run this application on browser it give me Timeout expired error but whn I execute the stored procedure it runs properly but takes around 3:10 mins to execute in query analyzer. I did some google work and based on that I specified CommandTimeout = 300 for SP and Connection timeout=400 in web.config. But still it didnt worked. Sometimes it runs properly but sometimes its not.
Where I am doing mistake? and Wht should i do to resolve this? Plz. help.
Thanks in adv.
Regards,
Yogita
 
 

View 1 Replies View Related

Error: Timeout Expired. The Timeout Period Elapsed Prior To Completion Of The Operation Or The Server Is Not Responding.

Dec 26, 2007

Guys,
I am trying to attach a database object to the App_Data directory I got thie error
  Error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
This is what I did. I right click the App_Data folder and click Add New Item. Then I click the SQL Database. This is where I got the error.
What should I do? Please help

View 2 Replies View Related

Error : Timeout Expired. The Timeout Period Elapsed...

Nov 10, 2006

Hi,I
get this error from our web application every once in a while. " Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding". I email
myself when an error occurs, and once every 2-3 days I get this timeout
error emails, like 5-10 emails in a span of few minutes. Then it goes
away. I have set the command timeout for 60 secs.
It
doesn't happen from the same stored procedure, actually I have seen it
timeout from really simple 1 or 2 line stored procedures, which shouldn't normally take 1 sec. Its like
sql server just shuts down for few minutes. We have some
backups and maintenance jobs scheduled, but they run only after
midnight. I have checked the
application event viewer, there are no warnings or
error messages for MSSQLSERVER. Can
any one tell me how to check whats going on during that short timespan
when timeout error occurs, and what causes it? I don't want to run sql
profiler continuously for 2-3 days, I am afraid it will slow down the
server more. Thanks.

View 3 Replies View Related

A Function Smilar To DECODE Function In Oracle

Oct 19, 2004

I need to know how can i incoporate the functionality of DECODE function like the one in ORACLE in mSSQL..
please if anyone can help me out...


ali

View 1 Replies View Related

Executing An Oracle SP From SQL Server Query Analyzer

May 3, 2000

Does anybody know the syntax for Executing an Oracle SP from SQL Server Query Analyzer? The Oracle database is linked to the SQL Server. Thanks.

View 1 Replies View Related

Executing An Oracle Stored Procedure From SSIS

Feb 21, 2006

Hello,

Is there an oracle provider out there that will let me invoke a parameterless stored procedure that is in a package in my Oracle source?

Better could that stored proc receive a prameter?

Still better, could I use a stored proc in a OLEDB source component and get the resutls from its only out variable (ref cursor) into my SSIS dataflow?

I haven't been able to get any of these basic functionalities working with either the Oracle OLEDB or the Microsoft OLEDB for Oracle provider...

If not, are there any plans to enahnce the MS provider to handle that?

A more tricky question :
Why does the ReportingService data processing extension for Oracle sources allow such things and not the .NET provider in SSIS?

Thanks

View 6 Replies View Related

Problem Executing A Oracle Procedure Using Execute Sql Task

Oct 18, 2006

Hi All,

I am trying to execute a Oracle Procedure through Execute Sql Task but it keeps throwing back an error ORA:00900. Is it possible to execute the procedure from this object? Do I need to use the script task to execute this. If yes then how?

Any help would be appreciated.

Thanks in advance.

Amol





View 2 Replies View Related

Executing (from Sql Server 2000) Procedures From Oracle Package Through Linkserver

Feb 16, 2004

Hello,

I deaply need to know how to execute procedures from package in oracle, from sqlserver 2000 using linkserver.

Thank you very much,
Victor
DBA

View 2 Replies View Related

Executing Oracle Stored Procedure With Output Parameters Using ADO.NET Connection

Apr 11, 2007

I am a bit confused by an issue that I am having with executing an Oracle stored procedure (with an output parameter) using an ADO.NET connection object. I am able to get this working using an OLEDB connection, but I have no idea why the ADO.NET connection doesn't work. (Bug, by design, or my ignorance?) Actually, I can even get this to work if I use the .NET Providers for OLE DBMicrosoft OLE DB Provider for ORACLE if we set the connectionType to ADO.NET. This is the error that I am receiving:



[Execute SQL Task] Error: Executing the query "pkg_utility_read.test_out_var " failed with the following error: "The OracleParameterCollection only accepts non-null OracleParameter type objects, not SqlParameter objects.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.



It is also worth mentioning that the ORACLE stored procedure has an out parameter with a NUMBER datatype which I think maps to the ADO.NET Int32 datatype. I guess OLE DB datatypes are more closely mapped to ORACLE datatypes. In OLE DB you can set the parameter to double and the ORACLE stored procedure to NUMBER and it works.



Any help on this would be most appriciated.

View 3 Replies View Related

Function Causes A Timeout

Jul 31, 2007

I have a function which is causing a time out it is only being used on 1700 records and the problem seems to happen in the afternoon The client gets the error on a live system and so do I on the dev system
ALTER FUNCTION [8977].[isClosed] (@Iref nvarchar(30),@clid int)RETURNS BITAS/* if the event is closed return true */BEGINRETURN (SELECT closedFROM dbo.tblOCompEventsWHERE (ClientID = @clid) AND (IRef = @Iref)GROUP BY closedHAVING (closed = 1))END
I am using in like thisAND ([8977].isClosed(tblOCompEvents.IRef, tblOCompEvents.ClientID) IS NULL)
I have taken the IRef Argument out still times outI have changed it from IS NULL to = 0 and to = 1, all still cause a time outany ideas please?

View 8 Replies View Related

Executing A Function In Report Services

Nov 29, 2007



Hi all I have a function that I'm trying to make a report with SQL server report services. My problem is everytime I add a table I addd the function and I get the table with a red arrow pointing down, when I try to execute int sql server intelligence development studio it gives me an error message. can anyone help pleaes

View 4 Replies View Related

Integration Services :: Oracle Procedure Is Not Returning Results When Executing From Script Task On SSIS

Jul 13, 2015

I'm executing Oracle procedure, which has three OUTPUT parameters and returns results in table type variable. i should not use ODBC, MSDAORA providers to call the procedure. So I'm planning to using Oracle OLEDB provider. I'm able to execute the procedure successfully, but when i do check (while dr.Read()) its not returning any records. But I know as per stored procedure results, it should return 66 records.

Dim conn As New OleDbConnection
Dim cmd As New OleDbCommand
Dim dr As OleDbDataReader
Dim QSQL As String

[code]...

View 10 Replies View Related

Oracle Publication Error:The Permissions Associated With The Administrator Login For Oracle Publisher 'test1' Are Not Sufficient

Jan 12, 2006

Hi,

I am trying to make an oracle publiching from sql server 2005 enterprise final release, i installed the oracle client  10.2 (10g) on the same server where sql server already installed, i made different connection to oracle database instance and it was  ok.

 

from sql server : right click on publication -New oracle publication-Next-Add Oracle Publisher-Add button-Add Oracle Publisher-i entered server insttance test1 and their users and passwords--connect --->

the oracle publisher is displayed in the list of publisher but when press ok i got the following error :

TITLE: Distributor Properties
------------------------------

An error occurred applying the changes to the Distributor.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.1399.06&EvtSrc=Microsoft.SqlServer.Management.UI.DistributorPropertiesErrorSR&EvtID=ErrorApplyingDistributor&LinkId=20476

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

SQL Server could not enable 'test1' as a Publisher. (Microsoft.SqlServer.ConnectionInfo)

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

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

The permissions associated with the administrator login for Oracle publisher 'test1' are not sufficient.
Changed database context to 'master'. (Microsoft SQL Server, Error: 21684)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=21684&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


Any idea about this error ?

Thanks

Tarek Ghazali
SQL Server MVP.


 

View 2 Replies View Related

Oracle NVL Function

Jan 9, 2002

Hi,

I want to know if there is a function in SQL Server that do the same thing than the Oracle function NVL()

In Oracle we can do the following thing :

select nvl(last_name,first_name)
from table_test;

This have the effect that if the last_name field is NULL, it will display the first_name

Is there a function like this in SQL 7

Thank

Martin

View 2 Replies View Related

Oracle Error ORA-12154 From An Application Which Never Uses Oracle

Mar 14, 2008

My application which ran perfectly well yesterday suddenly stopped working in this morning with following error message. I didn't change anything, at least I believe. Interesting thing is that I don't use any Oracle connection but connects to MS SQL Server 2005 Express version locally. Error messages are different according to the connection string though I don't think it makes difference:
ConnectionString = <add key="Databasehandtool1" value="Data Source=.SQLEXPRESS;Database=handtool;SSPI=true" />ErrorMessage from VS2008 ="Unable to get records. Object reference not set to an instance of an object."
ConnectionString = <add key="Databasehandtool1" value="Data Source=.SQLEXPRESS;Database=handtool;User Id=handtool_DB;Password=mypassword" />ErrorMessage from VS2008 =  "Unable to get records. Unable to connect to database. ORA-12154: TNS:could not resolve the connect identifier specified."   By the way, the application was generated from IronSpeed 5.1 Enterprise. My development environment is : VS2008, SQL2005 EXPRESS, Windows XP SP2, ASP.NET 2.0 
We have actually an Oracle server in the network though. My gut feeling is that something might have changed in my network server during the night but how come it can possibly affect my application running on my local PC. I checked the connection of local SQL Express Server from SQL Server Management Studio and it connected well with UserID=handtoo_DB and showed all tables and stored procedures required for the application. So there is no problem in SQL Server database side.
I would welcome and appreciate any input.
fudata

View 1 Replies View Related

Looking For A Function Similat To InitCap In Oracle For SQL SERVER 7.0

Jul 12, 2000

Hi Guys,

Does somebody know if a function similar to INITCAP in Oracle is also available in SQL SERVER 7.0 ?

Just FYI: INITCAP function takes a character string, say 'sql', and returns the string 'Sql' which has first letter 'S' in caps.

TIA,

anuj

View 1 Replies View Related

Oracle Translate Function Equivalent In SQL Server

May 5, 2006

Hi

I want to know the equivalent of the Oracle translate function in SQL Server.

eg : select translate('entertain', 'et', 'ab') from dual.

I tried the SQL Server Replace function , but it replaces only one character or a sequence of character and not each occurrence of each of the specified characters given in the second argument i.e 'et'.

Please let me know if there is some other equivalent function in SQL Server

thanks.

View 14 Replies View Related

How To Use The OLEDB Command To Call A Oracle Function?

Dec 11, 2006

HI,

I want to use the OLEDB command to call a oracle function, but i havnt found any materials about how to do that, my oracle function is as below:

CREATE OR REPLACE function GET_ZONEID_FROM_SYFZ(ycz varchar2,xc varchar2,strat_id varchar2)
return varchar2 IS
 zone_id_result varchar2(10) ;
begin
 PKG_DM_DQ.GET_ZONEID_FROM_SYFZ(ycz,xc,strat_id,zone_id_result);
 return zone_id_result;
end;

In OLEDB command transformation component, i fill the sql command with "select GET_ZONEID_FROM_SYFZ(?,?,?) from dual", but i dont have it worked.

The error message is :provider can not derive parameter information and setparameterinfo has not been called.

Who have any idea about how to make it work?

Thanks ~~

 

View 7 Replies View Related

Oracle Translate Function Equivalent In SQL Server

May 5, 2006

Hi



I want to know the equivalent of the Oracle translate function in SQL Server.



eg : select translate('entertain', 'et', 'ab') from dual.



I tried the SQL Server Replace function , but it replaces only
one character or a sequence of character and not each occurrence of
each of the specified characters given in the second argument i.e 'et'.



Please let me know if there is some other equivalent function in SQL Server



thanks.

View 4 Replies View Related

Error Occurred While Executing Batch / Internal Connection Fatal Error

Sep 24, 2015

Got this error running a query with ssms2014
on SqlServer2014
but db has Compatibiliy level 100 (sql2008)

no sql error code in message and no error found in eventviewr (sqlserver log, windows log, application log ecc)when i run that query i got this message in "messages" tab, and in results tab i got a strange result, indeed the value returned doesn't exists in table.

ex table1.field1 possible values= 2,3
it returns 1113344

we got that error thru jdbc too...that query use a lot of joins, unfortunatley i can't post it here. today got this error, so i make a copy of 1 of involved table into another db in the same instance, re run the query on the original db, and it works well.

View 2 Replies View Related

Execute SQL Task: Executing The Query Exec (?) Failed With The Following Error: Syntax Error Or Access Violation. Possible F

Jan 23, 2008

Hi,
I'm having an SSIS package which gives the following error when executed :

Error: 0xC002F210 at Create Linked Server, Execute SQL Task: Executing the query "exec (?)" failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Task failed: Create Linked Server

The package has a single Execute SQL task with the properties listed below :

General Properties
Result Set : None

ConnectionType : OLEDB
Connection : Connected to a Local Database (DB1)
SQLSourceType : Direct Input
SQL Statement : exec(?)
IsQueryStorePro : False
BypassPrepare : False

Parameter Mapping Properties

variableName Direction DataType ParameterName

User::AddLinkSql Input Varchar 0


'AddLinkSql' is a global variable of package scope of type string with the value
Exec sp_AddLinkedServer 'Srv1','','SQLOLEDB.1',@DataSrc='localhost',@catalog ='DB1'

When I try to execute the Query task, it fails with the above error. Also, the above the sql statement cannot be parsed and gives error "The query failed to parse. Syntax or access violation"

I would like to add that the above package was migrated from DTS, where it runs without any error, eventhough
it gives the same parse error message.

I would appreciate if anybody can help me out of this issue by suggeting where the problem is.

Thanks in Advance.

View 12 Replies View Related

Error = -2147467259 (80004005) Error String: Timeout Expired

May 5, 2003

Hi everybody,
I do custom log shipping over network like

step 1 backup log to C:..
step 2 zip log file c:... zip
step 3 copy zip to \sm01
estorelogs...
step 4 unzip file
step 5 restore log with stand by

Few times a month it fails with

Error = -2147467259 (80004005) Error string: Timeout expired Error source: Microsoft OLE DB Provider for SQL Server Help file: Help context: 0 Error Detail Records: Error: -2147467259 (80004005); Provider Error: 0 (0) Error string: Timeout expired Error source: Microsoft OLE DB Provider for SQL Server

Any idea ,what might cause it ?

Thank you
Alex

View 3 Replies View Related

[298] SQLServer Error: 258, TCP Provider: Timeout Error [258]. [SQLSTATE 08001]

Mar 11, 2008

I've received this error twice over 2 days in the SQL Agent error log during off-hours from a server which has not had any changes to it in the last few months (once at 3:32AM and the next day at 3:46AM. I've been able to tie it to log-shipping backup jobs (all of which run under the SQL Service domain account) which run every minute. It seems to be only momentary, as the next attempt a minute later is successful.

I get the same set of messages for each database for the same time which look like this:


Date 07.03.2008 3:31:51 AM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)

Message
[298] SQLServer Error: 258, TCP Provider: Timeout error [258]. [SQLSTATE 08001]

Date 07.03.2008 3:31:52 AM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)
Message
[165] ODBC Error: 0, Login timeout expired [SQLSTATE HYT00]


Date 07.03.2008 3:31:52 AM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)

Message
[298] SQLServer Error: 258, Unable to complete login process due to delay in login response [SQLSTATE 08001]


Date 07.03.2008 3:31:52 AM
Log SQL Agent (Current - 10.03.2008 6:15:00 PM)

Message
[382] Logon to server '(local)' failed (SubSystemStepHistoryLogger)


I can't find any documentation on these errors on the web or MSDN site. Can I chalk this up to possibly "winking" connection to our domain controller? We've never had these messages before, and our LAN department swears that there have been no upgrades to the network or domain controller servers recently.

View 25 Replies View Related

Timeout Expired Error - SQL Server 2005 Error After Exactly 1 Hour

Aug 27, 2007

We have several large government web sites that we help look after. We recently migrated one of them from SQL Server 2000 to 2005 and are having a problem with our nightly email job in that if it runs for more than an hour then after exactly 1 hour the email job gets a "Timeout expired" message back from SQL Server.

Our batch jobs do run on a different server and connect remotely to our SQL Server DB. I did change the connections - remote query timeout and increased it 10 fold, but this didn't make any difference. Is there any other parameter that may be causing the Timeout expired error after exactly 1 hour?

Thanks !

View 1 Replies View Related

An Error Occurred While Executing Batch. Error Mes

Feb 28, 2008

I am getting this error
An error occurred while executing batch. Error message is: The directory name is invalid."

in sql management studio.

i found that if i switch to results to text i don't get the error but with results to grid I get it no matter what i query in any database on the server.

View 2 Replies View Related

Error H4000 Error While Executing The Query ???????????

Apr 3, 2008



Hi all
my problem is as follows : when i try to configure an ODBC DataAdapter using the configuration wizard

i use the query builder to select some fields from multiple tables , the displayed info depends in a user input , when i define the input parameter by writing(= ?) in the criteria column of the input field and continues , it displays an error

Error H4000 Error while executing the query , Error near ')' near character (214 for example).

so please if any one knows the solution to this error reply soon

Thanks a lot

Mina Samy

View 3 Replies View Related

Error 266 After Executing SP

Apr 24, 2003

I am facing this error when using a SP called by a DTS package (using ADO connection).
The SP gets three parameter and looks like the following (just major part of it):

SET @STR = 'SET ROWCOUNT 10000' + ' WHILE 1 = 1 ' + 'BEGIN' + ' BEGIN TRAN'
SET @STR = @STR + ' DELETE FROM ' + @TableToBeCleaned + ' WHERE ' + @SELECTEDCOLUMN + ' <

DATEADD (m,' + ' -' + @KeepMonthsInDatabase + ', + GETDATE())'
SET @STR = @STR + 'IF @@ROWCOUNT = 0 ' + 'BREAK ' + 'COMMIT ' + 'END ' + 'SET ROWCOUNT 0'
EXEC (@str)

Following error appears:

Server: Msg 266, Level 16, State 2, Line 1
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing.

Previous count = 4, current count = 5.
Server: Msg 266, Level 16, State 2, Procedure p_DBCleanerDeleteRows, Line 56
Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing.

Previous count = 4, current count = 5.

I use the SET ROWCOUNT to execute the delete in batches. When checking with SELECT @@TRANCOUNT it

returns me 5. Somehow it is clear to me that @@TRANCOUNT exited the SP with another value than when

entering it but there is commit in the dynamic SQL statement and I do not know what is wrong.

Is it neccessary to indicate BEGIN TRAN and COMMIT in the statement at all or can I ommit it?

Thanks

mipo

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved