FailParentOnFailure And MaxErrorCount - Not Functioning As I Would Expect

Mar 31, 2008

I have a package that executes a number of tasks includng executing other packages. In one of the sub-packages, I am looping through a directory, processing files in that directory, and copying the files to another directory after completion using a for each file enumerator and file system task. The file system task has a failure precedence constraint leaving it going into a script task which simply pops up a message box saying that an error occurred.

What I am trying to do is to allow the sub package (and parent package) to continue execution if there is an error during the file system task. This question really is unrelated to the file system task specifically... in general, how can an error be ignored and execution not stop?

On the file system task, I've set MaxErrorCount = 0 and FailParentOnFailure and FailPackageOnFailure are set to False. With MaxErrorCount = 0, the file system task itself does not fail but its parent container (the for each file enumerator) does. This failure then propogates all the way up to the parent package and execution stops. I have gotten around this by setting MaxErrorCount = 0 also on the for each file enumerator, the execute package task, and all its ancestors going all the way up to the root of the main package. This works, but maintaining this would be a nightmare. Setting MaxErrorCount = 0 and FailParentOnFailure = False at the point only where I expect the error seems like it should be enough but it obviously is not. What am I missing here?

View 5 Replies


ADVERTISEMENT

FailParentOnFailure Not Working?

Jan 13, 2006

I have a script task inside a sequence container with the FailParentOnFailure = 'false' and the FailPackageOnFailure = 'false'.  However, when I deliberately fail the task ("Dts.TaskResult = Dts.Results.Failure") the sequence container and the package still report failure.  Any thoughts?

Thanks

View 3 Replies View Related

Unintuitive Behaviour With FailPackageOnFailure && FailParentOnFailure

May 24, 2007

I would expect that these 2 properties would have the same effect when the parent of the task in question is the package container (i.e. there are no sequence/for each/for loop containers between the task in question and the package). This is not the case.



Here's a simple demo. I have a package which uses a checkpoint file. It has 3 tasks with OnSuccess precedence constraints:



[Succeeds1]-->[Fails]-->[Succeeds2]



I set all 3 tasks to have FailPackageOnFailure=TRUE. The package fails on task [Fails] and upon restart [Succeeds1 is not executed and [Fails] will fail again. This is all as expected.



HOWEVER, if [Fails] has FailPackageOnFailure=FALSE and instead FailParentOnFailure=TRUE we don't get the same behaviour. The checkpoint file never gets written and upon restart [Succeeds1] will always get executed. This is nOT expeced behaviour (not by me anyway).



It seems strange to me that FailPackageOnFailure & FailParentOnFailure cause different behaviour when the parent of the task is the package itself. Surely in this scenario these properties should have the same effect?



Can anyone from MSFT explain why they are different?



Thanks

Jamie



P.S. I can provide a demo package. Just email me!



[Microsoft follow-up]

View 4 Replies View Related

SqlConnection ..what Should I Expect ??

Aug 18, 2006

Hi all,

I'm trying to connect to my SQL SERVER 2000 database via Sqlconnection command with the code below,do I need to do something else to make sure the database is really opened ..I keep getting error at

conn.Open(); which I dont know what do about ..

any help will be really appreciated



using (SqlConnection conn = new SqlConnection("Server=" + dbServer+";Database="+dbDatabase+";"))

{

conn.Open();

SqlCommand cmd = conn.CreateCommand();

cmd.CommandText = "SELECT * FROM LOCATIONS";

cmd.ExecuteNonQuery();

conn.Close();

}





thanks

Alaa M

View 7 Replies View Related

Search Sp Not Functioning Correctly ???

Dec 13, 2005

can somebody tell me whats wrong with this sp..................when i pass lname only or fname only it does not return any data, but when i passs both lname and fname it returns the correct data.....when i rearrange the structure to where it checks the lname only it works also but fname doesn't .........any help  is greatlly appreciated
 
CREATE PROCEDURE [dbo].[temp_search] (  @lname varchar(50) = null,  @fname varchar(50) = null,  @date1 datetime = null, @date2 datetime = null)
/*set @lname = null -- 'aaa'set @fname =  null --'ddd'set @date1 = '2/25/2003'set @date2 = '9/30/2004'*/
as
set nocount on
 if not @lname is null or @lname = '' and not @fname is null or @fname = ''begin select temp_user_info.*, dateTime1 FROM temp_user_info  INNER JOIN temp_seq ON temp_user_info.temp_seq = temp_seq.temp_seq  WHERE temp_user_info.temp_seq = temp_seq.temp_seq   and temp_user_info.lname like @lname  and temp_user_info.fname like @fnameendelse  if not @lname is null or @lname = ''  begin  select temp_user_info.*, dateTime1  FROM temp_user_info   INNER JOIN temp_seq ON cir_temp_user_info.temp_seq = temp_seq.temp_seq   WHERE temp_user_info.temp_seq = temp_seq.temp_seq     and temp_user_info.lname like @lname end else   if not @fname is null or @fname = ''  begin   select temp_user_info.*, dateTime1   FROM temp_user_info    INNER JOIN temp_seq ON temp_user_info.temp_seq = temp_seq.temp_seq    WHERE temp_user_info.temp_seq = temp_seq.temp_seq      and temp_user_info.fname like @fname     end  else   if not @date1 = null  and not @date2 = null   begin    select cir_temp_user_info.*, dateTime1    FROM cir_temp_user_info     INNER JOIN temp_seq ON cir_temp_user_info.temp_seq = temp_seq.temp_seq     WHERE temp_user_info.temp_seq = temp_seq.temp_seq      and dateTime1 between @date1 and  @date2    end   else     if not @date1 = null    begin     select temp_user_info.*, dateTime1     FROM temp_user_info      INNER JOIN temp_seq ON temp_user_info.temp_seq = cir_temp_seq.temp_seq      WHERE temp_user_info.temp_seq = temp_seq.temp_seq       and dateTime1 like @date1       endGO

View 5 Replies View Related

SQL Mail Stopped Functioning

Jun 23, 2003

SQL Server 7.0

SQL mail has stopped functioning. I have checked the profile in exchnage. All is ok. I have tested the MAPI profiles in SQLAgent and SQLMail they all give success. When I run xp_sendmail the process just runs and runs without sending a mail. I end up having to kill the prorcess. Any ideas?

Thanks,

Nev.

View 5 Replies View Related

Sql Server Incorrectly Functioning

Jul 23, 2005

I have a .NET application with a sql server database backend. Ourclient has been having problems lately with data being returned fromthe database with wrong data. We have error logging in our storedprocedures and even this is reporting wrong. In every stored procedurewe have the following:IF @@Error <> 0BEGINEXEC dbo.HandleError@ErrorNum = @@Error,@ProcID = @@PROCIDENDThen, HandleError looks like:CREATE PROCEDURE dbo.HandleError@ErrorNum int,@ProcID intAS/************************************************** ****************** PROCEDURE: HandleError* PURPOSE: Handles logging an error* CALLED FM: Other stored procedures************************************************** ******************/SET NOCOUNT ONDECLARE @UserID intDECLARE @Host varchar(50)DECLARE @Len intDECLARE @SPName VARCHAR(100)DECLARE @ErrorMsg varchar(500)DECLARE @ErrorTrace varchar(4000)-- Get our host nameSET @Host = HOST_NAME()SET @Len = LEN(@Host) - CHARINDEX(':', @Host)IF @Len > 0 AND CHARINDEX(':', @Host) > 0SET @UserID = RIGHT(@Host, LEN(@Host) - CHARINDEX(':', @Host))ELSESET @UserID = NULLSET @SPName = OBJECT_NAME(@ProcID)SET @ErrorMsg = 'SQL Error: ' + @SPNameSET @ErrorTrace = 'Error: '+ CAST(@ErrorNum AS VARCHAR(50))EXEC dbo.InsertApplicationErrors@ErrorMessage = @ErrorMsg,@ExceptionMessage = '',@ErrorStackTrace = @ErrorTrace,@UserID = @UserID,@HostID = @Host,@Logfile = '';SET NOCOUNT OFFGOInsertApplicationErrors inserts a log into a table we have that wemonitor. We got an error back in the ErrorStackTrace column with'Error: 0'. That shouldn't happen, as the only time we log error is ifit is not 0.Does anyone have any ideas on what might be wrong?Steve

View 7 Replies View Related

TableDiff Stopped Functioning

Jul 31, 2007



Hi,

TableDiff Stop Functioning on 2million records with 1.8milion changes on a particular row. Only happen if "-f" is specified. Anyway to work around this?

Regards,
Ben

View 1 Replies View Related

How Would You Find Out Whether A SQL Query Is Using The Indices You Expect?

May 16, 2004

Hello, everyone:

This is testing question from a tesing seb site. Any reply will be appreciated.

ZYT

View 3 Replies View Related

Error Reportings -- To Except Or Not Expect Or Return?

May 11, 2007

You have seen a chair in a public room and go back after a while to acquire it. Is it unexpected that the object is not there anymore?

I implement the business logic in stored procedures. Once user orders some service, the actions carry out are: a)check they have sufficient funds on their balance; and, b) a price check is made selecting the latest from pricelist. The newly created job entry refers the price in the pricelist table according to service_id and the issued pricelist date.

These are data validity checks, which must be done in a multiuser database. In the session beginning, user gets prices and funds. These data are not locked throughout the session -- another process may change the records. Therefore, the extra "business" checks are needed to preserve data correctness at the start of every transaction. One way to report the errors would be to raise an error.

Consider the primary-foreign key violations. They are raised by system with severity level of 16. Uniqueness violation is raised with severity 14. The MSSQL reference http://msdn2.microsoft.com/en-us/library/ms164086.aspx tells us that this is a sort of error, which can be corrected by user. Indeed, (s)he can. But the exceptions are unexpected situations. Exception processing consumes huge CPU processing power if some occurs. Normally, programs allocate resources and use them. If resource cannot be allocated -- app exits with exception. It just has nothing to do. However, there is nothing exceptional in shared data access by multiple concurrent processes in a multithread/multiuser/distributed application. Since, we cannot lock the user resources during user session, we should be prepared to concurrent data changes. Therefore, I find the exception raising inappropriate tool.

Consider a situation, when one user is assigned to a group. Nothing prevents from another admin to remove the group at the same time. Therefore, our user management application should be ready to expected "group does not exist" "error" result. I even disagree that this is an error, since it is perfectly valid to have such a situation. It is like you have seen a chair in a room and later return to take it. But the chair is not there anymore. Is it unexpected? The case should not be exceptional, IMO.


So we have:
1. Severity 1-10 "informational messages";
2. Severity 11-16 errors; and
3. RETURN error_code.

Which should be used? Anything else? Do my considerations make sense?

View 8 Replies View Related

Query Optimizer Does Not Use The Index I Expect

Jun 27, 2007

I am trying to resolve performance issues in a third party application. I have run the profiler and found a transaction that performs a table scan against a 6 million row table. This transaction occurs repeatedly, so I thought, just add an index on the columns in the where clause used here. After adding the index, I looked at the estimated execution plan in Query analyzer, and I find that it is still performing the table scan. If I run the query it takes over 60 seconds to run, if i add an index hint, it runs in under a second. I ran DBCC SHOW_STATISTICS to see if the statistics were up to date:

Statistics for INDEX 'IX_Finish_dept'.
Updated Rows Rows Sampled Steps Density Average key length
-------------------- -------------------- -------------------- ------ ------------------------ ------------------------
Jun 26 2007 5:18PM 6832336 6832336 150 2.1415579E-7 18.0

(1 row(s) affected)

All density Average Length Columns
------------------------ ------------------------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2.1875491E-7 8.0 finish
1.9796084E-7 18.0 finish, dept

(2 row(s) affected)

RANGE_HI_KEY RANGE_ROWS EQ_ROWS DISTINCT_RANGE_ROWS AVG_RANGE_ROWS
------------------------------------------------------ ------------------------ ------------------------ -------------------- ------------------------
1900-01-01 00:00:00.000 0.0 106110.0 0 0.0
2001-02-01 17:00:00.000 54121.0 47.0 22951 2.3581107
2001-02-28 17:00:00.000 44436.0 22.0 18121 2.4520473
2001-04-06 00:00:00.000 56830.0 76.0 24902 2.2820544
2001-08-10 17:00:00.000 196491.0 19.0 88800 2.2127116
2001-09-02 17:00:00.000 33070.0 50.0 15289 2.162993
2001-10-05 17:04:59.997 57975.0 30.0 22882 2.5335402
2001-11-05 15:31:59.997 50178.0 21.0 20899 2.4008613
2001-12-10 17:00:00.000 55266.0 38.0 25114 2.2006052
2002-01-03 17:00:00.000 40322.0 51.0 18649 2.1620376
2002-02-25 17:00:00.000 86338.0 24.0 39266 2.1987979
2002-08-15 06:11:00.000 296085.0 166.0 124526 2.3776772
2002-10-07 21:18:59.997 88727.0 826.0 39017 2.2740018
2002-12-17 16:59:00.000 127671.0 6.0 53314 2.3946545
2003-01-16 07:15:00.000 62206.0 71.0 24604 2.5281854
2003-01-21 07:15:00.000 8287.0 43.0 3661 2.2629712
2003-01-27 07:15:00.000 10402.0 68.0 4265 2.4389215
2003-01-31 07:15:00.000 9127.0 73.0 3784 2.4113607
2003-02-05 00:00:00.000 8362.0 327.0 3500 2.3891428
2003-02-10 00:00:00.000 8846.0 262.0 3230 2.7386997
2003-02-14 00:00:00.000 10018.0 51.0 4107 2.4386563
2003-02-20 00:00:00.000 10388.0 91.0 4686 2.2168159
2003-02-26 00:00:00.000 10571.0 69.0 4330 2.4407759
2003-03-03 00:00:00.000 10476.0 261.0 4423 2.3679929
2003-03-06 00:00:00.000 8858.0 594.0 3183 2.7829092
2003-04-02 00:00:00.000 57681.0 275.0 38622 1.4934366
2003-04-05 00:00:00.000 10539.0 29.0 8776 1.2008888
2003-04-09 00:00:00.000 9880.0 1324.0 7193 1.3735576
2003-04-12 00:00:00.000 8953.0 195.0 7737 1.1571668
2003-04-16 00:00:00.000 8385.0 177.0 7154 1.1719078
2003-04-21 00:00:00.000 8920.0 173.0 7756 1.1500773
2003-04-24 00:00:00.000 8563.0 156.0 7320 1.169649
2003-04-29 00:00:00.000 8462.0 137.0 7414 1.1412003
2003-05-02 00:00:00.000 9625.0 140.0 8363 1.1509027
2003-05-06 00:00:00.000 8208.0 904.0 6557 1.251792
2003-05-09 00:00:00.000 9211.0 119.0 7986 1.1533934
2003-05-19 00:00:00.000 19623.0 123.0 17290 1.1348679
2003-05-22 00:00:00.000 9568.0 246.0 8357 1.1449084
2003-05-28 00:00:00.000 9599.0 169.0 8553 1.1221651
2003-06-02 00:00:00.000 10937.0 174.0 9599 1.1393895
2003-07-11 00:00:00.000 99592.0 999.0 83573 1.1916767
2003-07-29 00:00:00.000 42434.0 111.0 33918 1.2510761
2003-08-21 00:00:00.000 59580.0 323.0 50756 1.1738282
2003-09-12 00:00:00.000 51779.0 1407.0 44298 1.1688789
2003-09-25 00:00:00.000 30655.0 255.0 26924 1.138533
2003-10-12 00:00:00.000 44573.0 968.0 37746 1.1808668
2003-10-28 00:00:00.000 38358.0 532.0 32689 1.1734222
2003-11-11 00:00:00.000 35158.0 145.0 28124 1.2500622
2003-12-04 00:00:00.000 61304.0 787.0 52882 1.1592383
2003-12-18 00:00:00.000 44462.0 221.0 39493 1.1257913
2004-01-06 00:00:00.000 56617.0 998.0 49471 1.1444252
2004-02-04 00:00:00.000 96694.0 537.0 83182 1.162425
2004-03-05 00:00:00.000 90850.0 716.0 78693 1.1544864
2004-03-23 00:00:00.000 48969.0 125.0 43450 1.1270195
2004-07-05 00:00:00.000 301725.0 1405.0 258824 1.1657491
2004-08-06 00:00:00.000 95079.0 1419.0 75445 1.2602259
2004-09-03 00:00:00.000 88056.0 193.0 68403 1.2873119
2004-09-23 01:30:12.997 57515.0 8.0 42891 1.3409261
2004-10-11 00:00:00.000 57204.0 116.0 40241 1.4215
2004-10-15 00:00:00.000 17702.0 186.0 12774 1.3856752
2004-10-19 00:00:00.000 9556.0 125.0 7305 1.3079661
2004-10-21 00:00:00.000 8898.0 133.0 6299 1.4126052
2004-10-25 00:00:00.000 8878.0 104.0 6372 1.3930645
2004-10-27 00:00:00.000 11904.0 252.0 6056 1.9656539
2004-10-29 00:00:00.000 8866.0 99.0 6551 1.3533812
2004-11-02 15:22:47.997 12287.0 1.0 9791 1.2547998
2004-11-05 13:16:50.997 12287.0 1.0 10013 1.2269822
2004-11-09 23:52:48.000 12284.0 4.0 9200 1.3352174
2004-11-12 17:17:59.997 12287.0 1.0 9360 1.3127136
2004-11-22 06:58:06.997 24575.0 1.0 19742 1.244745
2004-11-25 01:57:00.000 12287.0 1.0 8822 1.392768
2004-11-30 21:34:59.997 12287.0 1.0 9128 1.3459306
2004-12-03 13:21:24.000 12287.0 1.0 9085 1.3523003
2004-12-07 04:05:21.000 12285.0 5.0 9488 1.2947934
2004-12-09 13:25:00.000 12285.0 5.0 8993 1.3659106
2004-12-13 07:21:46.000 12282.0 10.0 9461 1.2981714
2004-12-15 18:41:23.000 12287.0 2.0 9112 1.3482937
2005-02-04 14:41:36.997 178768.0 58.0 133439 1.3396883
2005-02-23 00:00:00.000 51107.0 29.0 38624 1.3231586
2005-03-10 23:06:17.997 50891.0 24.0 38479 1.3225312
2005-03-28 00:00:00.000 45509.0 32.0 34203 1.3305169
2005-04-13 09:50:34.000 58778.0 19.0 43687 1.3454038
2005-06-08 09:46:43.997 162983.0 25.0 121508 1.3413246
2005-08-08 09:37:29.000 197467.0 20.0 143462 1.3764411
2005-08-24 11:21:37.997 57393.0 5.0 42770 1.3418672
2005-09-11 13:54:05.997 53729.0 5.0 39527 1.3592987
2005-11-08 00:00:00.000 193537.0 69.0 136906 1.4136385
2005-11-22 00:00:00.000 55031.0 33.0 38197 1.4407152
2005-12-05 00:00:00.000 40371.0 77.0 28082 1.4376112
2005-12-22 12:40:59.997 75170.0 3.0 52523 1.4311825
2006-03-02 00:00:00.000 239709.0 42.0 170405 1.4066935
2006-03-04 06:26:36.997 9639.0 23.0 6470 1.489799
2006-03-12 10:02:43.000 21993.0 1.0 16086 1.3672137
2006-03-15 00:00:00.000 8774.0 40.0 6687 1.3119019
2006-04-03 00:00:00.000 69570.0 31.0 46495 1.4962578
2006-04-04 00:00:00.000 8743.0 28.0 4606 1.8977643
2006-04-04 13:53:00.997 12284.0 6.0 3401 3.6108172
2006-04-05 00:00:00.000 10794.0 29.0 3438 3.139616
2006-04-06 00:00:00.000 9413.0 45.0 5001 1.8818473
2006-04-10 00:00:00.000 11058.0 30.0 7865 1.4059758
2006-04-14 00:00:00.000 23183.0 38.0 16281 1.4238423
2006-04-18 00:00:00.000 9898.0 37.0 7258 1.3635488
2006-04-21 03:19:31.000 16561.0 26.0 11848 1.3976707
2006-04-25 14:48:00.000 12287.0 3.0 8553 1.436572
2006-04-27 13:37:49.000 9793.0 96.0 7203 1.3593837
2006-05-02 00:00:00.000 11426.0 30.0 8135 1.4043757
2006-05-04 05:28:36.000 12277.0 22.0 8806 1.3940048
2006-06-08 00:00:00.000 123695.0 33.0 89478 1.3824068
2006-06-16 00:00:00.000 35327.0 37.0 24539 1.4396267
2006-06-29 00:00:00.000 48433.0 40.0 35226 1.3748829
2006-07-14 00:00:00.000 62915.0 57.0 44859 1.4024744
2006-08-10 00:00:00.000 106281.0 36.0 75810 1.401939
2006-08-17 00:00:00.000 25345.0 81.0 18123 1.398422
2006-08-28 00:00:00.000 40947.0 38.0 27573 1.4850397
2006-09-11 09:00:00.000 52187.0 15913.0 36698 1.4220666
2006-09-25 00:00:00.000 52902.0 30.0 37210 1.4216764
2006-10-06 00:00:00.000 54534.0 31.0 38244 1.4259119
2006-10-11 13:29:40.997 16380.0 5.0 12503 1.3100855
2006-11-29 00:00:00.000 197522.0 27.0 138746 1.423623
2006-12-01 00:00:00.000 10584.0 24.0 7602 1.3920821
2007-01-02 00:00:00.000 141284.0 34.0 101246 1.3954526
2007-01-12 02:57:03.997 60416.0 23.0 41700 1.4488249
2007-02-13 00:00:00.000 156270.0 75.0 109875 1.4222525
2007-02-16 00:00:00.000 17770.0 38.0 12325 1.441668
2007-03-05 12:23:00.000 73763.0 3.0 51503 1.43218
2007-03-08 04:11:49.997 16407.0 22.0 11428 1.4355587
2007-03-26 09:10:43.000 76336.0 20.0 53687 1.4218712
2007-04-05 12:31:28.000 64126.0 24.0 40172 1.5962859
2007-04-07 01:11:22.000 9244.0 28.0 6657 1.388405
2007-04-10 00:00:00.000 8924.0 38.0 6140 1.4531835
2007-04-24 21:01:00.000 73487.0 6.0 51689 1.421687
2007-04-26 09:01:48.997 9584.0 25.0 6650 1.441203
2007-04-28 04:09:21.000 9801.0 27.0 7037 1.3925831
2007-05-01 12:55:00.000 8781.0 26.0 6012 1.460336
2007-05-03 00:00:00.000 10570.0 53.0 7298 1.4481436
2007-05-04 21:49:27.000 12287.0 1.0 8680 1.415553
2007-05-08 06:06:45.997 8202.0 27.0 5511 1.4880261
2007-05-10 00:00:00.000 10920.0 49.0 7973 1.3696225
2007-05-12 00:44:10.000 11375.0 27.0 8223 1.3833151
2007-05-15 10:51:50.000 9453.0 27.0 6516 1.4507366
2007-05-18 08:44:36.997 17930.0 27.0 12651 1.4172792
2007-05-22 00:00:00.000 10089.0 74.0 7260 1.3894781
2007-05-23 21:07:38.000 12286.0 3.0 8604 1.4279405
2007-05-26 03:46:02.000 12287.0 6.0 8545 1.4377487
2007-05-30 21:24:29.997 12287.0 1.0 8663 1.4183308
2007-06-01 18:37:16.000 12287.0 1.0 8401 1.4623899
2007-06-05 00:00:00.000 9255.0 52.0 6491 1.4256008
2007-06-08 22:18:40.000 24574.0 3.0 17047 1.4415439
2007-06-12 09:42:14.997 9550.0 31.0 6410 1.4896272
9200-12-08 09:49:59.997 64286.0 1.0 45408 1.4157417

(150 row(s) affected)

What can I do to get SQL to use this index?

View 4 Replies View Related

FTP Task - StopOnFailure Not Working As I Expect?

Dec 8, 2006

Hi

I'm using an FTP task in a loop to download files from a WAN based FTP server. I've got a script to generate the name of the file I require and place into a variable. Problem is sometimes some of the remote files haven't been published so the FTP component errors and the package fails.

I tried setting StopOnFailure to False - all I get is the following errors[FTP Task] Error: File represented by "User::RemotePath" does not exist.
[FTP Task] Error: Attempt to read message string for 0x80020918 failed with error 0xc02090f3. Make sure all message related files are registered.


What I want to do is ignore the error and perform the next loop iteration

Is this a bug, or am I missing something

Dave

View 7 Replies View Related

Service Broker Doesn't Produce What I Expect [Please Read]

Aug 4, 2006

Hi,

I made a simple service broker code that is:

-- step 1: Enable Broker

use master

alter database AdventureWorks

set enable_broker

go



-- step 2: prepare

use AdventureWorks

go

create schema CustomerService

go

create schema EmailService

go



-- step 3: Message Type

create message type [//AdventureWorks/Sales/CustomerDetails]

validation = well_formed_xml

go



-- step 4: Contract

create contract [//AdventureWorks/Sales/SendCustomerDetails]

(

[//AdventureWorks/Sales/CustomerDetails] sent by initiator

)

go



-- step 5: Queue

create queue CustomerService.NewCustomerQueue

go

create queue EmailService.NewCustomerEmailQueue

go



-- step 6: Service

create service [//AdventureWorks/Sales/CustomerService]

on queue CustomerService.NewCustomerQueue

go

create service [//AdventureWorks/Sales/EmailService]

on queue EmailService.NewCustomerEmailQueue

(

[//AdventureWorks/Sales/SendCustomerDetails]

)

go



-- step 7:

create procedure CustomerService.proc_SendMessage

(

@firstName nvarchar(50)

,@lastName nvarchar(50)

,@emailAddress nvarchar(200)

)

as

-- sending a message

declare @message nvarchar(max)

set @message = nchar(0xFEFF)

+ '<Customer>'

+ '<CustomerName>' + @firstName + ' ' + @lastName + '</CustomerName>'

+ '<EmailAddress>' + @emailAddress + '</EmailAddress>'

+ '</Customer>'

declare @conversationHandle uniqueidentifier

begin dialog conversation @conversationHandle

from service [//AdventureWorks/Sales/CustomerService]

to service '//AdventureWorks/Sales/EmailService'

on contract [//AdventureWorks/Sales/SendCustomerDetails]

;send on conversation @conversationHandle

message type [//AdventureWorks/Sales/CustomerDetails]

(

@message

)

go



create procedure CustomerService.proc_ReceiveMessage

as

-- receiving a message

declare @conversationHandle uniqueidentifier, @messageTypeName nvarchar(256)

;receive top(1)

@conversationHandle = conversation_handle

,@messageTypeName = message_type_name

from CustomerService.NewCustomerQueue

if @@rowcount = 0

begin

print 'No further message found in CustomerService.NewCustomerQueue'

end

go

exec CustomerService.proc_SendMessage 'Bishoy','George','bishoy@bishoy.com'

exec CustomerService.proc_ReceiveMessage



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

Now the problem is:

when I execute the 2 procedures I receive:
(0 row(s) affected)
No further message found in CustomerService.NewCustomerQueue



Why doesn't the broker send the message?

Is there any needed preparing should I have done first?



Thank you and best regards.

View 7 Replies View Related

SQLCMD Command Prompt Window Not Functioning Properly

Sep 15, 2007

The MSDN Library topic Using the sqlcmd utility(SQL Server Express) states "To access the sqlcmd utility, click Start, click Run, and type sqlcmd.exe."

A command prompt window opens with "SQLCMD" in the title bar. I cannot enter anything in the command prompt window and the window remains open for only about five or six seconds.

The version I have installed is MS SQL Server 2005 Express with SP2. The cumulative updates package 3 does not list this problem, so I did not install it.

View 1 Replies View Related

SQL Server Admin 2014 :: Manual Failover Of HA Nodes Not Functioning

Jun 29, 2015

I have 3 node HA set up:

-MS Server 2012 R2.
-SQL 2014 EE.
-All windows updates.
-Clean install of both OS and SQL, all 3 nodes are identical.
-SQL Server is running on an alternate port, which I've opened in the firewall. Connections from all network locations are working swimmingly; including connections between all 3 nodes.
-I've got the groups up and running; Listener is set up correctly. Connections work great.
-One node is synchronous, one is asynchronous. Both show synchronized, and synchronizing respectively.
-Data added at the primary node is moved across to all 3 with lightning speed.

When I attempt a manual failover it hangs..and hangs...then pops up an error 41131 and rolls back the failover. Leaving the cluster perfectly intact and working just as it did prior to the failover attempt. What I've checked so far:

-There is absolutely NOTHING in the cluster events log.
-Windows event log shows no errors, just the standard stuff of the primary nodes state changing from primary to resolving and then back again.
-SQL Event log has a few things in there, but nothing that's leading me to a solution, I've attached the log from start to finish on an attempted manual failover:

View 8 Replies View Related

Reporting Services :: SSRS - SharePoint Integrated Mode - Reports Are Not Functioning

Jul 8, 2015

We have a Report Server integrated with SharePoint. A month ago we deployed a report (rdl file) in SharePoint, but the person who deployed it was no longer connected with us. So we decided to deactivate it in our Active Directory. Yesterday, our users returned issues regarding they are unable to access their report. I believe the issue was "object reference not set to an instance of an object".

So I tried to download the rdl file and redeployed it but i am getting error upon deploying to SharePoint. My workaround is to delete the rdl file in SharePoint, redeploy the shared datasource and shared datasets and the rdl file. It went and was now able to run the report in SharePoint.

Is there something relation/happened when deactivating the account in AD that users unable to access the report in SharePoint?

View 2 Replies View Related

Table Visibility Not Functioning Correctly On Server, Works Fine In Visual Studio

Feb 13, 2007

I have a report problem. I'm using a parameter to dynamically control visibility for two tables. If the parameter is set to one value, I want to switch one of the tables to invisible, if the parameter is set to another, I want the other table to be invisible instead.

This all works fine in Visual Studio. When I publish it to my report server, the visibility controls no longer function and both tables always display. Any ideas here?

I'm running 2005, SP2 CTP.

View 4 Replies View Related

Full Text Search Indexing HTML - Does The Filter Expect Certain Tags To Be Present As Standard?

Jul 10, 2007

Hi, I was wondering if any SQL Server gurus out there could help me...I
have a table which contains text resources for my application. The text
resources are multi-lingual so I've read that if I add a html language
indicator meta tag e.g.<META NAME="MS.LOCALE" CONTENT="ES">and
store the text in a varbinary column with a supporting Document Type
column containing ".html" of varchar(5) then the full text index
service should be intelligent about the language word breakers it
applies when indexing the text. (I hope this is correct technique for
best multi-lingual support in a single table?)However, when I come to query this data the results always return 0 rows (no errors are encountered). e.g.DECLARE @SearchWord nvarchar(256)SET @SearchWord = 'search' -- Yes, this word is definitely present in my resources.SELECT * FROM Resource WHERE CONTAINS(Document, @SearchWord)I'm a little puzzled as Full Text search is working fine on another table that employs an nvarchar column (just plain text, no html).Does the filter used for full text indexing of html expect certain tags to be present as standard? E.g. <html> and <body> tags? At present the data I have stored might look like this (no html or body wrapping tags):Example record 1 data: <META NAME="MS.LOCALE" CONTENT="EN">Search for keywords:Example record 2 data: <META NAME="MS.LOCALE" CONTENT="EN">Sorry no results were found for your search.etc.Any pointers / suggestions would be greatly appreciated. Cheers,Gavin.UPDATE: I have tried wrapping the text in more usual html tags and re-built the full text index but I still never get any rows returned for my query results. Example of content wrapping tried - <HTML><HEAD><META NAME="MS.LOCALE" CONTENT="EN"></HEAD><BODY>Test text.</BODY></HTML>I've also tried stripping all html tags from the content and set the Document Type column = .txt but I still get no rows returned?!? 

View 1 Replies View Related

Full Text Search Indexing HTML - Does The Filter Expect Certain Tags To Be Present As Standard?

Jul 11, 2007

Hi, I was wondering if any SQL Server gurus out there could help me...

I have a table which contains text resources for my application. The text resources are multi-lingual so I've read that if I add a html language indicator meta tag e.g.
<META NAME="MS.LOCALE" CONTENT="ES">
and store the text in a varbinary column with a supporting Document Type column containing ".html" of varchar(5) then the full text index service should be intelligent about the language word breakers it applies when indexing the text. (I hope this is correct technique for best multi-lingual support in a single table?)

However, when I come to query this data the results always return 0 rows (no errors are encountered). e.g.
DECLARE @SearchWord nvarchar(256)
SET @SearchWord = 'search' -- Yes, this word is definitely present in my resources.
SELECT * FROM Resource WHERE CONTAINS(Document, @SearchWord)

I'm a little puzzled as Full Text search is working fine on another table that employs an nvarchar column (just plain text, no html).

Does the filter used for full text indexing of html expect certain tags to be present as standard? E.g. <html> and <body> tags? At present the data I have stored might look like this (no html or body wrapping tags):

Example record 1 data: <META NAME="MS.LOCALE" CONTENT="EN">Search for keywords:

Example record 2 data: <META NAME="MS.LOCALE" CONTENT="EN">Sorry no results were found for your search.

etc.

Any pointers / suggestions would be greatly appreciated. Cheers,
Gavin.

UPDATE: I have tried wrapping the text in more usual html tags and re-built the full text index but I still never get any rows returned for my query results. Example of content wrapping tried - <HTML><HEAD><META NAME="MS.LOCALE" CONTENT="EN"></HEAD><BODY>Test text.</BODY></HTML>

I've also tried stripping all html tags from the content and set the Document Type column = .txt but I still get no rows returned?!?

View 1 Replies View Related







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