Suspend Main Transaction

May 29, 2008

Hi

Im new to the world of sql server

I gonna write some t-sql stored procedures,and need to log error information in a database table, but don't want that log entry to be a part of the logical transaction.

So basically i want to
suspend the main transaction, perform SQL operations , commit or rollback those operations, and resume the main transaction.

Any ideas ?

Cheers

View 6 Replies


ADVERTISEMENT

DTS Job - Suspend On Fail?

Jul 23, 2005

Hi,Is it possible to somehow set a SQL Server DTS job to automaticallydisable itself, when it encounters a fail, so that future scheduledoccurrences don't happen until the problem has been fixed?I've hunted about for this on the web, but drawn a blank unfortunately!Many thanks if anyone can help at all.

View 2 Replies View Related

Suspend Trigger Execution

Aug 23, 2004

Is there any way to suspend a trigger execution after a commit trans?

View 6 Replies View Related

SQL SERVERÊý¾Ý¿â,¶ªÊ§,*.ldf,*.mdf,suspend,ÖÃÒÉ,»Ö¸´

Jan 6, 2004

¡¡¡¡¡¤ ¶ªÊ§*.ldfÎļþµÄMS SQL SERVERÊý¾Ý¿â»Ö¸´ÒµÎñ

¡¡¡¡Èç¹ûMS SQL SERVERÊý¾Ý¿â¶ªÊ§ÁË*.ldfÎļþ£¬Ö»ÓÐÒ»¸ö*.MDFÎļþ£¬½« ÊǷdz£Î£ÏÕµÄÊÂÇ飬Êý¾Ý¿âºÜ¿ÉÄܽ«ÎÞ·¨Ôٴδò¿ª£¬¶øÇÒ »áÏÔʾ¡°suspend¡±»òÕß¡°ÖÃÒÉ¡±×ÖÑù¡£»Ö¸´¸ÃÀàÊý¾ÝÊÇÊ ®·Ö¸´ÔÓµÄÊÂÇ飬ÐèÒª20¼¸¸ö²½Öè¡£

¡¡¡¡ÔÚ´ËÌáÐÑSQL SERVERÓû§£¬Èç¹ûÄúµÄÓ²ÅÌ×ã¹»´ó£¬Ç벻ҪʹÓÃÊý¾Ý¿âѹ ËõºÍÕûÀíµÄÃüÁîÀ´¶ÔSQL SERVERÊý¾Ý¿â½øÐвÙ×÷£¬·ñÔòºÜ²»ÈÝÒ×ÇÀ¾È¡£

Çë¿´http://www.haou.net/sqlother/

View 2 Replies View Related

Still Have Problems With (sometimes) Suspend Express

Apr 7, 2007

Hi there, i have still some Problems with the SQL Server Express.

Sometimes (not always) it seems that the SQL Server Express "sleeps"


I write through my application every 60 seconds some values in a table , but somethimes it seems that the server is not reachable and i cannot wrote the data. but the phanomen are only happens for a record , the next time it works fine. (i check always for a open connection) if i cannot write the data , it seems that the connection is "away" and i reopen it. after that everything works

i have also try with the sql server auto close to false but with no success.

what could that be ?



greetings

View 3 Replies View Related

Suspend Constraints For A Query

Feb 12, 2008

I am wondering if there is any statement which I can write at the start of my script that causes some referencial integrity problem so that foriegn keys dont regulate my script and foriegn keys allow it to run.



Any help will be greatly appreciated.

Fahad

View 1 Replies View Related

Stored Procedure Status Suspend

May 23, 2007

Hello,
 A call to a stored procedure via the SQLCommand.ExecuteReader() is made. When the stored procedure goes into suspend state the ExecuteReader() call returns. The stored procedure is not yet finished, after the suspend state it goes into the runnable state and performs some calculations.
Is it possible to set a configuration that the ExecuteReader doesn't return when the stored procedure goes into suspend, or must an other method be used?
 Tx

View 2 Replies View Related

Suspend When *.ldf Was Lost ,I Can Repair This Data

Jan 6, 2004

a sql server database always contains two file.*.ldf *.mdf
When *.ldf was deleted the database may suspend.we can repair such database through about 20 steps.

if you want repair your database .please contact me with email:cn9526@163.net or msn/email :paulyang8848@hotmail.com

you can also see our homepage http://www.haou.net/sqlother/

the service price is begin at 200 US DOLLOR.

View 3 Replies View Related

Queries Going To Suspend State With Wait Type ASYNC_NETWORK_IO

Mar 28, 2007

Recently we observed a problem. We are running stored procedure through our c# code. Three machines access the server and update or insert in the required tables in the server. If there is no data in the server, on installing first time our application usually our database is clean. then stored procedure works fine, it takes around 10 to 15 sec to execute. Next time if execute the time goes up to minutes like 15 mins. Next time it goes for hours around 4 hrs. Even to update 4 or 5 records it takes time. Initially we thought it was because of the size of the data and we tried to re tune on indexes, it did not solve. But now what we observe is even with less number of records in server also it wouldn't come of the execution for hours.
Now are executing the just the SP in the SQL manager studio to see the time. That one also is executing for hours. when looked at the activity monitor the process goes to suspend state with wait type ASYNC_NETWORK_IO.

When we comment one of the query is working fine.
Is this something to do with the query I am not sure. If that is the case it should not work every time.

The query makes any sence or is there any way to write it in better way



'UPDATE [server].[dbo].[DocumentMetadata] SET DocumentInfoID = b.DocumentInfoID, [Name] = b.[Name], MetadataType = b.MetadataType,
[Value] = b.[Value], ValueType = b.ValueType
FROM [server].[dbo].[DocumentMetadata] a WITH (UPDLOCK)
INNER JOIN (SELECT c.DocumentInfoID, c.[Name], c.MetadataType, c.[Value], c.ValueType
FROM MACHINENAME.[Client].[dbo].[DocumentMetadata] c
INNER JOIN MACHINENAME.[Client].dbo.DocumentInfo DINF ON c.DocumentInfoID = DINF.DocumentInfoID
INNER JOIN MACHINENAME.[Client].dbo.Path d on DINF.NativeFileID = d.PathID
INNER JOIN MACHINENAME.[Client].dbo.ActiveDataSource ADS ON d.DataSourceID = ADS.DataSourceID
WHERE ADS.ProjectID = ''' + @ProjID + ''') b
ON a.DocumentInfoID = b.DocumentInfoID AND a.[Name] = b.[Name]'




'INSERT INTO [server].[dbo].[DocumentMetadata]
(DocumentInfoID, [Name], MetadataType, [Value], ValueType)
SELECT c.DocumentInfoID, c.[Name], c.MetadataType, c.[Value], c.ValueType
FROM MACHINENAME.[Client].[dbo].[DocumentMetadata] c
INNER JOIN MACHINENAME.[Client].dbo.DocumentInfo DINF ON c.DocumentInfoID = DINF.DocumentInfoID
INNER JOIN MACHINENAME.[Client].dbo.Path d on DINF.NativeFileID = d.PathID
INNER JOIN MYCLI.[Client].dbo.ActiveDataSource ADS ON d.DataSourceID = ADS.DataSourceID
WHERE ADS.ProjectID = ''' + @ProjID + '''
AND Ltrim(rtrim(c.DocumentInfoID))+ ltrim(rtrim(c.[Name])) NOT IN
(SELECT Ltrim(rtrim(DocumentInfoID))+ ltrim(rtrim([Name])) FROM [server].[dbo].[DocumentMetadata])'



We have been fighting it out for so many days.
Can anybody help

Thanks
knvdssr

View 5 Replies View Related

Suspend All Transactions For A Split-Mirror Backup Strategy?

May 11, 2006

We currently use a split-mirror backup strategy for our Sybase database, which has a "quiesce database" command to suspend all transactions. By quiescing the database before splitting the mirror, we suspend all transactions to ensure we get a stable backup of the environment. It works very well for us and I'm trying to understand how we could implement this with our SQL Server 2005 DB.

(I'm aware of SQL Server mirroring and that there are other ways of possibly backing up the DB. In this post however, I'm only interested in how I would make the split-mirror strategy work if I wanted to pursue it. I'm trying to avoid paying for software that uses the VDI as it's quite costly.)

Can someone help me with how I would accomplish a split-mirror backup strategy in SQL Server 2005 (without using a vendor's software that uses the VDI)? I have to imagine there's something similar to the "quiesce database" command in SQL Server...

I appreciate the help!

View 3 Replies View Related

Error 8525: Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

May 31, 2008

Hi All

I'm getting this when executing the code below. Going from W2K/SQL2k SP4 to XP/SQL2k SP4 over a dial-up link.

If I take away the begin tran and commit it works, but of course, if one statement fails I want a rollback. I'm executing this from a Delphi app, but I get the same from Qry Analyser.

I've tried both with and without the Set XACT . . ., and also tried with Set Implicit_Transactions off.

set XACT_ABORT ON
Begin distributed Tran
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TRANSACTIONMAIN
set REPFLAG = 0 where REPFLAG = 1 and DONE = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.WBENTRY
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.FIXED
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.ALTCHARGE
set REPFLAG = 0 where REPFLAG = 1
update OPENDATASOURCE('SQLOLEDB','Data Source=10.10.10.171;User ID=*****;Password=****').TRANSFERSTN.TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
update TSADMIN.TSAUDIT
set REPFLAG = 0 where REPFLAG = 1
COMMIT TRAN


It's got me stumped, so any ideas gratefully received.Thx

View 1 Replies View Related

SSIS, Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 22, 2007

I have a design a SSIS Package for ETL Process. In my package i have to read the data from the tables and then insert into the another table of same structure.

for reading the data i have write the Dynamic TSQL based on some condition and based on that it is using 25 different function to populate the data into different 25 column. Tsql returning correct data and is working fine in Enterprise manager. But in my SSIS package it show me time out ERROR.

I have increase and decrease the time to catch the error but it is still there i have tried to set 0 for commandout Properties.

if i'm using the 0 for commandtime out then i'm getting the Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

and

Failed to open a fastload rowset for "[dbo].[P@@#$%$%%%]". Check that the object exists in the database.

Please help me it's very urgent.

View 3 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Feb 6, 2007

I am getting this error  :Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction. Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code. Exception Details:
System.Data.OleDb.OleDbException: Distributed transaction completed. Either
enlist this session in a new transaction or the NULL transaction.have anybody idea?!

View 1 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction.

Dec 22, 2006

i have a sequence container in my my sequence container i have a script task for drop the existing tables. This seq. container connected to another seq. container. all these are in for each loop container when i run the package it's work fine for 1st looop but it gives me error for second execution.

Message is like this:

Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.

View 8 Replies View Related

Distributed Transaction Completed. Either Enlist This Session In A New Transaction Or The NULL Transaction. (HELP)

Jan 8, 2008

Hi,

i am getting this error "Distributed transaction completed. Either enlist this session in a new transaction or the NULL transaction.".

my transations have been done using LINKED SERVER. when i manually call the store procedure from Server 1 it works but when i call it through Service broker it dosen't work and gives me this error.



Thanks in advance.


View 2 Replies View Related

How To Call A Sub SP In A Main SP?

May 2, 2008

View 4 Replies View Related

Aspnetdb To Main Database?

Jan 6, 2008

When I created my website in Visual Studio 2008, I ended up with two databases.  The one I created (Speedway.mdf), then VS2008 added a new one (aspnetdb) when I added membership data (roles, users..etc).  Since the host I'm using charges for each database, I just want to move all my membership information into Speedway.mdf.  I exported the tables from aspnetdb.mdf to Speedway.mdf, but now I don't know how to tell the site to look at Speedway.mdf to find the membership info?

View 6 Replies View Related

SQL Server To Main Frame

Jun 23, 2004

I'm trying to send data from a table on SQL server to a DB2 table on the Main Frame and I get this error. Any ideas?

[IBM][CLI Driver][DB2]SQL0904N Unsuccessful execution caused by an unavailable resource. Reason code: "UPDATABLE WORKFILE", type of resource: "100", and resource name: "TEMP DATABASE". SQLSTATE=57011

View 4 Replies View Related

Generating Seq No With In A Main Column

Jul 20, 2005

Hi all,please see if some one can suggest a better approach for this.i need to move 5 million rows from one table to another.LoanID is the only clumn in Source tableSource table structure=========-->==============================loanID1122234=====================================target or detination table should look like this=========================================loanID Sqeuence_number_with_in_LoanID1 11 22 12 22 33 14 1=========================================this is what i have tried so far1)there are about 4 & 1/2 million out of 5 million which will appearonly once (this is one tine load) in source table.so if i do this-----------sleect loanIDfrom SourceTablegroup by loanIDhaving count(*)=1and then i will hard code Sqeuence_number_with_in_LoanID to 1 .becausei know they will only come once.this is set based operation so this isfast.2)now,problem is with remainder of the 1/2 million rows.i had to use cursor for this which is very-very slow.other option i was thinking of is to pull it in the front end(.net)and do it there.i am hoping that will be faster.Database i am working on is sql server 2000.if some could suggest me some better approach of handling thisremainder1/2 milion rows.thanks in advance-sidd

View 4 Replies View Related

I Need To Put My Main Page On IE When Some One Request For It.

Jul 3, 2007

Hi

Can anybody tell me that how can i configure the things that will show my main report page when i enter Url like http://localhost/ReportServer. It gives directory struction first & then we have to select particular report



Rajnish

View 1 Replies View Related

Main Differences B/t MSSQL And MySQL

Feb 23, 2005

Hi,

I'm on a team that is developing a site in PHP / MySQL. We've been asked by the client to convert the database over to MSSQL. I've never used MSSQL, but after looking at the syntax available on php.net, there really isn't all that much difference in doing basic queries. I was wondering if any of you MSSQL gurus knew of some major differences between MySQL and MSSQL that I may be overlooking.

Anything, however basic or complex, would be helpful.

Thanks in advance,

Taylor

View 3 Replies View Related

Deploying A Report To The Main Server

Oct 5, 2007



I have created several reports using SSRS which is installed in my local machine. But source data base is in the main server. Data source connection works properly. Report manager is also configured to local machine.

Now I tried to deploy these reports to main server. So I changed the target URL to http://mainservername/reportsserver in the internal report property change box. But it was not succeeded. I get a error message like this.



------ Build started: Project: Partner Reports -Internal, Configuration: Production ------

Build complete -- 0 errors, 0 warnings

------ Deploy started: Project: Partner Reports -Internal, Configuration: Production ------

Deploying to http://derby/ReportServer

Error rsRPCError : The report server cannot decrypt the symmetric key used to access sensitive or encrypted data in a report server database. You must either restore a backup key or delete all encrypted content. Check the documentation for more information. (rsReportServerDisabled)

Deploy complete -- 1 errors, 0 warnings

========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========

========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========


Reporting services was already installed in main server. Do I have to change settings of report configuration manager in my local machine?

View 4 Replies View Related

Display Subreports With In A Main Report

Apr 12, 2007

Hello All,



I have 4 subreports that I need to display in the main report. I can pull a sub-report with in the main report howevere the subreport doesn't display any data. It just gives me a blank template like:



Customer name Customer # Address 1 Address2 city



The subreport itself is not empty when I open it otherwise it shows me a list of all the customers however, no data when I call it as a part of main report.



Can anyone suggest me on this one?

Thanks,

Rashi

View 6 Replies View Related

Subreport On Each Grouping In Main Table

Feb 25, 2008

I have constructed my main report using the table item from the toolbox. In maintable I have two groupings.

In the maintable I have grouping2 set for a page break after each grouping.

I have set the subreport parameter to the field value of the maintable grouping2.

I want to display the contents of the subreport after grouping1 of the maintable on the same page.

I have achieved a result by placing the subreport in maintable_group2 footer. However when I save it as an excel sheet it says "Subreports within table/matrix cells are ignored".

I really don't like how the report displays like this in the report server however I will need to export this report to excel.

Have I explained my issue well enough?

View 6 Replies View Related

What Is The Main Benefit Of Stored Procedures?

Jul 5, 2006

Hi, all here, I am having a question about stored procedures for data mining. What are the main benefits of stored procedures for data mining? (what stored procedures can do for data mining on sql server 2005? when they are useful for data mining?).

Could please any expert here give me any guidance for that? Thanks a lot in advance.

With best regards,

Yours sincerely,

View 3 Replies View Related

How To Write A Sub SP And Get The Values Retruned By It In A Main SP

May 2, 2008



Hi,

I need to write two sub sps in a main SP and get the results returned by these SPs in the main SP

Can anyone tell me how to do this?

thanks in advance.

View 14 Replies View Related

Data Migration From MAIN FRAMES To SQL Server 200

Oct 19, 2001

What are the tools available in MS SQL Server 2000 migrate data from Main Frames. Can we do with DTS if so are drivers available to connect to sql servers.

Can you let me the technies and tools available ?

Thanks in Advance

View 2 Replies View Related

Main And Detail Table Amount Calculations

Oct 31, 2006

Hi all,

I have a 2 main tables in my system. One is main table has ticket information location and so on. And detail table which hold all actions on that record with multiple money fields (its around 5 fields). it goes trough some crazy calculations on the detail table and get 5 results for each ticket. And this calculation is done everytime the ticket is looked at.
There is around 10 detail records per 1 main record. and the main table is around 7 mil. records

Now i got 2 options. I can create a trigger that does the calculation and update the main table show the results from there. This is going to affect all updates deletes and inserts.

OR

I can leave as it is so only when they view the ticket it does the calculation. Dont ask me how often they view it i dont have a clue.( if there is any suggestion how to get the count i could try to do it. )
:confused:
Suggestions

(My attitude is going towards the trigger way but 100 percent sure)

View 4 Replies View Related

DTS Execute On Main Package Thread Issue

Jan 28, 2004

here is the error i get:

Microsoft Data Transformation Services (DTS) Package
0
(1:Replicate D318_DOCKET) SubStep 'DTSStep_DTSDataPumpTask_2' failed with the following error:
Provider generated code execution exception: EXCEPTION_ACCESS_VIOLATION

the package runs fine by itself from within Enterprise Manager but when i try to run the package from a Visual Basic project, i get this error. i tried to be careful to make sure i checked the "execute on main package thread" checkbox but it didnt make a difference...

has anyone seen this?

View 2 Replies View Related

Carrying Values From A Subreport To A Main Report

Mar 22, 2007

How can I carry a value over from a subreport to a main report?

If I have a total in a sub report, I want to use that total in expression on the main report.

Any ideas?

View 4 Replies View Related

Compare Values Within Subreport To Main Report

Oct 10, 2006

I was wondering if anyone knew how to take a value from a subreport and
compare it to a value iwthin the main report. We are trying to see if
the value in the subreport is greater than the value returned in the
main report. We want to make the value test red if it is greater than.
I know how to compare these values if they were in the same report, but
when it comes to subreports I am lost. Any ideas? Thanks in advance.

View 4 Replies View Related

Question About Sub Queries In A Main Query When Grouping

May 22, 2008

I have a query that gets a supplier, a month, a year, status and sum of recpits.
returning the following. but my problem is I also need a col of totals. i tried to put a sub grouped query
in the select statement but keep getting an error
Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.


AR162600 ARROW ELECTRONICS 10424 Early 1 2008 2007-12-31 23:59:59.997
AR162600 ARROW ELECTRONICS 516 Late 1 2008 2007-12-31 23:59:59.997
AR162600 ARROW ELECTRONICS 279603 On-Time 1 2008 2007-12-31 23:59:59.997

my qurey is below. how can I get another col called total it will be the same value on each row.

AR162600 ARROW ELECTRONICS 10424 290543 Early 1 2008 2007-12-31 23:59:59.997
AR162600 ARROW ELECTRONICS 516 290543 Late 1 2008 2007-12-31 23:59:59.997
AR162600 ARROW ELECTRONICS 279603 290543 On-Time 1 2008 2007-12-31 23:59:59.997



SELECT ot_ven_num, ot_ven_name, sum(ot_rec_qty) as ot_rec_qty,
ot_rec_stat, datepart(Month,ot_rec_dt) as mth,
datepart(year,ot_rec_dt) as ryear,
DATEADD(ms, - 3, DATEADD(mm, DATEDIFF(mm, 0, ot_rec_dt), 0)) as ot_rpt_date,
(SELECT ot_ven_num, ot_ven_name, sum(ot_rec_qty) as ot_rec_qty, 'Totals' as ot_rec_stat,
datepart(Month,ot_rec_dt) as mth,
datepart(year,ot_rec_dt) as ryear,
DATEADD(ms, - 3, DATEADD(mm, DATEDIFF(mm, 0, ot_rec_dt), 0)) as ot_rpt_date
FROM supplierOT where ot_ven_name = 'ARROW ELECTRONICS' and datepart(year,ot_rec_dt) > 2007
group by ot_ven_num, ot_ven_name, DATEADD(ms, - 3, DATEADD(mm, DATEDIFF(mm, 0, ot_rec_dt), 0)),
datepart(Month,ot_rec_dt),
datepart(year,ot_rec_dt)) as total

FROM supplierOT where ot_ven_name = 'ARROW ELECTRONICS' and datepart(year,ot_rec_dt) > 2007
group by ot_ven_num, ot_ven_name, ot_rec_stat, DATEADD(ms, - 3, DATEADD(mm, DATEDIFF(mm, 0, ot_rec_dt), 0)),
datepart(Month,ot_rec_dt),
datepart(year,ot_rec_dt)

View 9 Replies View Related

Refering To An Item In Main Report From Subreport

Apr 1, 2008

Hi All,

I have 2 reports where 1 is a subreport and the other one is a main report.
Can i change or refer to a control(item) in the main report depending on the value of an item in the subreport, when the subreport is being run?

Any comments are appreciated.


Thanks in advance.
payal

View 2 Replies View Related







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