I used veritas to backup MsSQL 2000 database server but I often encounter backup fail error due to the deadlock in the database. May I know how to reduce this problem?
I heard there is a method to control the database deadlock timeout. If we set a lock timeoutvalue, will it reduce the chance of deadlock to happen? Is there any disadvantage of doing that?
If I were not wrong , we can set the lock_timeout value using the syntax "SET LOCK_TIMEOUT milliseconds" Is that true? But Do we have to have to run this command for every database? What is the normal milliseconds value?
I'm having deadlock problems with SQL Server 2000. I'm a .NET developer, and I'm far away of being a DBA, so I frequently have problems with bad database design and queries (I'm gonna have to work these skills...)
Maybe it's a silly problem, but here it is:
I have an application that inserts data from files into the database (these files contain some web page hits). This application is multi-threaded, i.e., I can have fifteen threads at the same time trying to insert the data into the database.
My table is looks like this:
year (smallint) month (tinyint) day (tinyint) field1 (varchar - 10) field2 (tinyint) hits (int)
My application was working well until I start to use the .NET TransactionScope. In my application I create a transaction, and then I go through the file and for each line I call a procedure.
The procedure has the job of verify if there's already a record for that "page", and if it has, update the "hits" field. If not, insert a new row.
I don't know what to do about it. Maybe it's all about reestructuring the procedure, the table, the indices, but I really don't know what to do.
The table has only three indices: one for field1, another for field2 and another for the fields year and month...
Any help will be very appreciated. Thanks in advance.
I am having deadlock problem when I have a lot of visitors on my ASP.NET website at the same time. I am using NetTiers templates to generate C# classes for accessing DB layer and problem is in my custom Store Procedure.
I have Article table and ArticleLanguage table. One record from Article (Id, Position, StatusId) table is the same for all languages and in ArticleLanguage (Id, LanguageId, ArticleId, Name) table I have only article names for every language. I then physically created ArticleListing "ghost" table that have all fields from these two tables and this listing table is used for displaying articles in grid and this table is filled with my custom Store Procedure. It must not be created in memory (temporary table) because NetTiers must generate Entity for it (I got TList collection). And there I have a SQL problem, because in my Store Procedure first command is DELETE FROM ArticleListing (I also tried this trick with GUID, it didn't help me much - you will see in script bellow) and then I do INSERT FROM Article INTO ArticleListing... and then UPDATE ArticleListing FROM ArticleLanguage... When there is a lot of users they call this store procedure and deadLocks occured very often - I suppose because of deleting and inserting into this "ghost" table... I am sending you a scripts in order to know exactly what I am doing and please help me with advice is it possible to change Store Procedure to avoid deadlock?
Code:
CREATE TABLE dbo.Article( Id int IDENTITY(1,1) NOT NULL, Position int NULL, StatusId int NULL CONSTRAINT PK_Article PRIMARY KEY CLUSTERED ( Id ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON PRIMARY ) ON PRIMARY
CREATE TABLE dbo.ArticleLanguage( Id int IDENTITY(1,1) NOT NULL, LanguageId int NULL, ArticleId int NULL, Name varchar(100) NULL CONSTRAINT PK_ArticleLanguage PRIMARY KEY CLUSTERED ( Id ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON PRIMARY ) ON PRIMARY GO SET ANSI_PADDING OFF GO ALTER TABLE dbo.ArticleLanguage WITH CHECK ADD CONSTRAINT FK_ArticleLanguage_Article FOREIGN KEY(ArticleId) REFERENCES dbo.Article (Id) GO ALTER TABLE dbo.ArticleLanguage CHECK CONSTRAINT FK_ArticleLanguage_Article
CREATE TABLE dbo.ArticleListing( Id int IDENTITY(1,1) NOT NULL, TransactionGuid varchar(40) NULL, TransactionDate datetime NULL CONSTRAINT DF_ArticleListing_TransactionDate DEFAULT (getdate()), LanguageId int NULL, ArticleId int NULL, ArticleLanguageId int NULL, Name varchar(100) NULL, Position int NULL, StatusId int NULL CONSTRAINT PK_ArticleListing PRIMARY KEY CLUSTERED ( Id ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON PRIMARY ) ON PRIMARY
GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Description: Returns Article and ArticleLanguage listing in one table -- ============================================= CREATE PROCEDURE dbo._ArticleListing_GetListing ( @LanguageId int, @ArticleId int = null, @StatusId int = null ) AS BEGIN
--Delete old records DELETE FROM ArticleListing WHERE TransactionDate < DATEADD(minute, -2, GETDATE())
--Create new GUID for this transaction DECLARE @TransactionGuid varchar(40) SET @TransactionGuid = NEWID()
--Insert from Article INSERT INTO ArticleListing ( TransactionGuid, ArticleId, Position, StatusId ) SELECT @TransactionGuid, Id, Position, StatusId FROM Article WHERE (@ArticleId IS NULL OR Id = @ArticleId) AND (@StatusId IS NULL OR StatusId = @StatusId)
--Update from ArticleLanguage UPDATE ArticleListing SET ArticleListing.LanguageId = ArticleLanguage.LanguageId, ArticleListing.ArticleLanguageId = ArticleLanguage.Id, ArticleListing.Name = ArticleLanguage.Name FROM ArticleLanguage LEFT JOIN ArticleListing ON ArticleListing.ArticleId = ArticleLanguage.ArticleId WHERE TransactionGuid = @TransactionGuid AND ArticleListing.ArticleId = ArticleLanguage.ArticleId AND ArticleLanguage.LanguageId = @LanguageId AND (@ArticleLanguageId IS NULL OR ArticleLanguage.Id = @ArticleLanguageId)
--Delete not valid records DELETE FROM ArticleListing WHERE TransactionGuid = @TransactionGuid AND (LanguageId IS NULL OR ArticleLanguageId IS NULL)
SELECT Id, TransactionGuid, TransactionDate, LanguageId, ArticleId, ArticleLanguageId, Name, Position, StatusId FROM ArticleListing WHERE TransactionGuid = @TransactionGuid ORDER BY Position END
and exception...
Code:
Message: Transaction (Process ID 166) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
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.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteReader(DbCommand command, CommandBehavior cmdBehavior) at Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteReader(DbCommand command) at MyProject.Data.Utility.ExecuteReader(Database database, DbCommand dbCommand) at MyProject.Data.SqlClient.SqlArticleListingProviderBase.GetListing(TransactionManager transactionManager, Int32 start, Int32 pageLength, Nullable`1 languageId, Nullable`1 articleId, Nullable`1 statusId) at MyProject.Data.Bases.ArticleListingProviderBaseCore.GetListing(Nullable`1 languageId, Nullable`1 articleId, Nullable`1 statusId) at UserControls_ArticleGrid.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
heres my code behind in UploadImage.aspx.vb _____________________________________________________________________________________________________________________________Imports System.Data.SqlClientImports System.ConfigurationImports System.IOPartial Class UploadImage Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn As New SqlConnection Dim comm As New SqlCommand Dim connStr As String connStr = ConfigurationManager.ConnectionStrings("TESDA").ConnectionString conn = New SqlConnection(connStr) comm = New SqlCommand("Insert into TImage (CategoryName,Picture,MimeType) VALUES (@name,@pic,@type)", conn) 'gi convert and image to byte array Dim data(FileUpload1.PostedFile.ContentLength - 1) As Byte FileUpload1.PostedFile.InputStream.Read(data, 0, FileUpload1.PostedFile.ContentLength) comm.Parameters.Add("name", System.Data.SqlDbType.Text) comm.Parameters("name").Value = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName).ToLower comm.Parameters.Add("pic", System.Data.SqlDbType.Image) comm.Parameters("pic").Value = data comm.Parameters.Add("type", System.Data.SqlDbType.NChar) comm.Parameters("type").Value = FileUpload1.PostedFile.ContentType If FileUpload1.HasFile = True Then Try conn.Open() comm.ExecuteScalar() Label1.Text = "Successfully uploaded" conn.Close() Finally End Try End If End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Server.Transfer("image.aspx") End SubEnd Class______________________________________________________________________________________________________________________________then here my code behind in Image.aspx.vb________________________________________________________________________________________________________Imports System.Data.SqlClientImports System.ConfigurationPartial Class image Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim conn As New SqlConnection Dim comm As New SqlCommand Dim connStr As String Dim reader As SqlDataReader Dim dataBuffer() As Byte connStr = ConfigurationManager.ConnectionStrings("TESDA").ConnectionString conn = New SqlConnection(connStr) comm = New SqlCommand("Select * from TImage where no = @no", conn) comm.Parameters.Add("no", System.Data.SqlDbType.Int) comm.Parameters("no").Value = 5 conn.Open() reader = comm.ExecuteReader reader.Read() Response.Clear() Response.AddHeader("Content-type", reader("CategoryName")) Response.AddHeader("Content-type", reader("MimeType")) Dim blen As Integer = CType(reader("picture"), Byte()).Length dataBuffer = reader("Picture") Response.OutputStream.Write(dataBuffer, 0, blen) Response.Close() conn.Close() End SubEnd Class_____________________________________________________________________________________________________________________ When I am going to call the Image.aspx it always prompt this error:XML Parsing Error: no element foundLocation: http://localhost:4730/tesdaweb/UploadImage.aspxLine Number 1, Column 1:Is there something wrong in my codes... Please helpthanks...
Error converting data type varchar to numeric. All the TotAct are varchars in my data base.. and i want to convert it to Decimal so that i add or subract things in the reprot... I tried doing
Cast(TotAct1 as decimal(19,4)) but it doesnt let me do it ,
Code Block Insert into @tbl SELECT pf.ParticipantId, pf.PortfolioId, PortfolioName, pf.FundId LoanFundId, CASE When FundName Is Null Then ShortName ELSE FundName END as FundNames, Act1 as Name1, a.Description as NDesc1, TotAct1, Act2 as Name2, b.Description as NDesc2, TotAct2, Act3 as Name3, c.Description as NDesc3, TotAct3, Act4 as Name4, d.Description as NDesc4, TotAct4, Act5 as Name5, e.Description as NDesc5, TotAct5, Act6 as Name6, fi.Description as NDesc6, TotAct6, Act7 as Name7, g.Description as NDesc7, TotAct7, Act8 as Name8, h.Description as NDesc8, TotAct8, Act9 as Name9, i.Description as NDesc9, TotAct9, Act10 as Name10, j.Description as NDesc10, TotAct10, Act11 as Name11, k.Description as NDesc11, TotAct11, Act12 as Name12, l.Description as NDesc12, TotAct12, Act13 as Name13, m.Description as NDesc13, TotAct13, Act14 as Name14, n.Description as NDesc14, TotAct14, Act15 as Name15, o.Description as NDesc15, TotAct15, Act16 as Name16, p1.Description as NDesc16, TotAct16, Act17 as Name17, q.Description as NDesc17, TotAct17, Act18 as Name18, r.Description as NDesc18, TotAct18, Act19 as Name19, s.Description as NDesc19, TotAct19, Act20 as Name20, t.Description as NDesc20, TotAct20
FROM
ParticipantPlanFundBalances1 pf Left Outer JOIN Fund f On f.FundId = pf.FundId LEFT Join PlanPortfolio p On pf.PortfolioId = p.PortfolioId Left outer Join AscActCodes a on pf.Act1 = a.Name left outer Join AscActCodes b on pf.Act2 = b.Name left outer Join AscActCodes c on pf.Act3 = c.Name left outer Join AscActCodes d on pf.Act4 = d.Name left outer Join AscActCodes e on pf.Act5 = e.Name left outer Join AscActCodes fi on pf.Act6 = fi.Name left outer Join AscActCodes g on pf.Act7 = g.Name left outer Join AscActCodes h on pf.Act8 = h.Name left Outer Join AscActCodes i on pf.Act9 = i.Name left Outer Join AscActCodes j on pf.Act10 = j.Name left outer Join AscActCodes k on pf.Act11 = k.Name left outer Join AscActCodes l on pf.Act12 = l.Name left outer Join AscActCodes m on pf.Act13 = m.Name left outer Join AscActCodes n on pf.Act14 = n.Name left outer Join AscActCodes o on pf.Act15 = o.Name left outer Join AscActCodes p1 on pf.Act16 = p1.Name left outer Join AscActCodes q on pf.Act17 = q.Name left outer Join AscActCodes r on pf.Act18 = r.Name left outer Join AscActCodes s on pf.Act19 = s.Name left outer Join AscActCodes t on pf.Act20 = t.Name WHERE pf.FundId <> 0 AND PeriodId = @PeriodId AND pf.PlanId = @PlanId AND ParticipantId = @ParticipantId
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 2, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 3, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 4, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 5, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 6, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 7, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 8, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 9, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 10, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 11, column 6 (ElectionPct).
Msg 4865, Level 16, State 1, Procedure usp_LoadASC, Line 138
Cannot bulk load because the maximum number of errors (10) was exceeded.
Msg 7399, Level 16, State 1, Procedure usp_LoadASC, Line 138
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Procedure usp_LoadASC, Line 138
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".
I have a stored procedure thats loads data into the sql server thru a text file...but i am getting this error since i moved it to sql server 2005 from 2000. Yest i was getting an xp_cmdshell error but when to the configuration and checked the xp_cmdshell and now i am getting this error..
I am really not sure what is the error and how should I debug it.
I Have 64bit OS installed. On That, 64bit SQL as well as 32 bit SQL server are installed. I am trying to run packages from SQL Job which lanches the SSIS Packages from 32 bit dtexec. The packages stop running Halfway without any error. That's what the log says. Same time it creates a sql error Dump.
This is the content of DUMP
Microsoft (R) Windows Debugger Version 6.8.0004.0 X86Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [C:Documents and SettingsXXXDesktopSQLDmpr0093.mdmp]User Mini Dump File: Only registers, stack and portions of memory are availableSymbol search path is: *** Invalid ******************************************************************************** Symbol loading may be unreliable without a symbol search path. ** Use .symfix to have the debugger choose a symbol path. ** After setting your symbol path, use .reload to refresh symbol locations. *****************************************************************************Executable search path is: Windows Server 2003 Version 3790 (Service Pack 1) MP (8 procs) Free x86 compatibleProduct: Server, suite: Enterprise TerminalServer SingleUserTSDebug session time: Mon Dec 17 12:00:34.000 2007 (GMT+6)System Uptime: not availableProcess Uptime: 0 days 0:00:10.000...........................................................................................................................................Loading unloaded module list...This dump file has an exception of interest stored in it.The stored exception information can be accessed via .ecxr.(44ec.774): Access violation - code c0000005 (first/second chance not available)eax=00000000 ebx=7d560760 ecx=0908dfb8 edx=0908eec0 esi=00000338 edi=00000000eip=7d61c824 esp=09fbef3c ebp=09fbefa8 iopl=0 nv up ei pl nz na po nccs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202Unable to load image C:WINDOWSsystem32tdll.dll, Win32 error 0n2*** WARNING: Unable to verify timestamp for ntdll.dll*** ERROR: Module load completed but symbols could not be loaded for ntdll.dllntdll+0x1c824:7d61c824 c20c00 ret 0Ch
Few days back these packages were running fine with same configuration. Not sure what happend suddenly and every thing stopped working.
I am using SQL DMO SQLSnapshot to create a snapshot of merge replication. While creating the snapshot, an error is thrown which says "Invalid column name 'origin_datasource_id'.
The source table on which that error is thrown has all required columns + 'rowguid' added by merge publication.
i was created one local variable I with string =null in the collection i was selected the FOLDER (images_ForEach) int the Fiels Columns i was choosen (*.gif)
i was created the table(TEMPS)
SN varchar(10) Unchecked SNAME varchar(250) Checked
IN that for each loop i was placed the sql Task controle with the fallowing expression Working Fine
"INSERT INTO TEMPS ( SN,SNAME ) Values ('" + replace(right(@[User::I], 10), ".gif", "") + "','" + @[User::I]+"')"
for example in temp table RCOUNT COLUMN exist like SN varchar(10) Unchecked SNAME varchar(250) Checked
RCOUNT NUMERIC(9)
1) is it require to take the local variable with count init32 then what to do how to increment the values i tried in Variable mapping it THROWS an Error so please rectify the dought
I am working with c# windowsa application. i want to connect to the .sdf file in button click event.I am writing this code
string str= "D:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\Northwind.sdf"; SqlCeConnection cn = new SqlCeConnection(str); cn.Open(); it is not working. I am getting this error
Unable to load DLL 'sqlceme30.dll': The specified module could not be found.
i am executing Sql task with a stored proceedure to get values from Database. Which gets the value correctly. The variable value i am trying to set in the connection string through the Expression.
there are around 22 Variables i am setting to the connection string of the DTSX files.
Error: 0xC001401E at DoArchive, Connection manager "ArchiveTicketException.dtsx": The file name "D:TAHOEAPPSSSISPackagesIntegration Services PackagesArchiveTicketException.dtsx " specified in the connection was not valid.
Error: 0xC0017004 at DoArchive: The result of the expression "@[User::TicketExceptionConnSt]" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
Error: 0xC00220DE at ArchiveTicketException: Error 0x80070003 while loading package file "". The system cannot find the path specified.
task failed: ArchiveTicketException.
i saw this error in http://msdn2.microsoft.com/en-us/library/ms345164(d=robot).aspx
0xC0017003
-1073647613
DTS_E_PROPERTYEXPRESSIONEVAL
The expression "__" on property "__" cannot be evaluated. Modify the expression to be valid.
I have report server in SharePoint integrated mode and the Reporting services runnign under domain account. which is part of dmain adming group as well.but when i try to connect to http:\localhost eportserver
it gives me this error: Reporting Services Error
Report Server has encountered a SharePoint error. (rsSharePointError) Get Online Help
User cannot be found.
SQL Server Reporting Services
and in reporting service log it gives me following information w3wp!webserver!1!8/15/2007-13:40:01:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error. ---> Microsoft.SharePoint.SPException: User cannot be found. at Microsoft.SharePoint.SPUserCollection.GetByID(Int32 id) at Microsoft.SharePoint.SPWeb.get_Author() at Microsoft.ReportingServices.SharePoint.Server.Utility.GetSPWebProperties(SPWeb web) at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.internalFindObjectsNonRecursive(String wssUrl, CatalogItemList& children) at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.FindObjectsNonRecursive(String wssUrl, CatalogItemList& childList, Security secMgr, IPathTranslator pathTranslator, Boolean appendMyReports) --- End of inner exception stack trace --- at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.FindObjectsNonRecursive(String wssUrl, CatalogItemList& childList, Security secMgr, IPathTranslator pathTranslator, Boolean appendMyReports) at Microsoft.ReportingServices.Library.ListChildrenAction.PerformActionNow() at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute() at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderFolder() at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType) at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent() at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
Hi i am trying to implement Multivalue parameter in my report....
So for the Parameter PlanId i have selected multivalue parameter... and the avialable values are from a query...
when i run the report and just check 1 Plan it works fine.. but when i go to check more than one plan.. I get this error
An error has occured duing local report processing. an error has occured during report processing. Query exceution failed for data set Statement. Error converting data type nvarchar to int.
Warning: 0x80019002 at ODS2DMPackage: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (13) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Sorry i am posting this again cos my problem is not fixed yet and i set the last reply as answer i don't know if i need to post it again.
i am executing Sql task with a stored proceedure to get values from Database. Which gets the value correctly. The variable value i am trying to set in the connection string through the Expression.
there are around 22 Variables i am setting to the connection string of the DTSX files.
Error: 0xC001401E at DoArchive, Connection manager "ArchiveTicketException.dtsx": The file name "D:TAHOEAPPSSSISPackagesIntegration Services PackagesArchiveTicketException.dtsx " specified in the connection was not valid.
Error: 0xC0017004 at DoArchive: The result of the expression "@[User::TicketExceptionConnSt]" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
Error: 0xC00220DE at ArchiveTicketException: Error 0x80070003 while loading package file "". The system cannot find the path specified.
task failed: ArchiveTicketException.
i saw this error in http://msdn2.microsoft.com/en-us/library/ms345164(d=robot).aspx
0xC0017003
-1073647613
DTS_E_PROPERTYEXPRESSIONEVAL
The expression "__" on property "__" cannot be evaluated. Modify the expression to be valid.
How can i rectify this
I get the saem proble again the path and varaible value if correct
THIS IS THE ONE.TXT FILE Customer called to complain that the ice maker on her fridge has stopped working model XXYY-3 Door to refrigerator is coming off model XX-1 Ice maker is making a funny noise XXYY-3 Handle on fridge falling off model XXZ-1 Freezer is not getting cold enough XX-1 Ice maker grinding sound fredge XXYY-3 Customer asking how to get the ice maker to work model XXYY-3 Customer complaining about dent in side panel model XXZ-1 Dent in model XXZ-1 Customer wants to exchange because of dent in door model XXZ-1 Handle is wiggling model XXZ-1 Customer happy with us. Best fridge yet!
i created the table term_result(term_id varchar2(50)); ( termid ==xxyy-3 like)
now i want to find the no of times repeat the xxyy-3 posted queries
ERROR : DT_NTXT OR DT_WSTR TYPES ONLY ALLOWS HERE ERROR I AM GETTING SO
Flat File Source-----------> Data Conversion --------->Term Lookup -------->Oledb data source one.txt DT_stR I choosen error occur here
SO WHAT IS THE DATA TYPE I HAVE TO GIVE FOR THAT MATCHING LOOKUP
HI, I HAVE BEEN TRYING TO TRANSFORM AN OLD TABLE TO A NEW FORMAT AND CHANGE SOME OF THE DATATYPE FORMATS USED IN THE OLD ONE. OUT OF WHICH ONE IS A COLUMN CALLED AS FORM_RECEIVE_DATE WHICH HAS NVARCHAR(41) AS DATATYPE IN THE OLD TABLE CREATED BY A PREVIOUS DBA (DON'T KNOW wHY?)
wHILE CONVERTING IT INTO DATATYPE DATETIME , I AM GETTING THIS ERROR :- "Arithmetic overflow error converting expression to data type datetime." i DON'T KNOW WHY
hERE ARE FEW EXAMPLES OF THE DATA CONTAINED IN THE PREVIOUS TABLE :-
Is there a way to send out an email woth deadlock information (victim query, winner query, process id's and resources on which the deadlock occurred) as soon as a deadlock occurs in a database or at instance level?I currently has trace flag 1222 turned on. And also created an alert that send me an email whenever a deadlock occurs. but it just says that a deadlock occurred and I log into sql server error log and review the information.
I received the following error message when run the query,
Server: Msg 1205, Level 13, State 61, Line 1 Transaction (Process ID 61) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
I am getting quite a few deadlock errors where both sessions aretrying to execute sp_execsql according to the the trace information inthe error log (see below). The database is being asscessed by anapplication written in .NET, as well as a few people using QueryAnalyzer. This seems to be happening relative randomly - can't pin itto any specific circumstances. Any thoughts would be appreciated.RID: 8:1:617:37 CleanCnt:1 Mode: X Flags: 0x2Grant List 1::Owner:0x3738dbe0 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:55ECID:0SPID: 55 ECID: 0 Statement Type: CONDITIONAL Line #: 47Input Buf: RPC Event: sp_executesql;1Requested By:ResType:LockOwner Stype:'OR' Mode: S SPID:52 ECID:0 Ec:(0x4AC4D570)Value:0x23297b80 Cost:(0/12C)Node:2RID: 8:1:267:91 CleanCnt:1 Mode: X Flags: 0x2Grant List 0::Owner:0x3efae340 Mode: X Flg:0x0 Ref:0 Life:02000000 SPID:52ECID:0SPID: 52 ECID: 0 Statement Type: CONDITIONAL Line #: 115Input Buf: RPC Event: sp_executesql;1Requested By:ResType:LockOwner Stype:'OR' Mode: S SPID:55 ECID:0 Ec:(0x483FB570)Value:0x37c0e060 Cost:(0/138)Victim Resource Owner:ResType:LockOwner Stype:'OR' Mode: S SPID:52 ECID:0 Ec:(0x4AC4D570)Value:0x23297b80 Cost:(0/12C)
Good morning all. I need some help with a stored proc that is driving me up a wall. It's probably something stairing me right in the face but I can't see it!
I keep getting the following error on the procedure that I'm working on: SQL-DMO (ODBC SQLSTATE: 42000) ERROR 156: Incorrect syntax near keyword 'AS' Must declare the variable '@signid' Must declare the variable '@signid'
Here's the code:
CREATE PROCEDURE [dbo].[ws_savesignature2db] @xml as text='', @image as image='', @imageformat as varchar(20)='', @imagename as varchar(40)='', @imagesize as int=0, AS insert into signaturetable ([image], imageformat, imagename, imagesize) values (@image, @imageformat,@imagename,@imagesize)
/* if your XML field datatype is Text or nTEXT, use the code below in Sql Server 2000. If you use Sql Server 2005, you can use varchar(max) or nvarchar(max) which will be much easier and you do not need the code. */ select @signid = @@IDENTITY DECLARE @ptrval binary(16) SELECT @ptrval = TEXTPTR([xml]) FROM ws_signature WHERE signid= @signid if @ptrval is not null WRITETEXT ws_signature.xml @ptrval @xml GO
I have some ASP.NET C# code which executes a stored procedure in SQL Server via the SqlCommand and SqlConnection classes. One of the stored procedures that gets executed is giving the error: "Transaction (Process ID 272) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction." This only happens occassionally. Is there a way to get around this in my ASP.Net application? One thing I tried is ensuring that no 2 users entered the stored procedure concurrently:object synclock = new object() ; lock (synclock) { // execute SQL stored procedure ... } This did not solve the problem, and I'm not even sure if that is the correct implementation to ensure sequential execution of the stored procedure.
guys, I have a stored procedure which gets called by ASPX page and it inserts, updates data into different tables. originally, I had a issue that if error occured, it would not rollback all the data so i used transaction around it. now, once in a while I am getting this error "System.Data.SqlClient.SqlException: Transaction (Process ID 181) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction". I don't know how this error occurs and how do I prevent it. please help. transaction is as follow. BEGIN TRY BEGIN TRANSACTION // t-sql codes to insert update multiple tables COMMITEND TRY BEGIN CATCH if (@@TRANCOUNT > 0) --error ROLLBACK declare @errSeverity intselect @errMsg = ERROR_MESSAGE(), @errSeverity = ERROR_SEVERITY() RAISERROR(@errMsg, @errSeverity, 1) END CATCH
I have a Stored Proc that is called by a SQL Job in SQL Server 2000. This stored proc deadlocks once every couple of days. I'm looking into using the @@error and try to doing a waitfor .5 sec and try the transaction again. While looking around google I've come across a few articles stating that a deadlock inside a Stored Proc will stop all execution of the stored proc so I will not be able doing any error handling. Is this true? Does anyone have any experience that could help me out?
I know the best solution would be to resolve why I get a deadlock. We are currently looking into that but until we can resolve those issues I would like to get some type of error handling in place if possible.
I want to set an alert for a specific table whenever an event hascaused a deadlock to occur on the table.I understand how to set up an alert. But I don't know which errornumber to use for the New Alert error number property for a deadlock.Or how to specify a deadlock on a specific table.Thanks,DW
We have lately experianced a strange problem with our SQL Server 2005 x64 (SP2) that is NOT consistent but when it happens it happens on the same time.
Almost every night at 03:30 one of our databases (not all) seems to be down or locked. When i have a look at the order table in this database I can see that we have stopped recieving orders after 03:30. Two hours later (05:30) I can see the following error each minute in the error log until we reboot the server:
All schedulers on Node 0 appear deadlocked due to a large number of worker threads waiting on LCK_M_IS. Process Utilization 0%%.
As we have a maintenance job running at 03:30 it feels like this is the problem. The job performs the following tasks: "Check Database Integrity -> Rebuild Index -> Reorganize Index"
When i look at the history of the job it looks like it's not completed and only the "Check Database Integrity" task was runned. No error message here either.
Also when i look in the error log i can see that the Maintenance job is started but never ended. Worth to notice is that I get the follwoing info in the log after the start-message:
Configuration option 'user options' changed from 0 to 0. Run the RECONFIGURE statement to install.
Also, when i run this job manually daytime it works great!
Anyone having any idees on this? Is it possible to track this even more? I'm tired of restarting the server 03:30 in the morning =)
i need help to solve following error in ssis package when i aun ::
Error: 0xC0047062 at CTPKPF, DataReader Source [1]: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper90 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer90[] buffers, IntPtr ppBufferWirePacket) Error: 0xC0047038 at CTPKPF, DTS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "DataReader Source" (1) returned error code 0x80004003. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. Error: 0xC0047021 at CTPKPF, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited. Information: 0x40043008 at CTPKPF, DTS.Pipeline: Post Execute phase is beginning. Information: 0x40043009 at CTPKPF, DTS.Pipeline: Cleanup phase is beginning. Information: 0x4004300B at CTPKPF, DTS.Pipeline: "component "OLE DB Destination" (1993)" wrote 0 rows. Task failed: CTPKPF
On the SQL Server the Event Viewer shows the same messages and errors every evening between 22:05:00 and 22:08:00. The following information messages are shown for every database:
"I/O is frozen on database <database name>. No user action is required. However, if I/O is not resumed promptly, you could cancel the backup."
"I/O was resumed on database <database name>. No user action is required."
"Database backed up. Database: <database name>, creation date(time): 2003/04/08(09:13:36), pages dumped: 306, first LSN: 44:148:37, last LSN: 44:165:1, number of dump devices: 1, device information: (FILE=1, TYPE=VIRTUAL_DEVICE: {'{A79410F7-4AC5-47CE-9E9B-F91660F1072B}4'}). This is an informational message only. No user action is required."
After the 3 messages the following error message is shown for every database:
"BACKUP failed to complete the command BACKUP LOG <database name>. Check the backup application log for detailed messages."
I have added a Maintenance Plan but these jobs run after 02:00:00 at night.
Where can I find the command or setup which will backup all databases and log files at 22:00:00 in the evening?
I use the Transact-SQL BACKUP statement in Visual Basic to backup my local MSSQL Database. It give me this error
Error 3041
BACKUP failed to complete the command BACKUP DATABASE [BCFPC] to BCFPCBKP
I already created a backup device called BCFPCBKP and it is backup to the disk.
I tried to run the same BACKUP statement in SQL Query Analyzer and it worked fine. I tried to run my VB application in another PC. It worked fine when i use this command remotely. Can anyone tell me what's the problem?
Hello, I have MS SQL 2005 server with 300+ databases on it. The application is set up that way that it creates a new database as needed (dynamically). Do not ask me why - I hate this design... So, it can create 3-4 databases a day (random time). I've scheduled full backup of all databases to run once at night, and it runs just fine. Besides that, I have scheduled tran logs backup of all databases to run every hour. This backup fails from time to time with the following error:
Executing the query "BACKUP LOG [survey_p0886464_test] TO DISK = N'D:\backups\log backups\survey_p0886464_test_backup_200708072300.trn' WITH NOFORMAT, NOINIT, NAME = N'survey_p0886464_test_backup_20070807230002', SKIP, REWIND, NOUNLOAD, STATS = 10 " failed with the following error: "BACKUP LOG cannot be performed because there is no current database backup. BACKUP LOG is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
So, I think what happens is since my full backup of all databases are scheduled to run only once at night, and tran logs every hour, when new database is created during the day, there is no full backup for it, that is why tran logs backup fails. Becuase after the failure, if I run full backup again, then tran log runs just fine afterwards.
I am new to MS SQL Server, I am mostly working with Sybase IQ. Do you know if I can "trigger" full backup every time when new database created to avoid tran lof failure?
Or is it possible to schedule full backup to run if tran log backup fails? Any advice will be much appreciated.
Error: The Script returned a failure result. Task SCR REIL Data failed
OnError - Task SQL Insert Error Msg Error: A deadlock was detected while trying to lock variable "System::ErrorCode, System::ErrorDescription, System::ExecutionInstanceGUID, System::StartTime, User::FEED_ID, User::t_ProcessedFiles" for read access. A lock could not be acquired after 16 attempts and timed out. Error: The expression ""EXEC [dbo].[us_sp_Insert_STG_FEED_EVENT_LOG] @FEED_ID= " + (DT_WSTR,10) @[User::FEED_ID] + ", @FEED_EVENT_LOG_TYPE_ID = 3, @STARTED_ON = '"+(DT_WSTR,30)@[System::StartTime] +"', @ENDED_ON = NULL, @message = 'Package failed. ErrorCode: "+(DT_WSTR,10)@[System::ErrorCode]+" ErrorMsg: "+@[System::ErrorDescription]+"', @FILES_PROCESSED = '" + @[User::t_ProcessedFiles] + "', @PKG_EXECUTION_ID = '" + @[System::ExecutionInstanceGUID] + "'"" on property "SqlStatementSource" cannot be evaluated. Modify the expression to be valid.
Warning: The Execution method succeeded, but the number of errors raised (4) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
And how did I get 4 errors? - I only set my script task result to failure
Hi,I keep getting this error message for a trans.log backup.Operating system error112(error not found).The disk has about 6GB space free, and the backup should only take upabout 550 MB, so I would think it is not space related but...The disk is NTFS.Any ideas?