CXPACKET Error Related To MOM Process
May 23, 2007
While MOM processes are running at some point, a process goes into deadlock and uses up all existing CPUs.
Sysprocesses shows this it opened up 4 threads and program name is Microsoft® Reliability Analysis Service.
Profiler doesn't show which command it was trying to execute, but last notable command which has started was MRAS_pcLoad EXECUTE @i_Return_Code = sp_getapplock @Resource = N'MOM.Datawarehousing.DTSPackageGenerator.exe', @LockMode = N'Exclusive', @LockOwner = N'Session', @LockTimeout =
Can you please help us, what could be the problem. It has been running fine till couple of days back.
--Prabhu
View 5 Replies
ADVERTISEMENT
Apr 7, 2008
i'm going nuts with SQL server notification thing. I have gone throigh this artical which tells how to set user http://www.codeproject.com/KB/database/SqlDependencyPermissions.aspx. This article show how to create new user and setup for sql server notification.But In my case user was alredy existing in database. which is very common senario in most cases. So i did following( check the SQL script below) but then i get this error
"A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)"
this my sql script
use [master]Go
-- Ensuring that Service Broker is enabled ALTER DATABASE [DatabaseName] SET ENABLE_BROKERGO
-- Switching to our databaseuse [DatabaseName]GO
CREATE SCHEMA schemaname AUTHORIZATION usernameGO
ALTER USER username WITH DEFAULT_SCHEMA = schemaname GO
/* * Creating two new roles. We're not going to set the necessary permissions * on the user-accounts, but we're going to set them on these two new roles. * At the end of this script, we're simply going to make our two users * members of these roles. */EXEC sp_addrole 'sql_dependency_subscriber' EXEC sp_addrole 'sql_dependency_starter'
-- Permissions needed for [sql_dependency_starter]GRANT CREATE PROCEDURE to [sql_dependency_starter] GRANT CREATE QUEUE to [sql_dependency_starter]GRANT CREATE SERVICE to [sql_dependency_starter]GRANT REFERENCES on CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] to [sql_dependency_starter] GRANT VIEW DEFINITION TO [sql_dependency_starter]
-- Permissions needed for [sql_dependency_subscriber] GRANT SELECT to [sql_dependency_subscriber] GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [sql_dependency_subscriber] GRANT RECEIVE ON QueryNotificationErrorsQueue TO [sql_dependency_subscriber] GRANT REFERENCES on CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] to [sql_dependency_subscriber]
-- Making sure that my users are member of the correct role.EXEC sp_addrolemember 'sql_dependency_starter', 'username'EXEC sp_addrolemember 'sql_dependency_subscriber', 'username'
View 10 Replies
View Related
Dec 3, 2007
Hello all,
I am running into an interesting scenario on my desktop. I'm running developer edition on Windows XP Professional (9.00.3042.00 SP2 Developer Edition). OS is autopatched via corporate policy and I saw some patches go in last week. This machine is also a hand-me-down so I don't have a clean install of the databases on the machine but I am local admin.
So, starting last week after a forced remote reboot (also a policy) I noticed a few of the databases didn't start back up. I chalked it up to the hard shutdown and went along my merry way. Friday however I know I shut my machine down nicely and this morning when I booted up, I was in the same state I was last Wenesday. 7 of the 18 databases on my machine came up with
FCB:pen: Operating system error 32(The process cannot access the file because it is being used by another process.) occurred while creating or opening file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataTest.mdf'. Diagnose and correct the operating system error, and retry the operation.
and it also logs
FCB:pen failed: Could not open file C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataTest.mdf for file number 1. OS error: 32(The process cannot access the file because it is being used by another process.).
I've caught references to the auto close feature being a possible culprit, no dice as the databases in question are set to False. Recovery mode varies on the databases from Simple to Full. If I cycle the SQL Server service, whatever transient issue it was having with those files is gone.
As much as I'd love to disable the virus scanner, network security would not be amused. The data and log files appear to have the same permissions as unaffected database files. Nothing's set to read only or archive as I've caught on other forums as possible gremlins. I have sufficient disk space and the databases are set for unrestricted growth.
Any thoughts on what I could look at? If it was everything coming up in RECOVERY_PENDING it's make more sense to me than a hit or miss type of thing I'm experiencing now.
View 13 Replies
View Related
Mar 11, 2008
Dear list
Im designing a package that uses Microsofts preplog.exe to prepare web log files to be imported into SQL Server
What Im trying to do is convert this cmd that works into an execute process task
D:SSIS ProcessPrepweblogProcessLoad>preplog ex.log > out.log
the above dos cmd works 100%
However when I use the Execute Process Task I get this error
[Execute Process Task] Error: In Executing "D:SSIS ProcessPrepweblogProcessLoadpreplog.exe" "" at "D:SSIS ProcessPrepweblogProcessLoad", The process exit code was "-1" while the expected was "0".
There are two package varaibles
User::gsPreplogInput = ex.log
User::gsPreplogOutput = out.log
Here are the task properties
RequireFullFileName = True
Executable = D:SSIS ProcessPrepweblogProcessLoadpreplog.exe
Arguments =
WorkingDirectory = D:SSIS ProcessPrepweblogProcessLoad
StandardInputVariable = User::gsPreplogInput
StandardOutputVariable = User::gsPreplogOutput
StandardErrorVariable =
FailTaskIfReturnCodeIsNotSuccessValue = True
SuccessValue = 0
TimeOut = 0
thanks in advance
Dave
View 1 Replies
View Related
Jan 30, 2007
How do I use the execute process task? I am trying to unzip the file using the freeware PZUnzip.exe and I tried to place the entire command in a batch file and specified the working directory as the location of the batch file, but the task fails with the error:
SSIS package "IngramWeeklyPOS.dtsx" starting.
Error: 0xC0029151 at Unzip download file, Execute Process Task: In Executing "C:ETLPOSDataIngramWeeklyUnzip.bat" "" at "C:ETLPOSDataIngramWeekly", The process exit code was "1" while the expected was "0".
Task failed: Unzip download file
SSIS package "IngramWeeklyPOS.dtsx" finished: Success.
Then I tried to specify the exe directly in the Executable property and the agruments as the location of the zip file and the directory to unzip the files in, but this time it fails with the following message:
SSIS package "IngramWeeklyPOS.dtsx" starting.
Error: 0xC002F304 at Unzip download file, Execute Process Task: An error occurred with the following error message: "%1 is not a valid Win32 application".
Task failed: Unzip download file
SSIS package "IngramWeeklyPOS.dtsx" finished: Success.
The command in the batch file when run from the command line works perfectly and unzips the file, so there is absolutely no problem with the command, I believe it is just the set up of the variables on the execute process task editor under Process. Any input on resolving this will be much appreciated.
Thanks,
Monisha
View 1 Replies
View Related
Mar 20, 2008
I am designing a utility which will keep two similar databases in sync. In other words, copying the new data from db1 to db2 and updating the old data from db1 to db2.
For this I am making use of the 'Tablediff' utility which when provided with server name, database, table info will generate .sql file which can be used to keep the target table in sync with the source table.
I am using the Execute Process Task and the process parameters I am providing are:
WorkingDirectory : C:Program Files (x86)Microsoft SQL Server90COM
Executable : C:SQL_bat_FilesSQL5TC_CTIcustomer.bat
The customer.bat file will have the following code:
tablediff -sourceserver "LV-SQL5" -sourcedatabase "TC_CTI" -sourcetable "CUSTOMER_1" -destinationserver "LV-SQL2" -destinationdatabase "TC_CTI" -destinationtable "CUSTOMER" -f "c:SQL_bat_Filessql5TC_CTIsql_filescustomer1"
the .sql file will be generated at: C:SQL_bat_Filessql5TC_CTIsql_filescustomer1.
The Problem:
The Execute Process Task is working fine, ie., the tables are being compared correctly and the .SQL file is being generated as desired. But the task as such is reporting faliure with the following error :
[Execute Process Task] Error: In Executing "C:SQL_bat_FilesSQL5TC_CTIpackage_occurrence.bat" "" at "C:Program Files (x86)Microsoft SQL Server90COM", The process exit code was "2" while the expected was "0". ]
Some of you may suggest to just set the ForceExecutionResult = Success (infact this is what I am doing now just to get the program working), but, this is not what I desire.
Can anyone help ?
View 9 Replies
View Related
Aug 20, 2014
I'm pulling data from Oracle db and load into MS-SQL 2008.For my data type checks during the data load process, what are options to ensure that the data being processed wouldn't fail. such that I can verify first in-hand with the target type of data and then if its valid format load it into destination table else mark it with error flag and push into errors table... All this at the row level.One way I can think of is to load into a staging table then get the source & destination table -column data types, compare them and proceed.
should I just try loading the data directly and if it fails try trouble shooting(which could be a difficult task as I wouldn't know what caused error...)
View 3 Replies
View Related
Feb 25, 2002
I am running an update that is taking far too long, and i see quite a few waittypes of "cxpacket" in Enterprise Manager. I cannot find any documentation on this in BOL, so does anyone here have any insight? i am the only user on this entire sql server, and i'm wondering if this is the result of a hardware malfunction or something equally sinister. thanks.
View 1 Replies
View Related
Oct 21, 2004
I have a server with 300Gb+ of disk space on a SAN, with a database 55Gb for data and 15Gb for tranx log. SQL Server 2000 w/SP3 is installed. Whenever I run any query (simple, complex, short, long, using indexes or not) the server current activity shows many instances of NETWORKIO, PAGELATCH_EX, CXPACKET and other wait types on several processes. In Profiler, 500,000+ events were recorded within a 60 second timeframe. Someone else is responsible for "infrastructure" so before I go with recommendations to fix my issues, I would like as much accurate info as possible about the cause. This is supposed to be a relatively low-activity server. My understanding is serious disk subsystem issues would cause all these wait types together. But why would this happen when running a "select x, y, z from table" where the table contains < 250000 records and x,y,z make up a covering index. Additionally, I ran a relatively simple query, two tables, inner join, with properly defined indexes and went home to let it run. I returned and it had been running for 18 hours - I finally ran out of patience and stopped it. Any ideas?
View 4 Replies
View Related
Jul 24, 2007
CXPACKET wait type current makes up 63% of all the wait types which is causing latency. I need to identify the specific workloads responsible for waits so I can optimise or MAXDOP them. I already know how to retreived the top IO, CPU, Memory consuming queries but how do I identify the statements and order them by wait time?
Can someone point me in the direction of a command, DMV or will the top CPU list be adequate?
Thanks
View 3 Replies
View Related
Jan 28, 2008
Hi!
I hope to get some help with a stored procedure that never stops executing when run from Reporting Services development environment.
The server: SQL Server 2005 SP2 x86, 2 gig ram, 2 processor cores.
The stored procedure I execute is simple, it declares and sets some variables and then a executes a select statement
with 6 joins.
If I execute the stored procedure from Management Studio the query runs and returns about 50 000 rows in ~2 seconds. No problems!
The problems arises when I execute the stored procedure from visual studio (testing my reporting services report). The query will never complete its execution!?
I checked the activity monitor and can verify I have NO processses with any information in the blocked by or blocking column.
The strange thing is I got 3 rows for process id 64, only one row (row 1) printing the executing user.
Row 1: Stutus suspenden, Wait Type CXPACKET
Row 2 and 3 are pending between runnable and suspended and wait typoe pageiolatch_ex and no wait type at all when I refresh. These are probably parallell threads executed in the query.
The strange thing here is that this process never completes and if I do a trace the last command executed is select statement. I don´t understand what the problem is, sql server bug? Parellelism problem (in this case, why?)
Any help is appreciated
Regards
Per
View 8 Replies
View Related
Jul 2, 2015
Why would I see high CXPACKET waits on a database instance with only one CPU? Since the server only has 1 CPU parallelism can't be used, or are I'm missing something here!?
SQL version
Microsoft SQL Server 2012 - 11.0.5058.0 (X64)
May 14 2014 18:34:29
Copyright (c) Microsoft Corporation
Standard Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)
max degree of parallelism is set to 0
View 5 Replies
View Related
Apr 26, 2006
Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
This is the error i get every now and then when i attempt to browse to a page. It seems that i am getting this error as its trying to connection to a sql express database??? Only i have set my project up to use sql server 2000 and i am using that DB but every now and then i get this error. Im not sure what else i need to do? Any ideas?
View 4 Replies
View Related
May 21, 2008
Hi y'all I have a problem in my query.This is my querySELECT dbo.BOS_GL_Workplace.WpszState, Emp2.szName, Emp1.szName AS szEmpName, Emp1.szEmployeeId, dbo.BOS_PI_Division.szName AS Divisi, dbo.BOS_PI_Team.szDescription,dbo.BOS_SD_Route.szRouteId, dbo.BOS_SD_Route.szDescription, dbo.BOS_SD_Route.szScheduleId, dbo.BOS_SD_RouteItem.szCustId, dbo.BOS_SD_Route.szOpUserId,dbo.BOS_AR_Customer.szCustId ,dbo.BOS_AR_Customer.szName, dbo.BOS_AR_Customer.CustszAddress_1 AS AlamatKirim, dbo.BOS_AR_Customer.szTaxId, dbo.BOS_AR_Customer.CustszAddress_1 AS AlamatTagih, dbo.BOS_AR_Customer.CustszCity, dbo.BOS_AR_Customer.CustszZipCode, dbo.BOS_AR_Customer.szStatus, dbo.BOS_AR_CustSales.szPaymentTermId, dbo.BOS_AR_CustSales.decCreditLimit,BOS_AR_Customer.dtmStart,BOS_AR_Customer.dtmLastUpdated FROM dbo.BOS_PI_Employee Emp1 LEFT OUTER JOIN BOS_PI_Employee Emp2 on Emp1.szSupervisorID = Emp2.szEmployeeID Left outer join dbo.BOS_GL_Workplace ON Emp1.szWorkplaceId = dbo.BOS_GL_Workplace.szWorkplaceId LEFT OUTER JOIN dbo.BOS_PI_Division ON Emp1.szDivisionId = dbo.BOS_PI_Division.szDivisionId LEFT OUTER JOIN dbo.BOS_PI_Team ON Emp1.szTeamId = dbo.BOS_PI_Team.szTeamId LEFT OUTER JOIN BOS_SD_Route on Emp1.szEmployeeId = BOS_SD_route.szOPuserId LEFT OUTER JOIN BOS_SD_RouteItem on BOS_SD_Route.szRouteId = BOS_SD_RouteItem.szRouteID LEFT OUTER JOIN BOS_AR_Customer on BOS_SD_RouteItem.szCustID = BOS_AR_Customer.szCUstID LEFT OUTER JOIN BOS_AR_CustSales on BOS_AR_Customer .szCustId = BOS_AR_CustSales.szCustID When I run that query, it was working fine the result was correct. Then I tried to add the where clause, like this:WHERE BOS_AR_Customer.dtmLastUpdated >= '8/1/2006' AND BOS_AR_Customer.dtmLastUpdated <='9/21/2007'And it was also working fine, the result was also correct--pay attention dudes the date format is mm/dd/yyyyThen I try to change the date format to dd/mm/yyyy in the where clause like this (because later I realized that, this is the query that gonna be used):WHERE BOS_AR_Customer.dtmLastUpdated >= '1/8/2006' AND BOS_AR_Customer.dtmLastUpdated <='21/9/2007'The result was an error message saying:"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value."Can you tell me whats wrong, please. I appreciate anykinds of help guys, thanks. FYI : I use SQL SERVER 2000 Best Regards.
View 1 Replies
View Related
Jul 6, 2005
I'm having trouble getting a query to run that contains an IF statement:
*****************************************
DECLARE @lid int, @ptf varchar(50)
SET @lid = 3
set @ptf = '05-00005'
SELECT
tblInfoData.PTFileNumber AS [PT File Number],
IF @lid > 3
BEGIN
tblInfoData.OrigGrantor AS [Original Grantor],
END
tblPropertyData.propStreet AS [Property Address],
tblPropertyData.propCity AS City,
tblPropertyData.propState AS State,
tblPropertyData.propZip AS Zip,
tblSaleData.OrigSaleDate AS [Original Sale Date],
tblInfoData.Status AS Status
FROM tblInfoData INNER JOIN
tblPropertyData ON tblInfoData.PTFileNumber = tblPropertyData.PTFileNumber INNER JOIN
tblSaleData ON tblInfoData.PTFileNumber = tblSaleData.PTFileNumber
WHERE CONTAINS(tblInfoData.PTFileNumber, @ptf)
*********************************************
This throws the following error in Query Analyser:
Server: Msg 156, Level 15, State 1, Line 12
Incorrect syntax near the keyword 'IF'.
Server: Msg 170, Level 15, State 1, Line 14
Line 14: Incorrect syntax near 'tblInfoData'.
Any help/ideas?
thanx
</c>
View 6 Replies
View Related
Sep 19, 2005
Can anyone explain what's wrong with this code which is supposed to populate a dropdownlist using a parametised stored procedure and SqlDataAdapter?
objCmd = new SqlCommand("bs_GetActivityValueTypes", objConn.GetConnection()); objCmd.Parameters.Add("@scid", SqlDbType.Int);objCmd.Parameters["@scid"].Value = Convert.ToInt32(Request.QueryString["scorecard"].ToString()); objAdapter = new SqlDataAdapter(objCmd);objAdapter.Fill(dsInitData, "tblValueTypes");
comboResultType.DataSource = dsInitData.Tables["tblValueTypes"]; comboResultType.DataValueField = "Type_ID";comboResultType.DataTextField = "Type_Desc";comboResultType.DataBind(); comboResultType.Items.Insert(0, new ListItem("- Select a value type -", ""));Basically, if I remove the parameter from the code and the stored procedure it works fine, but when I add the parameter back I get an "Incorrect syntax near 'bs_GetActivityValueTypes'" error at line: objAdapter.Fill(dsInitData, "tblValueTypes"); This makes no sense to me because I know the stored procedure is well formed and I've used almost identical code elsewhere. All variables are declared further up the code. Someone help please!
View 3 Replies
View Related
Aug 1, 2006
i am testing some encryption
scenarios ,in profiler the statements like "OPEN KEY" and all "Encrypt"
and "Decrypt" functions are removed automaticly from the trace
and replaced with a comment ,create a trace and try the code i attached ,
you will see in profiler trace that that all encryption related commands
are commented out ,this is what expected.
but now go to the batch and comment out the "SELECT @rrr' statment,
and run the batch ,this batch will fail beacuse "@rrr" is not declared,
now go back to profiler and you will see that for the failed batch
all the encryption command are NOT COMMENTED OUT !!!
esspecially important is the visibility of the password of the open key command.
seems like a very dangerous bug to me!!!
CREATE CERTIFICATE test1
ENCRYPTION BY PASSWORD = 'pGFD4bb925DGvbd2439587y'
WITH SUBJECT = 'Sammamish Shipping Records',
EXPIRY_DATE = '10/31/2009';
GO
CREATE SYMMETRIC KEY Key09 WITH ALGORITHM = TRIPLE_DES
ENCRYPTION BY CERTIFICATE test1;
GO
declare @Str nvarchar(100)
declare @Enc varbinary(max)
set @Str = 'encrypt this'
OPEN SYMMETRIC KEY Key09
decryption by CERTIFICATE test1 WITH PASSWORD = 'pGFD4bb925DGvbd2439587y'
SET @Enc
= EncryptByKey(Key_GUID('Key09'), @Str);
---select @rrr
select CONVERT(nvarchar(100), DecryptByKey(@Enc))
go
View 1 Replies
View Related
Aug 10, 2015
I am doing a distinct count on a related table's column, but get an out of memory error if I run it for the entire table (works great for just a few rows when filtered down).The error I get is: "We couldn't get data from the external source.The operation has been cancelled because there is not enough memory available for the application. If using 32-bit version of the product consider upgrading.
I know I can add a related column and that works fine...but that seems to me like I've defeated the purpose, I have a good and proper lookup table, and should be able to run my query against its relationship.Here is the query and details below *Note I supplied a scaled down sample, on my actual model I receive these errors, not in the sample as it has only a few rows
List Workers Distinct Project Customers:=CALCULATE(DISTINCTCOUNT(Projects[CustomerID]),'WorkersToProjects')
Other measure which returns no errors, but included for completeness:
List Workers Projects:=CALCULATE(DISTINCTCOUNT([ProjectID]),ISBLANK(WorkersToProjects[ProjectID])=FALSE())
My goal here is to allow the user to view the workers assigned to a project, but also get counts of the workers assigned to the CUSTOMER of a project. For example, suppose we lose a customer, we want to see how many workers would be impacted by that, so a count of projects per worker is not useful there, we need to see a count of workers per project's customer (owner of project whom project work is being done for)The question being: How can I accomplish this:
1. WITHOUT adding a calculated column to WorkersToProjects (of Projects.CustomerID)
2. WITH better performance?
There must be a better way to write this DAX to still get the correct answer?*Pic of pivot table, again, the numbers are accurate but the formula used to List Workers Distinct Project Customers measure does NOT scale :( 3 count for red , the number of Projects John has and 2 count for blue, the unique customers/owners of those projects "Veridian Dynamics" and "Massive Dynamic". URL....
View 3 Replies
View Related
Jul 14, 2007
Microsoft SQL Server 2005 Setup
-------------------------------------------------
The setup failed to get IID_IIMSAdminBase object. The error code is -2147467262.
Hi there,
I have checked every possible site for this error but unable to find any solution. I received the above alert message during the installation of SQL2k5, Reporting Services. I am using window xp with sp2.
When click OK to alert box then it rollback all installed components of Reporting Services.
Please help.
Cheers,
Zafar.
View 1 Replies
View Related
Mar 18, 2007
I can use SQL Server Management Studio Express to connect to my local database SQL 2005 database on bknjisqlexpress.
I am also able to connect to the database from Visual Studio, and this is where I copied the following connection string to be used in my C# code
string myConnectString = "Data Source=BKFNJI\SQLEXPRESS;" +
"Initial Catalog=cmiCompatibilityDataBase" +
"Integrated Security=True;Pooling=False";
// specify SQL Server Specific Connection string
SqlConnection cmiDBCompConnection = new SqlConnection(myConnectString);
cmiDBCompConnection.Open();
when I attempt to run the apps, I get the
"System.Data.SqlClient.SqlException was unhandled
Message="A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)".....
any idea what I am doing wrong, given that the connection string works using other means? I am using Windows authentication.
To add, the error in my log shows:
2007-03-17 21:10:55.82 Logon Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: <local machine>]
Thanks,
Klaus
View 1 Replies
View Related
Jul 31, 2007
Hi everybody,
I'm trying to backup a database of 330 GB more or less from my server to an external hard disk connected by optical fiber and I'm receiving the next error:
[SQLSTATE 01000] (Message 3211) Write on "H:sqlbackuppm_import" failed: 33(The process cannot access the file because another process has locked a portion of the file.) [SQLSTATE 42000] (Error 3202) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.
Any idea??
Thanks!
View 7 Replies
View Related
Mar 24, 2008
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
View 7 Replies
View Related
Jun 27, 2014
I have a simple update statement that will update one field, and that field is part of the primary key. During the update process, some of the rows will cause duplicate error. Is there a way to update the table and suppress the error? What I am looking for is a way to update the records that it can and ignore those it cannot. Right now, the entire process is terminated if duplicate error occurs.
View 2 Replies
View Related
Oct 13, 2006
Hey guys. I am creating an app that uses the RMO Merge Replication objects.
So far it can subscribe and unsubscribe just fine but when it comes to the syncing process it gets a little weird, here's why.
- If I run the SQL GUI Sync tool, it sinks fine. So that setup is working.
- When I run the C# App it blows up witht the error: "Process cannot connect to Distributor"
- Here's the weird part: When I set a breakpoint on my custom method SyncData (this method sets up the connection info and properties and then calls Syncronize( ) ) and step through the code when it gets to Syncronize( ) it runs perfectly fine, no execeptions.
I thought that maybe the Syncronize( ) method was being called too fast before the connection properties got to fully setup and connect, so I added a Thread.Sleep( ) method for 10 secs after each connection call and just before calling Syncronize( ). It still didn't work. My class is a static class by design, however, I changed it into an ordinary class and then placed the connection info in the constructor hoping it would do it's connection when the object gets initialized, that didn't work either.
If someone could please help me out with this I would greatly appreciate it.
Here's my code:
using System;using System.Collections.Generic;using System.Text;using Microsoft.SqlServer.Replication;using Microsoft.SqlServer.Replication.BusinessLogicSupport;using Microsoft.SqlServer.Management.Common;using System.Windows.Forms;using System.Threading;namespace Emds.Briefcase.BriefcaseSubscriber.BLL{ public class SyncDataClass { #region Members private static string m_statusMessage = string.Empty; private static byte m_percentComplete; public delegate void StatusTextChangeHandler(int percent, string status); public static event StatusTextChangeHandler OnStatusChange; #endregion Members #region Methods public static string SyncData() { //Delay(); // Define the server, publication, and database names. string publicationName = "Chart"; string publisherName = @"JSMITHSQL2005"; string subscriberName = @"JDOESQL2005"; string subscriptionDbName = "DataSubscriber"; string publicationDbName = "DataPublisher"; string message = string.Empty; // Create a connection to the Subscriber. ServerConnection conn = new ServerConnection(subscriberName); MergePullSubscription subscription; try { // Connect to the Subscriber. conn.Connect(); // Delay(); // Define the pull subscription. subscription = new MergePullSubscription(); subscription.ConnectionContext = conn; //Delay(); subscription.DistributorSecurity.WindowsAuthentication = false; subscription.DistributorSecurity.SqlStandardLogin = "sa"; subscription.DistributorSecurity.SqlStandardPassword = "russell"; // Delay(); subscription.PublisherName = publisherName; subscription.PublicationDBName = publicationDbName; subscription.PublicationName = publicationName; subscription.PublisherSecurity.SecurityMode = ReplicationSecurityMode.SqlStandard; subscription.PublisherSecurity.SqlStandardLogin = "sa"; subscription.PublisherSecurity.SqlStandardPassword = "russell"; // Delay(); subscription.DatabaseName = subscriptionDbName; subscription.SubscriberSecurity.WindowsAuthentication = false; subscription.SubscriberSecurity.SqlStandardLogin = "sa"; subscription.SubscriberSecurity.SqlStandardPassword = "russell"; // Delay(); // If the pull subscription exists, then start the synchronization. if (subscription.LoadProperties()) { // Check that we have enough metadata to start the agent. if (subscription.PublisherSecurity != null || subscription.DistributorSecurity != null) { // Synchronously start the Merge Agent for the subscription. subscription.SynchronizationAgent.Status += new AgentCore.StatusEventHandler(SynchronizationAgent_Status); // Delay(); subscription.SynchronizationAgent.Synchronize(); message = "Data Syncronization is a success!"; } else { throw new ApplicationException("There is insufficent metadata to " + "synchronize the subscription. Recreate the subscription with " + "the agent job or supply the required agent properties at run time."); } } else { // Do something here if the pull subscription does not exist. throw new ApplicationException(String.Format( "A subscription to '{0}' does not exist on {1}", publicationName, subscriberName)); } } catch (Exception ex) { // Implement appropriate error handling here. throw new ApplicationException("The subscription could not be " + "synchronized. Verify that the subscription has " + "been defined correctly.", ex); } finally { conn.Disconnect(); } return message; } static void SynchronizationAgent_Status(object sender, StatusEventArgs e) { m_percentComplete = e.PercentCompleted; m_statusMessage = e.Message; //Fire custom event if (OnStatusChange != null) { OnStatusChange(m_percentComplete, m_statusMessage); } } #endregion Methods }}
View 7 Replies
View Related
Mar 10, 2008
Hi
I am having trouble running a package in SQL Agent. The step involves zipping up a number of files using SQL Agent. I know in the error message it states "Access is denied" but I can run the package manually in BIS. Also I have applied a SQL proxy to the step using my own credentials which have rights to the file location, but still no luck.
I get the following error:
Error: 2008-03-10 09:04:02.04 Code: 0xC002F304 Source: Call ZipFiles Batch Execute Process Task Description: An error occurred with the following error message: "Access is denied". End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 09:04:00 Finished: 09:04:02 Elapsed: 1.219 seconds. The package execution failed. The step failed.,00:00:02,0,0,,,,0
Does anyone know what the problem could be?
Thanks
View 19 Replies
View Related
May 1, 2008
When i am trying to run a report model. I am encountered with the following error.
Can anybody help me out in resolving this error.
Error: the server could not process the data
thanks
View 1 Replies
View Related
Apr 28, 2008
I had to un-install and re-install SQL Server 2005 for a different problem which has been resolved.
But now when I try to make a connection to the database I get the following error:
"...No process is on the other end of the pipe"
I have verified that the server allows named pipeing which seems to be the common answer I found after searching. I have also verified that the account I use is setup and has all the proper permissions.
Can someone help me in resolving this issue noting what I have verified above???
Thanks...
View 4 Replies
View Related
Nov 14, 2007
Hi,
I was trying to extract data from the source server using OLEDB Source and SQL Server Destination when i encountered this error:
"Transaction (Process ID 135) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".
What must be done so that even if the table being queried is locked, i wouldn't experience any deadlock?
cherriesh
View 4 Replies
View Related
May 28, 2004
Hello:
I have a database table where a primary key is defined. When I enter data that is the same as another table, it does not allow and throws an error which I do want. What happens is that a Server Error in Application error type is thrown with the following message:
Violation of PRIMARY KEY constraint 'PK_cs_sc'. Cannot insert duplicate key in object 'cs_sc'. The statement has been terminated.
How can I detect the error in my own asp.net page code so that it does not forward my users to the asp.net server error page? Heres my code below... how can I check for success or failure within this code?
Dim conSqlConnect As SqlConnection
Dim strInsert As String
Dim cmdInsert As Sqlcommand
conSqlConnect = New SqlConnection( "Server=localhost;uid=var;pwd=var;database=var" )
strInsert = "Insert cs_sc ( [name] ) Values ( @name )"
cmdInsert = New SqlCommand ( strInsert, conSqlConnect )
conSqlConnect.Open()
cmdInsert.ExecuteNonQuery()
conSqlConnect.Close()
View 3 Replies
View Related
Jul 7, 2004
I am getting this error on replication and don't know why. Any ideas?
The process could not read file '\NJRARSVR00E9d$sqldatasystemMSSQL$P001ReplD atauncNJRARSVR00E9$P001_PTR_PTR20040707104224s napshot.pre' due to OS error 5.
View 1 Replies
View Related
Mar 10, 2008
Hi
I am having trouble running a package in SQL Agent. The step involves zipping up a number of files using SQL Agent. I know in the error message it states "Access is denied" but I can run the package manually in BIS. Also I have applied a SQL proxy to the step using my own credentials which have rights to the file location, but still no luck.
I get the following error:
Error: 2008-03-10 09:04:02.04 Code: 0xC002F304 Source: Call ZipFiles Batch Execute Process Task Description: An error occurred with the following error message: "Access is denied". End Error DTExec: The package execution returned DTSER_FAILURE (1). Started: 09:04:00 Finished: 09:04:02 Elapsed: 1.219 seconds. The package execution failed. The step failed.,00:00:02,0,0,,,,0
Does anyone know what the problem could be?
Thanks
View 1 Replies
View Related
Jun 4, 2007
Hi,
I am trying to run a very simple copy command from an execute process task:
copy O:myFoldermyFile*.txt D:myFolder
I have a working directory set also.
However, there is an error icon on the task, and if I attempt to run it I get the following error:
Error at Execute Process Task [Execute Process Task]: File/Process "" does not exist in directory "copy O:myFoldermyFile*.txt D:myFolder".
Error at Execute Process Task: There were errors during task validation.
This command works fine from the command line. What am I doing wrong here?
Thanks
View 12 Replies
View Related
Jun 29, 2006
Anyone seen this SSIS error when importing data? I have a 64bit quad processor with 8gb and am importing from Oracle 9 using 32bit DTExec.exe from the command line.
OnInformation,Myserver,MyDomainSQLAdmin,J001OracleDimExtract,{CEB7F874-7488-4DB2-87B9-28FC26E1EF9F},{1221B6EB-D90A-466E-9444-BA05DBC6AFD8},6/29/2006 10:58:08 AM,6/29/2006 10:58:08 AM,1074036748,0x,The buffer manager detected that the system was low on virtual memory, but was unable to swap out any buffers. 2 buffers were considered and 2 were locked. Either not enough memory is available to the pipeline because not enough is installed, other processes are using it, or too many buffers are locked.
Thanks
View 5 Replies
View Related