Showing posts with label parallel. Show all posts
Showing posts with label parallel. Show all posts

Thursday, March 22, 2012

Errr VSS service

Problem NTBACKUP and Job SQL is in parallel carried out
Sqllib error: Database TRADE is not simple.Nac,
Please provide more information. What problem are you having, give exact
error messages. What SQL Job? What does it do? What backup program are
you using, etc.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Nac wrote:
> Problem NTBACKUP and Job SQL is in parallel carried out
> Sqllib error: Database TRADE is not simple.|||At 01.00 AM preservation of documents under the schedule by utility NTBACKUP
utility (the standard utility in windows server 2003) is carried out. Thus
the mistake is given out:
Sqllib error: Database PRODTRADE is not simple.
Preservation of database SQL was in 11.00PM on the same server under the sch
edule (carries out SQL server agent).

Errr VSS service

Problem NTBACKUP and Job SQL is in parallel carried out
Sqllib error: Database TRADE is not simple.
Nac,
Please provide more information. What problem are you having, give exact
error messages. What SQL Job? What does it do? What backup program are
you using, etc.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Nac wrote:
> Problem NTBACKUP and Job SQL is in parallel carried out
> Sqllib error: Database TRADE is not simple.
|||At 01.00 AM preservation of documents under the schedule by utility NTBACKUP utility (the standard utility in windows server 2003) is carried out. Thus the mistake is given out:
Sqllib error: Database PRODTRADE is not simple.
Preservation of database SQL was in 11.00PM on the same server under the schedule (carries out SQL server agent).
sql

Errr VSS service

Problem NTBACKUP and Job SQL is in parallel carried out
Sqllib error: Database TRADE is not simple.Nac,
Please provide more information. What problem are you having, give exact
error messages. What SQL Job? What does it do? What backup program are
you using, etc.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Nac wrote:
> Problem NTBACKUP and Job SQL is in parallel carried out
> Sqllib error: Database TRADE is not simple.|||At 01.00 AM preservation of documents under the schedule by utility NTBACKUP utility (the standard utility in windows server 2003) is carried out. Thus the mistake is given out
Sqllib error: Database PRODTRADE is not simple.
Preservation of database SQL was in 11.00PM on the same server under the schedule (carries out SQL server agent).

Sunday, February 26, 2012

Error:SqlConnection does not support parallel transactions"

This is my code in vb.net with Sql transaction
I am using insertcommand and update command for executing the sqlquery
in consecutive transactions as follows.
How can I achive parallel transactions in sql
------start of code-------
try
bID = Convert.ToInt32(Session("batchID"))
strSQL = ""
strSQL = "Insert into sessiondelayed (batchid,ActualEndDate) values (" & bID & ",'" & Format(d1, "MM/dd/yyyy") & "')"

sqlCon = New System.Data.SqlClient.SqlConnection(ConfigurationSettings.AppSettings("conString"))


Dim s1 As String = sqlCon.ConnectionString.ToString
sqlDaEndDate = New System.Data.SqlClient.SqlDataAdapter("Select * from sessiondelayed", sqlCon)
dsEndDate = New DataSet
sqlDaEndDate.Fill(dsEndDate)

dbcommandBuilder = New SqlClient.SqlCommandBuilder(sqlDaEndDate)

'sqlCon.BeginTransaction()
'sqlDaEndDate.InsertCommand.Transaction = tr
If sqlCon.State = ConnectionState.Closed Then
sqlCon.Open()
End If
sqlDaEndDate.InsertCommand = sqlCon.CreateCommand()
tr = sqlCon.BeginTransaction(IsolationLevel.ReadCommitted)
sqlDaEndDate.InsertCommand.Connection = sqlCon
sqlDaEndDate.InsertCommand.Transaction = tr
sqlDaEndDate.InsertCommand.CommandText = strSQL
sqlDaEndDate.InsertCommand.CommandType = CommandType.Text


sqlDaEndDate.InsertCommand.ExecuteNonQuery()
tr.Commit()
sqlDaEndDate.Update(dsEndDate)
sqlCon.Close()
End If
Catch es As Exception


Dim s2 As String = es.Message
If sqlCon.State = ConnectionState.Closed Then
sqlCon.Open()
End If
strSQL = " update SessionDelayed set ActualEndDate= '" & Format(d1, "MM/dd/yyyy") & "' where batchid=" & bID & ""
sqlDaEndDate.UpdateCommand = sqlCon.CreateCommand()
tr1 = sqlCon.BeginTransaction(IsolationLevel.ReadCommitted)
sqlDaEndDate.UpdateCommand.Connection = sqlCon
sqlDaEndDate.UpdateCommand.Transaction = tr1
sqlDaEndDate.UpdateCommand.CommandText = strSQL
sqlDaEndDate.UpdateCommand.CommandType = CommandType.Text
sqlDaEndDate.UpdateCommand.ExecuteNonQuery()
tr1.Commit()
sqlDaEndDate.Update(dsEndDate)
sqlCon.Close()

End Try

'----End------

You can't since connection is basically tied to a transaction and there can be one at a time.

You either:
- use the same connection and share the same transaction
- use separate connections and therefore separate transactions

If you use v2.0 TransactionScope class might help your task.