Unexpected Exceptions In SQL/COM+ Since Converting To VS 2005

Nov 11, 2005

We are running a COM+ DLL that handles transactions and security with a SQL Server back-end.  This project was started in VS 2003, but we just converted it to VS 2005.  Since the conversion, creating a number of transactions in a row generates errors at consistent, but moving, locations in the code (i.e. the location where the failure occurs changes when I do things such as add additional try/catch statements, so it is not random but also clearly not associated with any particular line of code).

View 8 Replies


ADVERTISEMENT

SQLServer JDBC Exceptions :Controlling Exceptions Text Format

Sep 28, 2006

Hi,

Using RAISERROR from within a stored prcedure will result in a SQLException being thrown at the client side of a JDBC connection.
I am trying to provide a meaningfull error message to be shown to the end user. However, all exceptions thrown will inevitably start with : "[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]". The following questions then arise :

- Is there a way of configuring SQL Server not to display this header ?

alternatively,

- Is there another way of conveying error messages to the client through JDBC ?

Thank you for your answers,
Ben

View 1 Replies View Related

Strange Exceptions With Views Usings Casts On 2005 (worked Fine On Sql2k)

Apr 3, 2007

I have views that cast the data into data types.



On 2005 when retrieving the views using a where clause i get errors. I have put together an example below that illustrates the error.



CREATE TABLE TestData ( Id VARCHAR(10), [Description] VARCHAR(20), [Type] INT)

CREATE TABLE TestTypeLookup( [Type] INT, [Description] VARCHAR(20))

GO

INSERT INTO TestTypeLookup VALUES (1, 'Type 1')

INSERT INTO TestTypeLookup VALUES (2, 'Type 2')

INSERT INTO TestData VALUES ('AA', 'Description for AA', 1)

INSERT INTO TestData VALUES ('10', 'Description for 10', 2)

INSERT INTO TestData VALUES ('20', 'Description for 20', 2)

GO

CREATE VIEW TestView AS

SELECT TOP 100 PERCENT CAST(Id AS INT) Id, [Description]

FROM TestData

WHERE [Type] = (SELECT TOP 1 [Type] FROM TestTypeLookup WHERE [Description] = 'Type 2')

ORDER BY CAST(Id AS INT)

GO

SELECT * FROM TestView WHERE Id = 10

GO

DROP VIEW TestView

DROP TABLE TestData

DROP TABLE TestTypeLookup

GO

View 11 Replies View Related

SQL 2005 SP2 - Unexpected Results With Snapshot Replication - Should Get An Error

Jun 25, 2007

I am using snapshot replication to copy data from one database to another. I truncate the destination table first. The publisher and the subscriber are different databases on the same server. The data turns into 1 unrecognizable row.



Here is what the source table looks like:
displayTypeID, displayType
1, Title List Formats
2, Title Details
3, Title List Export
4, Pricing Notes
5, clone Mask 001
6, clone Mask 002
7, clone Mask 004
8, clone Mask 008
9, hide From Admin
10, not Common Attr
11, Insert Title
12, title Types



The resulting data looks like this:
DisplayType, displayTypeId
, 1660953600
I see no errors in replication and nothing in the source table looks like bad data that could cause such a malady. I see the problem on two different servers now and identified the source of the problem, the column order is reversed in the source and destination tables. The data types do not even match so I would at the very least expect an error from bcp.

View 2 Replies View Related

Unable To Install SQl Server 2005 SP2 - Unexpected Error

Feb 20, 2007

I am trying to install SQl Server 2005 SP2 but it was throwing an unexpected error when trying to install "setup support files".

O/s: Windows Server 2003 SP1

Product: SQL Server 2005 Standard Edition

Log file shows:

+++++++++++++++++++

=== Verbose logging started: 2/20/2007 16:05:42 Build type: SHIP UNICODE 3.01.4000.2435 Calling process: F:SQL2005sp2hotfix.exe ===
MSI (c) (74:68) [16:05:42:635]: Resetting cached policy values
MSI (c) (74:68) [16:05:42:635]: Machine policy value 'Debug' is 0
MSI (c) (74:68) [16:05:42:635]: ******* RunEngine:
******* Product: C:Program FilesMicrosoft SQL Server90Setup BootstrapCacheSQLSupportx861033SqlSupport.msi
******* Action:
******* CommandLine: **********
MSI (c) (74:68) [16:05:42:635]: Client-side and UI is none or basic: Running entire install on the server.
MSI (c) (74:68) [16:05:42:635]: Grabbed execution mutex.
MSI (c) (74:68) [16:05:42:729]: Cloaking enabled.
MSI (c) (74:68) [16:05:42:729]: Attempting to enable all disabled priveleges before calling Install on Server
MSI (c) (74:68) [16:05:42:745]: Incrementing counter to disable shutdown. Counter after increment: 0
MSI (s) (20:70) [16:05:42:792]: Grabbed execution mutex.
MSI (s) (20:68) [16:05:42:792]: Resetting cached policy values
MSI (s) (20:68) [16:05:42:792]: Machine policy value 'Debug' is 0
MSI (s) (20:68) [16:05:42:792]: ******* RunEngine:
******* Product: C:Program FilesMicrosoft SQL Server90Setup BootstrapCacheSQLSupportx861033SqlSupport.msi
******* Action:
******* CommandLine: **********
MSI (s) (20:68) [16:05:42:792]: Machine policy value 'DisableUserInstalls' is 0
MSI (s) (20:68) [16:05:42:823]: File will have security applied from OpCode.
MSI (s) (20:68) [16:05:42:901]: SOFTWARE RESTRICTION POLICY: Verifying package --> 'C:Program FilesMicrosoft SQL Server90Setup BootstrapCacheSQLSupportx861033SqlSupport.msi' against software restriction policy
MSI (s) (20:68) [16:05:42:901]: SOFTWARE RESTRICTION POLICY: C:Program FilesMicrosoft SQL Server90Setup BootstrapCacheSQLSupportx861033SqlSupport.msi has a digital signature
MSI (s) (20:68) [16:05:43:151]: SOFTWARE RESTRICTION POLICY: C:Program FilesMicrosoft SQL Server90Setup BootstrapCacheSQLSupportx861033SqlSupport.msi is permitted to run at the 'unrestricted' authorization level.
MSI (s) (20:68) [16:05:43:151]: End dialog not enabled
MSI (s) (20:68) [16:05:43:151]: Original package ==> C:Program FilesMicrosoft SQL Server90Setup BootstrapCacheSQLSupportx861033SqlSupport.msi
MSI (s) (20:68) [16:05:43:151]: Package we're running from ==> C:WINDOWSInstaller1348fe1.msi
MSI (s) (20:68) [16:05:43:151]: APPCOMPAT: looking for appcompat database entry with ProductCode '{53F5C3EE-05ED-4830-994B-50B2F0D50FCE}'.
MSI (s) (20:68) [16:05:43:151]: APPCOMPAT: no matching ProductCode found in database.
MSI (s) (20:68) [16:05:43:167]: MSCOREE not loaded loading copy from system32
MSI (s) (20:68) [16:05:43:182]: Opening existing patch 'C:WINDOWSInstaller1553df86.msp'.
MSI (s) (20:68) [16:05:43:182]: Note: 1: 2203 2: C:WINDOWSInstaller1553df86.msp 3: -2147287038
MSI (s) (20:68) [16:05:43:182]: Couldn't find local patch 'C:WINDOWSInstaller1553df86.msp'. Looking for it at its source.
MSI (s) (20:68) [16:05:43:182]: Resolving Patch source.
MSI (s) (20:68) [16:05:43:182]: User policy value 'SearchOrder' is 'nmu'
MSI (s) (20:68) [16:05:43:182]: User policy value 'DisableMedia' is 0
MSI (s) (20:68) [16:05:43:182]: Machine policy value 'AllowLockdownMedia' is 0
MSI (s) (20:68) [16:05:43:182]: SOURCEMGMT: Media enabled only if package is safe.
MSI (s) (20:68) [16:05:43:182]: SOURCEMGMT: Looking for sourcelist for product {EE92F683-5F5C-4970-BB0B-9AC591B60268}
MSI (s) (20:68) [16:05:43:182]: SOURCEMGMT: Adding {EE92F683-5F5C-4970-BB0B-9AC591B60268}; to potential sourcelist list (pcode;disk;relpath).
MSI (s) (20:68) [16:05:43:182]: SOURCEMGMT: Now checking product {EE92F683-5F5C-4970-BB0B-9AC591B60268}
MSI (s) (20:68) [16:05:43:182]: SOURCEMGMT: Media is enabled for product.
MSI (s) (20:68) [16:05:43:182]: SOURCEMGMT: Attempting to use LastUsedSource from source list.
MSI (s) (20:68) [16:05:43:182]: SOURCEMGMT: Trying source \TESTf$cff417a74df5a718124f2a95bdecdc32HotFixSqlSupportFiles.
MSI (s) (20:68) [16:05:43:213]: Note: 1: 2203 2: \TESTf$cff417a74df5a718124f2a95bdecdc32HotFixSqlSupportFilesSqlSupport.msp 3: -2147287037
MSI (s) (20:68) [16:05:43:213]: SOURCEMGMT: Source is invalid due to missing/inaccessible package.
MSI (s) (20:68) [16:05:43:213]: Note: 1: 1706 2: -2147483647 3: SqlSupport.msp
MSI (s) (20:68) [16:05:43:213]: SOURCEMGMT: Processing net source list.
MSI (s) (20:68) [16:05:43:213]: SOURCEMGMT: Trying source \TESTf$a81c0730a34f964148HotFixSqlSupportFiles.
MSI (s) (20:68) [16:05:43:213]: Note: 1: 2203 2: \TESTf$a81c0730a34f964148HotFixSqlSupportFilesSqlSupport.msp 3: -2147287037
MSI (s) (20:68) [16:05:43:213]: SOURCEMGMT: Source is invalid due to missing/inaccessible package.
MSI (s) (20:68) [16:05:43:213]: Note: 1: 1706 2: -2147483647 3: SqlSupport.msp
MSI (s) (20:68) [16:05:43:213]: SOURCEMGMT: Processing media source list.
MSI (s) (20:68) [16:05:44:245]: SOURCEMGMT: Resolved source to: 'SqlSupport.msp'
MSI (s) (20:68) [16:06:14:619]: Note: 1: 1314 2: SqlSupport.msp
MSI (s) (20:68) [16:06:14:619]: Unable to create a temp copy of patch 'SqlSupport.msp'.
MSI (s) (20:68) [16:06:14:619]: Note: 1: 1708
MSI (s) (20:68) [16:06:14:619]: Note: 1: 2729
MSI (s) (20:68) [16:06:14:619]: Note: 1: 2729
MSI (s) (20:68) [16:06:14:619]: Product: Microsoft SQL Server Setup Support Files (English) -- Installation failed.

MSI (s) (20:68) [16:06:14:619]: MainEngineThread is returning 1635
This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
C:Program FilesMicrosoft SQL Server90Setup BootstrapCacheSQLSupportx861033SqlSupport.msi
MSI (c) (74:68) [16:06:14:729]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (74:68) [16:06:14:729]: MainEngineThread is returning 1635
=== Verbose logging stopped: 2/20/2007 16:06:14 ===

+++++++++++++++++++++++

View 168 Replies View Related

Unexpected Error While Removing Backup Files In Sql 2005 Setup

Dec 18, 2007


I was trying an edition upgrade from SQL 2005 standard x64 to SQL 2005 enterprise x64 using the "setup SKUUPGRADE=1" from the command line. The SO is W2003 server R2 enterprise and I have a SQL clustered environment with 2 nodes (active/passive).

I select to upgrade the SQL module and I mark the checkbox for the cluster installation. The installation seems to work properly untill setup is doing the task "removing backup files". Then 2 "unexpected error" message appears as follows. The 2 above windows appear when you click on the help icon.





Link to screen capture

The following is the end of the SQL setup log file:

________________________________________________________________________

Property(S): OutOfDiskSpace = 0
Property(S): OutOfNoRbDiskSpace = 0
Property(S): PrimaryVolumeSpaceAvailable = 0
Property(S): PrimaryVolumeSpaceRequired = 0
Property(S): PrimaryVolumeSpaceRemaining = 0
Property(S): RSVirtualDirectoryManager = Reports
Property(S): RSVirtualDirectoryServer = ReportServer
Property(S): SqlActionManaged = 3
Property(S): SqlStateManaged = 2
Property(S): Sql_sqlSqlUpgradeSequence = 387709900
Property(S): SOURCEDIR = I:Setup
Property(S): SourcedirProduct = {79F1B65E-8FC0-4D03-954D-F9E71C85AEC7}
Property(S): HotfixScript = 1
Property(S): DebugClsid.B2156BC9_6CE8_422F_A957_E99A65256B1D = {A42D1020-AA4C-401D-B7BD-26C333C0D627}
Property(S): SQLBROWSERACCOUNT = HEREISTHEDOMAINheretheclusteraccount
Property(S): ProductToBeRegistered = 1
MSI (s) (84:F8) [00:32:10:598]: Product: Microsoft SQL Server 2005 (64-bit) - Update 'Hotfix 3024 for SQL Server Database Services 2005 (64-bit) ENU (KB000000)' could not be installed. Error code 1603. Additional information is available in the log file C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0024_SV00010-2_SQL.log.
MSI (s) (84:F8) [00:32:10:613]: Note: 1: 1708
MSI (s) (84:F8) [00:32:10:613]: Product: Microsoft SQL Server 2005 (64-bit) -- Installation failed.
MSI (s) (84:F8) [00:32:10:613]: Attempting to delete file C:WINDOWSInstaller75d5c.msp
MSI (s) (84:F8) [00:32:10:613]: Unable to delete the file. LastError = 32
MSI (s) (84:F8) [00:32:10:645]: Cleaning up uninstalled install packages, if any exist
MSI (s) (84:F8) [00:32:10:645]: MainEngineThread is returning 1603
MSI (s) (84:CC) [00:32:10:754]: Destroying RemoteAPI object.
MSI (s) (84:74) [00:32:10:754]: Custom Action Manager thread ending.
=== Logging stopped: 18/12/2007 0:32:10 ===
MSI (c) (34:B4) [00:32:10:832]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (34:B4) [00:32:10:832]: MainEngineThread is returning 1603
=== Verbose logging stopped: 18/12/2007 0:32:10 ===

_______________________________________________________________________

Does anyone have any clue or idea about the possible problem?

View 3 Replies View Related

DB Engine :: Unexpected Update / Delete On OLTP Database In 2005

Jun 17, 2015

We had one of the major issues where one of the table on a heavily used OLTP database seems to have updated the records which were not expected.

Scenario:

We got around more than 12K contracts updated to status expired even though the expiry date is not set to be so:

for E.G : Below table has a column contract status which overnight seems to have updated the values to expired.

Even though the start and expiry date does not follow the logic for above.

We had the above working for past 3 years via a SP scheduled via SQL agent Job which Expire active contracts whose expiration date is less than today's 12:00AM.There has been no change in SP.

How can i track how it happened and what caused it?

View 28 Replies View Related

Update Statement Using Declared Variable Produces Unexpected Results On SQL Server 2005

Aug 7, 2007

We are getting unexpected results from the following update statement when it is executed on SQL Server 2005.


The strange thing is that we get duplicated values for QM_UID (although when run under SQL Server 2000 we don't get duplicated values)


Can anyone explain why this happens or suggest another way of populating this column without using a cursor or adding a temporary autoincrement column and copying the values over?


declare @NextID int;

set @NextID = 1;

update tmp set QM_UID=@NextID, @NextID = @NextID + 1;

select QM_UID, count(*) from tmp group by QM_UID having count(*) > 1 order by QM_UID


QM_UID count(*)

25 2
26 3
27 4
28 4
29 4
30 4
31 4
32 4
33 4
34 4
35 5
36 4
37 4
38 4
39 4
40 3

...



--- Script to replicate problem



-- NB: The number of rows that must be added to tmp before this problem will occur is machine dependant

-- 100000 rows is sufficient on one of our servers but another (faster) server doesn't show the error

-- at 100000 rows but does at 1000000 rows.



-- Create a table

CREATE TABLE tmp (
[QM_ADD_OP] [char](6) DEFAULT '' NOT NULL,
[QM_ADD_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_ADD_TIME] [int] DEFAULT -1 NOT NULL,
[QM_EDIT_OP] [char](6) DEFAULT '' NOT NULL,
[QM_EDIT_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_EDIT_TIME] [int] DEFAULT -1 NOT NULL,
[QM_LOCK_OP] [char](6) DEFAULT '' NOT NULL,
[QM_QUOTE_JOB] [smallint] DEFAULT 0 NOT NULL,
[QM_QUOTE_NUM] [char](12) DEFAULT '' NOT NULL,
[QM_JOB_NUM] [char](12) DEFAULT '' NOT NULL,
[QM_PRJ_NUM] [char](12) DEFAULT '' NOT NULL,
[QM_NUMBER] [char](12) DEFAULT '' NOT NULL,
[QM_REV_NUM] [char](6) DEFAULT '' NOT NULL,
[QM_REV_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_REV_TIME] [int] DEFAULT -1 NOT NULL,
[QM_REV_OPR] [char](6) DEFAULT '' NOT NULL,
[QM_STYLE_CODE] [char](4) DEFAULT '' NOT NULL,
[QM_REP_JOB_NUM] [char](12) DEFAULT '' NOT NULL,
[QM_REP_COLUMN] [smallint] DEFAULT 0 NOT NULL,
[QM_REP_PART] [char](6) DEFAULT '' NOT NULL,
[QM_REP_MODEL] [smallint] DEFAULT 0 NOT NULL,
[QM_REP_TYPE] [smallint] DEFAULT 0 NOT NULL,
[QM_MODEL_QUOTE] [char](12) DEFAULT '' NOT NULL,
[QM_RUN_NUM] [int] DEFAULT 0 NOT NULL,
[QM_SOURCE_QUOTE] [char](12) DEFAULT '' NOT NULL,
[QM_SOURCE_VAR] [smallint] DEFAULT 0 NOT NULL,
[QM_SOURCE_QTY] [char](12) DEFAULT '' NOT NULL,
[QM_SOURCE_PART] [char](6) DEFAULT '' NOT NULL,
[QM_SOURCE_MODEL] [smallint] DEFAULT 0 NOT NULL,
[QM_ORIG_QUOTE] [char](12) DEFAULT '' NOT NULL,
[QM_ORIG_VAR] [smallint] DEFAULT 0 NOT NULL,
[QM_ORIG_QTY] [char](12) DEFAULT '' NOT NULL,
[QM_ORIG_PART] [char](6) DEFAULT '' NOT NULL,
[QM_COPY_JOB] [char](12) DEFAULT '' NOT NULL,
[QM_COPY_COLUMN] [smallint] DEFAULT 0 NOT NULL,
[QM_COPY_J_PART] [char](6) DEFAULT '' NOT NULL,
[QM_COPY_QUOTE] [char](12) DEFAULT '' NOT NULL,
[QM_COPY_VAR] [smallint] DEFAULT 0 NOT NULL,
[QM_COPY_QTY] [char](12) DEFAULT '' NOT NULL,
[QM_COPY_Q_PART] [char](6) DEFAULT '' NOT NULL,
[QM_JOINT_STATUS] [smallint] DEFAULT 0 NOT NULL,
[QM_QUOTE_STATUS] [smallint] DEFAULT 0 NOT NULL,
[QM_JOB_STATUS] [smallint] DEFAULT 0 NOT NULL,
[QM_LIVE_STATUS] [smallint] DEFAULT 0 NOT NULL,
[QM_USER_STATUS] [smallint] DEFAULT 0 NOT NULL,
[QM_DEL_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_IS_CONVERTED] [smallint] DEFAULT 0 NOT NULL,
[QM_PRINTED] [smallint] DEFAULT 0 NOT NULL,
[QM_COPY_RATES] [smallint] DEFAULT 0 NOT NULL,
[QM_IMPORT_UPDATE] [smallint] DEFAULT 0 NOT NULL,
[QM_CRED_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_CRED_TIME] [int] DEFAULT -1 NOT NULL,
[QM_CRED_AMT] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_CRED_OP] [char](6) DEFAULT '' NOT NULL,
[QM_HELD] [smallint] DEFAULT 0 NOT NULL,
[QM_PROOF] [char](12) DEFAULT '' NOT NULL,
[QM_DELIV_METHOD] [char](12) DEFAULT '' NOT NULL,
[QM_ART_METHOD] [char](12) DEFAULT '' NOT NULL,
[QM_DES_TYPE] [smallint] DEFAULT 0 NOT NULL,
[QM_REC_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_REC_TIME] [int] DEFAULT -1 NOT NULL,
[QM_OWN_OP] [char](6) DEFAULT '' NOT NULL,
[QM_RESP_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_RESP_TIME] [int] DEFAULT -1 NOT NULL,
[QM_RESP_OP] [char](6) DEFAULT '' NOT NULL,
[QM_RESP_OP_1] [char](6) DEFAULT '' NOT NULL,
[QM_RESP_OP_2] [char](6) DEFAULT '' NOT NULL,
[QM_RESP_OP_3] [char](6) DEFAULT '' NOT NULL,
[QM_RESP_OP_4] [char](6) DEFAULT '' NOT NULL,
[QM_RESP_OP_5] [char](6) DEFAULT '' NOT NULL,
[QM_RECONTACT] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_REQ_FLAG] [smallint] DEFAULT 0 NOT NULL,
[QM_ORIG_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_ORIG_TIME] [int] DEFAULT -1 NOT NULL,
[QM_PREF_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_PREF_TIME] [int] DEFAULT -1 NOT NULL,
[QM_LATE_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_LATE_TIME] [int] DEFAULT -1 NOT NULL,
[QM_TITLE] [char](72) DEFAULT '' NOT NULL,
[QM_DELIV_CODE] [char](12) DEFAULT '' NOT NULL,
[QM_CLT_SPEC] [char](12) DEFAULT '' NOT NULL,
[QM_TAX_REF] [char](22) DEFAULT '' NOT NULL,
[QM_CONTACT] [char](36) DEFAULT '' NOT NULL,
[QM_PHONE] [char](22) DEFAULT '' NOT NULL,
[QM_FAX] [char](22) DEFAULT '' NOT NULL,
[QM_ORDER] [char](20) DEFAULT '' NOT NULL,
[QM_ORDER_CFM] [smallint] DEFAULT 0 NOT NULL,
[QM_ORDER_REL] [char](6) DEFAULT '' NOT NULL,
[QM_REP] [char](12) DEFAULT '' NOT NULL,
[QM_REP_1] [char](12) DEFAULT '' NOT NULL,
[QM_REP_2] [char](12) DEFAULT '' NOT NULL,
[QM_REP_3] [char](12) DEFAULT '' NOT NULL,
[QM_REP_4] [char](12) DEFAULT '' NOT NULL,
[QM_REP_5] [char](12) DEFAULT '' NOT NULL,
[QM_COORDINATOR] [char](12) DEFAULT '' NOT NULL,
[QM_PRIORITY] [smallint] DEFAULT 0 NOT NULL,
[QM_TYPE_CODE] [char](12) DEFAULT '' NOT NULL,
[QM_GRADE] [smallint] DEFAULT 0 NOT NULL,
[QM_FIN_SIZE_CODE] [char](12) DEFAULT '' NOT NULL,
[QM_FIN_WID] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_FIN_LEN] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_FIN_DEP] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_FIN_GUSS] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_FIN_GSM] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_FIN_UNIT] [char](12) DEFAULT '' NOT NULL,
[QM_ORIENT] [smallint] DEFAULT 0 NOT NULL,
[QM_PROD_CODE] [char](22) DEFAULT '' NOT NULL,
[QM_FIN_GOOD] [char](22) DEFAULT '' NOT NULL,
[QM_CUST_CODE] [char](12) DEFAULT '' NOT NULL,
[QM_CUST_CODE_1] [char](12) DEFAULT '' NOT NULL,
[QM_CUST_CODE_2] [char](12) DEFAULT '' NOT NULL,
[QM_CUST_PROS] [smallint] DEFAULT 0 NOT NULL,
[QM_REQD_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_REQD_TIME] [int] DEFAULT -1 NOT NULL,
[QM_FOLIO] [char](12) DEFAULT '' NOT NULL,
[QM_FOLIO_1] [char](12) DEFAULT '' NOT NULL,
[QM_FOLIO_2] [char](12) DEFAULT '' NOT NULL,
[QM_PACK_QTY] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_USAGE] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_REORDER] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_EACH_WGT] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_WGT_UNIT] [char](12) DEFAULT '' NOT NULL,
[QM_RFQ_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_RFQ_TIME] [int] DEFAULT -1 NOT NULL,
[QM_RFQ_OPR] [char](6) DEFAULT '' NOT NULL,
[QM_SALES_TYPE] [smallint] DEFAULT 0 NOT NULL,
[QM_SALES_SRC] [char](12) DEFAULT '' NOT NULL,
[QM_SALES_RSN] [char](12) DEFAULT '' NOT NULL,
[QM_PROFILE] [char](12) DEFAULT '' NOT NULL,
[QM_JOB_QTY] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_PREV_QTY] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_JOB_UNIT] [char](12) DEFAULT '' NOT NULL,
[QM_PO_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_PO_TIME] [int] DEFAULT -1 NOT NULL,
[QM_PO_OP] [char](6) DEFAULT '' NOT NULL,
[QM_DLY_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_DLY_TIME] [int] DEFAULT -1 NOT NULL,
[QM_QTY_DESP] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_TOTAL_DLY] [int] DEFAULT 0 NOT NULL,
[QM_SCHED_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_SCHED_TIME] [int] DEFAULT -1 NOT NULL,
[QM_CLOSE_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_CLOSE_TIME] [int] DEFAULT -1 NOT NULL,
[QM_INV_NUM] [char](12) DEFAULT '' NOT NULL,
[QM_PACK_NUM] [char](12) DEFAULT '' NOT NULL,
[QM_DOWN_LOAD] [smallint] DEFAULT 0 NOT NULL,
[QM_TRACK_CODE] [char](4) DEFAULT '' NOT NULL,
[QM_TAX_TYPE] [smallint] DEFAULT 0 NOT NULL,
[QM_TAX_CODE] [char](6) DEFAULT '' NOT NULL,
[QM_CURR] [char](6) DEFAULT '' NOT NULL,
[QM_EXCH_RATE] numeric(18,8) DEFAULT 0 NOT NULL,
[QM_UNIT_QTY] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_UNIT_FLAG] [smallint] DEFAULT 0 NOT NULL,
[QM_RUNON_QTY] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_SPEC_QTY] numeric(26,8) DEFAULT 0 NOT NULL,
[QM_CHARGEABLE] [smallint] DEFAULT 0 NOT NULL,
[QM_NC_REASON] [char](22) DEFAULT '' NOT NULL,
[QM_CUST_MKUP] numeric(18,8) DEFAULT 0 NOT NULL,
[QM_JOB_MKUP] numeric(18,8) DEFAULT 0 NOT NULL,
[QM_BROKERAGE] numeric(18,8) DEFAULT 0 NOT NULL,
[QM_CUST_DISC] numeric(18,8) DEFAULT 0 NOT NULL,
[QM_INVOKED_BTNS] [int] DEFAULT 0 NOT NULL,
[QM_IMPORTED] [smallint] DEFAULT 0 NOT NULL,
[QM_IMPORT_RECALC] [smallint] DEFAULT 0 NOT NULL,
[QM_IMPORT_CONVERT] [smallint] DEFAULT 0 NOT NULL,
[QM_BRANCH] [char](6) DEFAULT '' NOT NULL,
[QM_CODE] [char](36) DEFAULT '' NOT NULL,
[QM_TEMPLATE] [smallint] DEFAULT 0 NOT NULL,
[QM_REPEAT_PERIOD] [int] DEFAULT 0 NOT NULL,
[QM_REOPEN_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_CAT_OPTION] [char](16) DEFAULT '' NOT NULL,
[QM_UNIT_ID] [char](10) DEFAULT '' NOT NULL,
[QM_PROD_BRANCH] [char](6) DEFAULT '' NOT NULL,
[QM_UID] [int] DEFAULT 0 NOT NULL,
[QM_AVAIL_DATE] [smalldatetime] DEFAULT ('1900-01-01') NOT NULL,
[QM_AVAIL_TIME] [int] DEFAULT -1 NOT NULL
) ON [PRIMARY]


GO

-- Create an index on the table

CREATE unique INDEX [QM_NUMBER_ORDER] ON tmp([QM_QUOTE_JOB], [QM_NUMBER]) ON [PRIMARY]

GO



-- Populate the table

declare @Counter as int

SET NOCOUNT ON

set @Counter = 1

while @Counter < 100000

begin

insert into tmp (QM_ADD_TIME, QM_NUMBER) values (1,@Counter);

set @Counter = @Counter + 1

end

GO

-- Update QM_UID to a sequential value

declare @NextID int;

set @NextID = 1;

update tmp set QM_UID=@NextID, @NextID = @NextID + 1;



-- Find rows with a duplicate QM_UID (there should be no duplicate)

select QM_UID, count(*) from tmp group by QM_UID having count(*) > 1 order by QM_UID

--drop table tmp



-- output from select @@VERSION

-- Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows NT 5.2 (Build 3790: Service Pack 1)

View 4 Replies View Related

Sql Server 2005 Dev Edition Error - Unexpected Error While Updating Installed Files

Feb 14, 2007

I am attempting to install SQL Server 2005 Developer Edition onto a Windows XP Pro SP2 machine, but unfortunately each time that I attempt to install I receive an error message in the summary log as follows:

Product : Microsoft SQL Server 2005
Product Version: 9.00.1399.06
Install : Failed
Log File : C:Program FilesMicrosoft SQL Server90Setup
Last Action : InstallFinalize
Error String : The setup has encountered an unexpected error while Updating Installed Files.
The error is : Fatal error during installation.
Error Number : 29528

There is probably a simple solution for the issue but unfortunately I am unaware of what it is? I can€™t tell if the issue is specific to registry settings, security, file types, etc€¦ The information below surrounds the error w/in the log, any suggestions would be greatly appreciated?

Thanks, Jennifer

MSI (s) (6C:94) [16:02:23:713]: Executing op: SetTargetFolder(Folder=C:WINNTsystem32)
MSI (s) (6C:94) [16:02:23:713]: Executing op: SetSourceFolder(Folder=1System)
MSI (s) (6C:94) [16:02:23:713]: Executing op: FileCopy(SourceName=sqlctr90.dll,SourceCabKey=sqlctr90.dll.7188DA12_A95E_46B7_8623_9D93B5260E2A,DestName=sqlctr90.dll,Attributes=16384,FileSize=66264,PerTick=32768,,VerifyMedia=1,,,,,CheckCRC=0,Version=2005.90.1399.0,Language=1033,InstallMode=58982400,,,,,,,)
MSI (s) (6C:94) [16:02:23:713]: File: C:WINNTsystem32sqlctr90.dll; To be installed; Won't patch; No existing file
MSI (s) (6C:94) [16:02:23:713]: Source for file 'sqlctr90.dll.7188DA12_A95E_46B7_8623_9D93B5260E2A' is compressed
MSI (s) (6C:94) [16:02:23:713]: Note: 1: 2318 2: C:WINNTsystem32sqlctr90.dll
MSI (s) (6C:94) [16:02:23:713]: Note: 1: 2360
MSI (s) (6C:94) [16:02:23:713]: Note: 1: 2360
MSI (s) (6C:94) [16:02:23:723]: Executing op: CacheSizeFlush(,)
MSI (s) (6C:94) [16:02:23:723]: Executing op: InstallProtectedFiles(AllowUI=0)
MSI (s) (6C:94) [16:02:23:723]: Executing op: ActionStart(Name=CAFTEInstallFTERef.68C6D15C_77E0_11D5_8528_00C04F68155C,,)
MSI (s) (6C:94) [16:02:23:733]: Executing op: CustomActionSchedule(Action=CAFTEInstallFTERef.68C6D15C_77E0_11D5_8528_00C04F68155C,ActionType=1025,Source=BinaryData,Target=InstallFTERef,CustomActionData=C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnFTERef|C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTData)
MSI (s) (6C:2C) [16:02:23:743]: Invoking remote custom action. DLL: C:WINNTInstallerMSI64E.tmp, Entrypoint: InstallFTERef
FTECa.DLL: INFO: FTE: InstallFTERef(), Entering...
FTECa.DLL: INFO: FTE: GetFTERefInstallParams: FTERef : C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTData
FTECa.DLL: INFO: FTE: InstallFTERef: File created: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTDataoiseCHS.txt Size=1000 IDR=1696
.
.
.
.
.
.
FTECa.DLL: INFO: FTE: InstallFTERef: File created: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTData sSVE.xml Size=1035 IDR=1142
FTECa.DLL: INFO: FTE: InstallFTERef: File created: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTDataoiseTHA.txt Size=1036 IDR=697
FTECa.DLL: INFO: FTE: InstallFTERef: File created: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTData sTHA.xml Size=1037 IDR=1142
FTECa.DLL: INFO: FTE: InstallFTERef: File created: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTDataoiseTRK.txt Size=1038 IDR=2224
MSI (s) (6C:94) [16:02:24:454]: Executing op: ActionStart(Name=Rollback_UpdateETWMOFWithGUID.D20239D7_E87C_40C9_9837_E70B8D4882C2,Description=Removing registry updates,)
FTECa.DLL: INFO: FTE: InstallFTERef: File created: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLFTData sTRK.xml Size=1039 IDR=1142
MSI (s) (6C:94) [16:02:24:454]: Executing op: CustomActionSchedule(Action=Rollback_UpdateETWMOFWithGUID.D20239D7_E87C_40C9_9837_E70B8D4882C2,ActionType=1345,Source=BinaryData,Target=Rollback_UpdateETWMOFWithGUID,CustomActionData=100Removing registry updates100000{2373A92B-1C1C-4E71-B494-5CA97F96AA19}MSSQLSERVERC:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinn)
MSI (s) (6C:94) [16:02:24:454]: Executing op: ActionStart(Name=Do_UpdateETWMOFWithGUID.D20239D7_E87C_40C9_9837_E70B8D4882C2,Description=Updating Installed Files,)
MSI (s) (6C:94) [16:02:24:454]: Executing op: CustomActionSchedule(Action=Do_UpdateETWMOFWithGUID.D20239D7_E87C_40C9_9837_E70B8D4882C2,ActionType=1025,Source=BinaryData,Target=Do_UpdateETWMOFWithGUID,CustomActionData=010Updating Installed Files100000{2373A92B-1C1C-4E71-B494-5CA97F96AA19}MSSQLSERVERC:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinn)
MSI (s) (6C:10) [16:02:24:464]: Invoking remote custom action. DLL: C:WINNTInstallerMSI64F.tmp, Entrypoint: Do_UpdateETWMOFWithGUID
<Func Name='LaunchFunction'>
Function=Do_UpdateETWMOFWithGUID
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='203'>
Doing Action: Do_UpdateETWMOFWithGUID
PerfTime Start: Do_UpdateETWMOFWithGUID : Tue Feb 13 16:02:24 2007
<Func Name='Do_UpdateETWMOFWithGUID'>
Calling installSqlEvent Trance
The arguments that are passed to InstallSqlEventTrace are InstanceName: MSSQLSERVER , ProductCodeL: {2373A92B-1C1C-4E71-B494-5CA97F96AA19} , BinPath: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinn
INFO: Checking installed version
INFO: Writing MOF file
ERROR: Unable to open registry key: HRESULT = 0x80070005, Key = SYSTEMCurrentControlSetControlWMISecurity

The value returned is -2147024891
<EndFunc Name='Do_UpdateETWMOFWithGUID' Return='1603' GetLastError='0'>
PerfTime Stop: Do_UpdateETWMOFWithGUID : Tue Feb 13 16:02:24 2007
Gathering darwin properties for failure handling.
Error Code: 1603
MSI (s) (6C!D0) [16:02:37:273]: Product: Microsoft SQL Server 2005 -- Error 29528. The setup has encountered an unexpected error while Updating Installed Files. The error is: Fatal error during installation.

Error 29528. The setup has encountered an unexpected error while Updating Installed Files. The error is: Fatal error during installation.

<EndFunc Name='LaunchFunction' Return='1603' GetLastError='203'>
MSI (s) (6C:94) [16:02:37:283]: User policy value 'DisableRollback' is 0
MSI (s) (6C:94) [16:02:37:283]: Machine policy value 'DisableRollback' is 0
Action ended 16:02:37: InstallFinalize. Return value 3.

View 8 Replies View Related

Converting SQL Express 2005 To MSSQL 2005 Database

Jul 14, 2007

Hello, im shure this must have been up before and i apologize for that. But i wonder if there is a way to convert the SQL server express databases to MSSQL 2005 databses?

View 3 Replies View Related

SQL Server 2005 Install Error (Error 29528. Unexpected Error While Installing Performance Counters. )

Jun 12, 2007

I'm currently receiving the following error message whilst attempting to install SQL Server 2005 Standard Edition on Windows Server 2003 (32 Bit):
Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

This server already has an install of SQL Server 2000 as the default instance. I'm attempting to install a new named instance of SQL Server 2005.

Extract from log:

<Func Name='LaunchFunction'>
Function=Do_sqlPerfmon2
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='0'>
Doing Action: Do_sqlPerfmon2
PerfTime Start: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
<Func Name='Do_sqlPerfmon2'>
<EndFunc Name='Do_sqlPerfmon2' Return='0' GetLastError='2'>
PerfTime Stop: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
MSI (s) (4C:FC) [10:20:02:833]: Executing op: ActionStart(Name=Rollback_Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,Description=Removing performance counters,)
<EndFunc Name='LaunchFunction' Return='0' GetLastError='0'>
MSI (s) (4C:FC) [10:20:02:849]: Executing op: CustomActionSchedule(Action=Rollback_Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,ActionType=1281,Source=BinaryData,Target=Rollback_Do_sqlPerfmon2,CustomActionData=100Removing performance counters200000DTSPipelineC:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.INI)
MSI (s) (4C:FC) [10:20:02:849]: Executing op: ActionStart(Name=Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,Description=Installing performance counters,)
MSI (s) (4C:FC) [10:20:02:849]: Executing op: CustomActionSchedule(Action=Do_sqlPerfmon2.D20239D7_E87C_40C9_9837_E70B8D4882C2,ActionType=1025,Source=BinaryData,Target=Do_sqlPerfmon2,CustomActionData=100Installing performance counters200000C:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.INIC:Program FilesMicrosoft SQL Server90DTSBinnDTSPERF.HC:Program FilesMicrosoft SQL Server90DTSBinnDTSPipelinePerf.dllDTSPipeline0DTSPipelinePrfData_OpenPrfData_CollectPrfData_Close)
MSI (s) (4C:94) [10:20:02:864]: Invoking remote custom action. DLL: C:WINDOWSInstallerMSI1683.tmp, Entrypoint: Do_sqlPerfmon2
<Func Name='LaunchFunction'>
Function=Do_sqlPerfmon2
<Func Name='GetCAContext'>
<EndFunc Name='GetCAContext' Return='T' GetLastError='0'>
Doing Action: Do_sqlPerfmon2
PerfTime Start: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
<Func Name='Do_sqlPerfmon2'>
<EndFunc Name='Do_sqlPerfmon2' Return='2' GetLastError='2'>
PerfTime Stop: Do_sqlPerfmon2 : Tue Jun 12 10:20:02 2007
Gathering darwin properties for failure handling.
Error Code: 2
MSI (s) (4C!F0) [10:23:46:381]: Product: Microsoft SQL Server 2005 Integration Services -- Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.Error 29528. The setup has encountered an unexpected error while Installing performance counters. The error is: The system cannot find the file specified.

You can ignore this and it will complete the installation, but subsequently trying to patch with SP2 will fail on the same sections - Hotfix.exe crashes whilst attempting to patch Database Services, Integration Services and Client Components (3 separate crashes).

I've removed SQL Server 2005 elements and tried to re-install, but it's not improved the situation.

Any ideas?

View 3 Replies View Related

Transactions And Exceptions

Nov 1, 2006

if i have a loop that runs through records in a dataset like thisfor(int i=0;i<ds.Tables[0].Rows.Count;++i) and in this loop i have several sql commands that run as a transaction in a try / catch block like : try{ // do stuff}catch{    trans.RollBack();}how can i keep the loop going even if a transaction failed.  So the transaction works for each individual row.  if row 100 fails for whatever i would like the loop to continue running, do i just simply remove the "throw" and it will continue looping ? my catch block currently looks like catch(Exception ex){transaction.Rollback();activity.Log("Transaction aborted, rolling back. Error Message: " + ex.Message + " Stack Trace: " + ex.StackTrace.ToString());throw; }thanks,mcm

View 4 Replies View Related

Unknown Exceptions

Jan 22, 2008

I'm sure that the try part of following code are all executedand the session("isLogin") has set to Truebut it always catch a exceptionand redirect to error1.aspx can't figure it out 1 Try
2 mySqlCon = New SqlConnection(strMySqlCon)
3 mySqlCmd = New SqlCommand(strMySqlCmd, mySqlCon)
4
5 mySqlCon.Open()
6 myDataReader = mySqlCmd.ExecuteReader()
7
8 If myDataReader.Read() = True Then
9
10
11 webPwdMd5 = System.Web.Security.FormsAuthentication. _
12 HashPasswordForStoringInConfigFile(Me.TextBox1.Text, "MD5")
13
14 If webPwdMd5 = myDataReader.Item("password") Then
15 Session("isLogin") = True
16 'Me.TextBox1.Text = "ppp"
17 Response.Redirect("main.aspx")
18 Else
19 Session("islogin") = False
20 Me.Label1.Visible = True
21 End If
22 Else
23 Session("isLogin") = False
24 Me.Label1.Visible = True
25 End If
26
27 mySqlCon.Close()
28
29 Catch Myexception As Exception
30 Session("isLogin") = False
31 Response.Redirect("error1.aspx")
32
33 Finally
34
35 End Try
 

View 2 Replies View Related

Transactions And Exceptions

Dec 10, 2005

I am a novice with SQL, and I am failing to understand an aspect of Transactions.
The following is the code I have created, having referred to a handful of resources including MSDN documentation.
    public void CreateSection(Section section)    {        string sql =             @"INSERT INTO sectiontable (nodeid, title)              VALUES (@nodeid, @title)              SELECT Scope_Identity() FROM sectiontable";        SqlConnection connection = new SqlConnection(this.connectionString);        SqlCommand command = new SqlCommand(sql, connection);        command.Parameters.AddWithValue("@nodeid", section.Node.Id);        command.Parameters.AddWithValue("@title", section.Title);
        connection.Open();        SqlTransaction transaction = connection.BeginTransaction();        try        {            command.Transaction = transaction;            object result = command.ExecuteScalar();            if (result == null)                throw new DataException("Returned identity was invalid.");            section.Id = Convert.ToInt32(result);            transaction.Commit();        }        catch (Exception exception)        {            string message = "Could not create section.";            try            {                transaction.Rollback();                message += " Transaction was reversed.";            }            catch (SqlException booboo)            {                message += " An exception of type " + booboo.GetType();                message += " occurred while attempting to roll back the transaction.";            }            // Note: DataAccessException below is a custom class.            throw new DataAccessException(message, exception);        }        finally        {            connection.Close();        }    }        What seems clumsy is that we must have connection.Open() outside the try-catch block. The following cannot work, because the compiler notes the "Use of unassigned local variable 'transaction'" at the location shown below:
        SqlConnection connection = new SqlConnection(this.connectionString);        SqlTransaction transaction;        try        {            connection.Open();            transaction = connection.BeginTransaction();            // commands execute            transaction.Commit();        }        catch (Exception exception)        {            transaction.Rollback(); // <-- Compiler notes use of unassigned variable.                                    // (First testing the variable does not help.)            // handle exception.        }        finally        {            connection.Close();        }                The following also does not work, as the BeginTransaction() method must be called against an open connection.
        SqlConnection connection = new SqlConnection(this.connectionString);        SqlTransaction transaction = connection.BeginTransaction();        try        {            connection.Open();            // commands execute            transaction.Commit();        }        catch (Exception exception)        {            transaction.Rollback();            // handle exception.        }        finally        {            connection.Close();        }       
So, in MSDN documentation, the connection.Open() method is called outside the try-catch block (as shown in my full code). Yet, that same documentation notes that this method can lead to two types of exceptions. So it seems that the use of transactions forces an exception-throwing method to be used outside of a try-catch block. My question, then: is this unavoidable?

View 3 Replies View Related

Exceptions In Sql Server

Aug 23, 2001

we are converting Informix Stored procedures to SQL Server stored
procedures..
In Informix they have handled the exceptions as shown below,
ON EXCEPTION
LET @l_status = 1;
RETURN @l_delete,@l_status;
END EXCEPTION

We have to convert this to the corresponding SQL server statements..
How to ahbdle exceptions in SQL Server.

View 1 Replies View Related

Exceptions Info

Jan 11, 2007

Vikas writes "can any one help me in getting the list of exceptions and there types and how to tackle them."

View 1 Replies View Related

Migration Exceptions

Nov 29, 2006

Hi,
How should one deal with exceptions generated by the DTS to SSIS conversion wizard in sql server 2005?
Thanks

View 1 Replies View Related

Custom Sql Exceptions Through The CLR

Jan 9, 2006

Friends,

First off, congrats and thank you to everyone at Microsoft for all of the hard work they have put into Sql Server 2005 and .NET 2.0 - it is simply amazing technology.

On that note, I was wondering if it was possible to create my own custom exceptions that I can throw in my stored procedures and then catch in my application code?

For example, say I wanted to create a Custom Sql Exception called "DuplicateEmailInSqlDatabaseTableException" and then, within a stored procedure where data is being attempted to be inserted, I could check for a duplicate email record and then throw the exception.  At that point, I would like to be able to catch that exception in my C# data layer and work from there.

Is this possible?  I feel like it could be but am unsure where to start.

Shaun C McDonnell

View 5 Replies View Related

Self Join- Exceptions

Jan 3, 2008

I am trying to write a query that will only give me the data that is not in both queries. I need a query that will give me the data that is in the first query but not in the second query. I tried a union but that does not work. The date and PosType are important.






SELECT Symbol,PosType,HistDate

FROM EntityView

WHERE Histdate >'01/01/07' and PosType = 'S'

union



SELECT Symbol,PosType,HistDate
FROM EntityView

WHERE Histdate >'01/01/07' and PosType = 'S' and EntityCode = 'HIS'


View 3 Replies View Related

Want To Log CLR Exceptions In SQL Table

Jul 22, 2006

So I have some SQLCLR stored procedures, that use some .NET classes. I have a table in the database for exceptions, and I want to log all exceptions (except SqlExceptions of course) to that table.

I have the following example:



public partial class UserDefinedFunctions

{



[Microsoft.SqlServer.Server.SqlFunction(FillRowMethodName = "FillRow2", DataAccess = DataAccessKind.None, SystemDataAccess = SystemDataAccessKind.Read,



TableDefinition = "fld_colname NVARCHAR(4000)")]

public static IEnumerable ExceptionTest()

{

// Some example from a website

List<string> names = new List<string>();

using (SqlConnection connection = new SqlConnection("context connection=true"))

{

connection.Open();

SqlCommand sqlCommand = connection.CreateCommand();

sqlCommand.CommandText = "select NAME from dbo.SYSCOLUMNS";

SqlDataReader sqlDataReader = sqlCommand.ExecuteReader(); // No exceptions

while (sqlDataReader.Read())

{

names.Add(sqlDataReader.GetValue(0).ToString()); // This works fine

}

Exception e = new Exception("foo");

MyExceptionLoggingClass.Log(e,connection); // This doesn't

}

return names;

}

public static void FillRow2(object row, out string str2)

{

str2 = (string)row;

}

}



public class MyExceptionLoggingClass

{

public static void Log(Exception ex, SqlConnection conn)

{

LogException(ex, conn);

}

private static void LogException(Exception ex, SqlConnection connection)

{



SqlCommand cmd = new SqlCommand("LogException", connection);



cmd.CommandType = System.Data.CommandType.StoredProcedure;



SqlParameter param = new SqlParameter("@message", ex.Message);

cmd.Parameters.Add(param);

param = new SqlParameter("@stackTrace", "test");

cmd.Parameters.Add(param);

param = new SqlParameter("@localtime", DateTime.UtcNow);

cmd.Parameters.Add(param);

try

{

cmd.ExecuteNonQuery(); // always throws IOE, as does SqlContext.Pipe.ExecuteAndSend(cmd);

}

catch (InvalidOperationException)

{

return;

}



}



The exception is: _COMPlusExceptionCode = -532459699 (couldn't find anything useful on that)



Ideally I don't want to be passing the connection to my class all the time, which is why I wanted to have overloaded methods, some that take the connection, others that don't, and open their own. Neither scenario works unfortunately.

If I run the code under LogException in my caller class (ExceptionTest) it works fine (I mean doesn't throw this exception, but I can't call from a SqlFunction - different issue, SQLCLR restriction).

I've been trying to debug this for a while now, and I'm running out of ideas, so any suggestion(s) would be highly appreciated.



Thanks!

View 17 Replies View Related

DateTime Comparison With Some Exceptions

Dec 26, 2006

I have StratDateTime and EndDateTime fields in the table. I need to compare this two datetime fields and find seconds. I can use DateDiff but there are the following exceptions:
1. Exclude seconds coming from the date which are Saturday and Sunday  
2. Exclude seconds coming from time range between 7:01pm and 6:59am
3. Exclude seconds coming from Jan 1st and Jul 4th.
How can I do this?

View 3 Replies View Related

Handling SQL Exceptions In CLR Transaction

Sep 28, 2007

Hi there,

We are running into problems using CLR stored procedure in SQL Server 2005.
We are using a transaction scope (ambient transaction).
If an SQL exception with class 16 is thrown, and this exception is directly caught (and handled) then the transaction is somehow no longer valid.
Subsequent use of this transaction gives the message "The current transaction cannot be committed and cannot support operations that write to the log file. Rollback the transaction".

Is there a way to gracefully handle the SqlException and continue the transaction?

Regards,

Frans Z. and Rine le C.



View 1 Replies View Related

Exceptions On SqlDependency.Stop?

Jan 3, 2008

To preface, I am trying to get a notification in a client side app from SQL Server 2005 (Express) when a datatable changes. The problem is I am getting these exceptions and I have no idea what is causing them, if it is a serious problem, or how to debug it from here.

Here is the setup:

I am working with SqlDependency in .NET 2.0 and running a simple app that just calls start and stop on the dependency object. The result is 3 exceptions in System.Data.Dll


A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll

Additional information: A severe error occurred on the current command. The results, if any, should be discarded.

Operation cancelled by user.


A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll

Additional information: A severe error occurred on the current command. The results, if any, should be discarded.'

Operation cancelled by user.


A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll

Additional information: A severe error occurred on the current command. The results, if any, should be discarded.

Operation cancelled by user.

To duplicate this problem, do the following:

1) Create a database on SQL Server 2005 Express
2) Make sure the database has "ENABLE_BROKER" set.
(ALTER DATABASE <DataBase> SET ENABLE_BROKER).

3) Turn on CLR exceptions in your debugger (debug->Exceptions->Common Language Runtime Exceptions)

4) Create a C# windows app. Add the following in form1_load.

string connectstring = "Server=<SERVER>;Integrated security=true;database=<DATABASE>";

SqlDependency.Start(connectstring);

SqlDependency.Stop(connectstring);

5) Add using System.Data.SqlClient at the top of form1.cs
6) Run the app.

-Kent

View 4 Replies View Related

Wiered Exceptions In Log Files

May 26, 2007

HI everyone,

I have written security extension for forms authentication. Apparantly every thing is working fine, I can log on to the report server, view reports, etc without any problem. But i see few exceptions in my log files. The following log was generated even before i logged on to the reporting service:

<Header>
<Product>Microsoft SQL Server Reporting Services Version 9.00.3042.00</Product>
<Locale>en-US</Locale>
<TimeZone>West Asia Standard Time</TimeZone>
<Path>C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesReportServer__05_26_2007_18_04_56.log</Path>
<SystemName>NAVEEDSIDDIQUI</SystemName>
<OSName>Microsoft Windows NT 5.1.2600 Service Pack 2</OSName>
<OSVersion>5.1.2600.131072</OSVersion>
</Header>
aspnet_wp!webserver!1e!5/26/2007-18:04:57:: i INFO: Reporting Web Server started
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing ConnectionType to '1' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing IsSchedulingService to 'True' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing IsNotificationService to 'True' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing IsEventService to 'True' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing PollingInterval to '10' second(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing WindowsServiceUseFileShareStorage to 'False' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing MemoryLimit to '60' percent as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing RecycleTime to '720' minute(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing MaximumMemoryLimit to '80' percent as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing MaxQueueThreads to '0' thread(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing IsWebServiceEnabled to 'True' as specified in Configuration file.
aspnet_wp!configmanager!1e!5/26/2007-18:04:57:: w WARN: WebServiceAccount is not specified in the config file. Using default: NAVEEDSIDDIQUIASPNET
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing MaxScheduleWait to '5' second(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing ProcessRecycleOptions to '0' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing RunningRequestsAge to '30' second(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing DailyCleanupMinuteOfDay to default value of '120' minutes since midnight because it was not specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing WatsonFlags to '1064' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing WatsonDumpOnExceptions to 'Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException,Microsoft.ReportingServices.Modeling.InternalModelingException' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing WatsonDumpExcludeIfContainsExceptions to 'System.Data.SqlClient.SqlException,System.Threading.ThreadAbortException' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing SecureConnectionLevel to '0' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing DisplayErrorLink to 'True' as specified in Configuration file.
aspnet_wp!library!1e!5/26/2007-18:04:57:: i INFO: Initializing WebServiceUseFileShareStorage to 'False' as specified in Configuration file.
aspnet_wp!resourceutilities!1e!5/26/2007-18:04:57:: i INFO: Reporting Services starting SKU: Developer
aspnet_wp!resourceutilities!1e!5/26/2007-18:04:57:: i INFO: Evaluation copy: 0 days left
aspnet_wp!runningjobs!1e!5/26/2007-18:04:57:: i INFO: Database Cleanup (Web Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds
aspnet_wp!runningjobs!1e!5/26/2007-18:04:57:: i INFO: Running Requests Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
aspnet_wp!runningjobs!1e!5/26/2007-18:04:57:: i INFO: Running Requests DB timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
aspnet_wp!runningjobs!1e!5/26/2007-18:04:57:: i INFO: Memory stats update timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
aspnet_wp!library!1e!05/26/2007-18:04:58:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!1e!05/26/2007-18:05:06:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!1e!05/26/2007-18:05:06:: i INFO: Catalog SQL Server Edition = Developer
aspnet_wp!library!1e!05/26/2007-18:05:07:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!1e!05/26/2007-18:05:07:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!1!05/26/2007-18:05:19:: Call to GetPermissionsAction(/).
aspnet_wp!library!1!05/26/2007-18:05:19:: Call to GetPropertiesAction(/, PathBased).
aspnet_wp!library!1!05/26/2007-18:05:20:: Call to GetSystemPermissionsAction().
aspnet_wp!library!1!05/26/2007-18:05:20:: Call to ListChildrenAction(/, False).
aspnet_wp!library!1!05/26/2007-18:05:20:: Call to GetSystemPropertiesAction().
aspnet_wp!library!1!05/26/2007-18:05:20:: Call to GetSystemPropertiesAction().
aspnet_wp!library!c!05/26/2007-18:05:29:: Call to GetPermissionsAction(/Reports).
aspnet_wp!library!c!05/26/2007-18:05:29:: Call to GetPropertiesAction(/Reports, PathBased).
aspnet_wp!library!c!05/26/2007-18:05:29:: Call to GetSystemPermissionsAction().
aspnet_wp!library!c!05/26/2007-18:05:29:: Call to ListChildrenAction(/Reports, False).
aspnet_wp!library!c!05/26/2007-18:05:29:: Call to GetSystemPropertiesAction().
aspnet_wp!library!c!05/26/2007-18:05:29:: Call to GetSystemPropertiesAction().
aspnet_wp!library!1!05/26/2007-18:05:32:: Call to GetPermissionsAction(/Reports/Balance).
aspnet_wp!library!1!05/26/2007-18:05:32:: Call to GetSystemPropertiesAction().
aspnet_wp!library!1!05/26/2007-18:05:32:: Call to GetPropertiesAction(/Reports/Balance, PathBased).
aspnet_wp!library!1!05/26/2007-18:05:33:: Call to GetSystemPermissionsAction().
aspnet_wp!library!1!05/26/2007-18:05:33:: Call to GetPropertiesAction(/Reports/Balance, PathBased).
aspnet_wp!library!1!05/26/2007-18:05:34:: Call to ListEventsAction().
aspnet_wp!library!1!05/26/2007-18:05:34:: Unhandled exception was caught: System.Web.HttpParseException: Could not load type 'Vantage.VantageILM.RSExtensionLibrary.Logon'. ---> System.Exception: Could not load type 'Vantage.VantageILM.RSExtensionLibrary.Logon'. ---> System.Exception: Could not load type 'Vantage.VantageILM.RSExtensionLibrary.Logon'. ---> System.Web.HttpException: Could not load type 'Vantage.VantageILM.RSExtensionLibrary.Logon'.
at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)
at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)
at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
--- End of inner exception stack trace ---
at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
at System.Web.UI.PageParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.TemplateControlParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.PageParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.TemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
--- End of inner exception stack trace ---
at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
--- End of inner exception stack trace ---
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
at System.Web.UI.TemplateParser.ParseInternal()
at System.Web.UI.TemplateParser.Parse()
at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
aspnet_wp!library!1!05/26/2007-18:05:34:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.Web.HttpParseException: Could not load type 'Vantage.VantageILM.RSExtensionLibrary.Logon'. ---> System.Exception: Could not load type 'Vantage.VantageILM.RSExtensionLibrary.Logon'. ---> System.Exception: Could not load type 'Vantage.VantageILM.RSExtensionLibrary.Logon'. ---> System.Web.HttpException: Could not load type 'Vantage.VantageILM.RSExtensionLibrary.Logon'.
at System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)
at System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)
at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
--- End of inner exception stack trace ---
at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
at System.Web.UI.PageParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
at System.Web.UI.TemplateParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.TemplateControlParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.PageParser.ProcessMainDirective(IDictionary mainDirective)
at System.Web.UI.TemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.PageParser.ProcessDirective(String directiveName, IDictionary directive)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
--- End of inner exception stack trace ---
at System.Web.UI.TemplateParser.ProcessException(Exception ex)
at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
--- End of inner exception stack trace ---
at System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
at System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath)
at System.Web.UI.TemplateParser.ParseInternal()
at System.Web.UI.TemplateParser.Parse()
at System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType()
at System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider)
at System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders()
at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)
at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
--- End of inner exception stack trace ---
aspnet_wp!library!1!05/26/2007-18:06:05:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!1!05/26/2007-18:06:05:: Call to GetSystemPropertiesAction().
aspnet_wp!library!c!05/26/2007-18:09:02:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!c!05/26/2007-18:09:36:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!c!05/26/2007-18:09:36:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!c!05/26/2007-18:10:07:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!16!5/26/2007-18:14:57:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
aspnet_wp!library!a!05/26/2007-18:19:58:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!a!05/26/2007-18:20:29:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!a!05/26/2007-18:20:29:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!a!05/26/2007-18:21:00:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!16!5/26/2007-18:24:57:: i INFO: Cleaned 0 batch records, 0 policies, 0 sessions, 0 cache entries, 0 snapshots, 0 chunks, 0 running jobs, 0 persisted streams
aspnet_wp!library!1e!05/26/2007-18:27:16:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!1e!05/26/2007-18:27:17:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!1e!05/26/2007-18:27:17:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!1e!05/26/2007-18:27:17:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!1e!05/26/2007-18:27:49:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---
aspnet_wp!library!1e!05/26/2007-18:27:49:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!library!1e!05/26/2007-18:27:49:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., ;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.ReportingServices.WebServer.WebServiceHelper.ConstructRSServiceObjectFromSecurityExtension()
at Microsoft.ReportingServices.WebServer.Global.ConstructRSServiceFromRequest(String item)
at Microsoft.ReportingServices.WebServer.Global.get_Service()
at Microsoft.ReportingServices.WebServer.Global.DispatchRequest(Boolean& transferedToViewerPage)
at Microsoft.ReportingServices.WebServer.Global.Application_AuthenticateRequest(Object sender, EventArgs e)
--- End of inner exception stack trace ---


In the above logs, only the highlighted area points to my code. Although i dont know why this exception is coming as i have the dll in the bin folder, and the CodeBehind attribute in the logon.aspx field is correct. But i have no clue about the rest of the exceptions. I tried attaching the debugger with aspnet_wp process, but that doesnt help either. Please help me in this regard.



Thanks

Naveed

View 4 Replies View Related

Logging Exceptions In SSIS

Apr 24, 2007

Hello Everyone,



I have written a custom task which writes the details of an error in the windows event log.



I use the on error event to invoke this task.



To simulate the error I try to convert a string into a number. I see that there are multiple as many as 6 messges with different error codes being logged into the windows event log.



They vary from something tangible like number conversion failed to obsure things like thread was being aborted.



Is this normal? to see multiple messages for one type of error.



Can I control this, so that only one message is sent into the windows event log.



(reason is that we have a monitoring software which may raise multiple admin alerts for the same issue).



Thanks for your help in advance.



regards,

Abhishek.

View 3 Replies View Related

Catching SQL Exceptions For ConnStrings In Web.Config

Aug 25, 2006

Hi,I have a connection string in my web.config - to which I then refer to in my code through all my controls, they're all databound to it.Anyway - how do I catch any errors - such as when I want to view the website on a train, if I'm working on it.I don't want it to crash and burn [the site, not the train] - if I dont have access to the sql server.How can I wrap it in a try block!?- How do i then deal with controls which refer to the connection string?One solution I thought of - is to programmatically set all the databinding - and not just with the GUI. As that way I can wrap everything in a try{}catch{} block.Any other - site-wide way of doing this?Thank you,R

View 2 Replies View Related

Catching SqlDataSource Connection Exceptions?

Feb 14, 2008

Got a weekly problem when our ISeries DB goes down for maintenence i get ODBC connection errors when the SqlDataSource tries to connect.  Is there a method I can use to catch the exception?  If so, what event from SqlDataSource can i use, and what approach should I take?Thanks in advance! 

View 2 Replies View Related

Question About SQL Server Errors/exceptions

Jul 21, 2004

In SQL Profiler, I see Exception records with a TextData entry like:
Error: 2601, Severity: 14, State: 3

There is no other error text for that entry and there are no corresponding log entries. When I look up the help for error 2601, I see:

Message Text:
Cannot insert duplicate key row in object '%.*ls' with unique index '%.*ls'.

That's obviously a C sprintf format string. I would expect to see the resulting formatted text somewhere. Where would I find detail on these errors?

View 6 Replies View Related

Exceptions In Data Flow Scripts

Dec 20, 2006



What is the "correct" way of dealing with exceptions in a data flow script component. i.e. am I supposed to catch all exceptions and then set some failure flag? The reason I ask is I've got a script in a dataflow which is occasionally throwing exceptions when trying to convert an empty string to a decimal. Problem was the package locked up and had to be terminated when the exception was thrown (and not caught in the script)?

The only thing which differentiates this package from others I've created is the data flow has a conditional split which creates 2 seperate paths loading 2 seperate SQL tables - the exception is being thrown in a script on one branch which seems to hand the entire flow

PS I have fixed the script so this doesn't happen, i.e. test if the input string is String.Empty and if so set the _IsNull property.

View 7 Replies View Related

Error Messages Versus Exceptions

Jan 19, 2008

I am using .NET v2.0 and SqlServer2005 SB in 90 compatibility mode.

From my brief experience it appears that if I try to subscribe to SB with incorrect SQL or wrong names .NET will immediately throw an exception. However, if my code is correct but there is an error on the server (for example incorrect options as per http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=883992&SiteID=1) then SB will immediately fire the notification message but with €œerror€? instead of €œupdate€? content. How do I detect this?

My code is based on the http://msdn2.microsoft.com/en-us/library/3ht3391b(vs.80).aspx example. (I had too much trouble with the SqlDependency class, including overflowing error logs. So unlike the post at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=903713&SiteID=1 I am NOT receiving an SqlNotificationEventArgs object. I wish I were getting one!) I€™ve included my Listen() method below.

The debug portion of this code gives me message body that looks like the following when everything is good. What should it look like, if for example my SET OPTIONS (first link above) were wrong?

messageBody: <qn:QueryNotification xmlns:qn="http://schemas.microsoft.com/SQL/Notifications/QueryNotification" id="129" type="change" source="data" info="update" database_id="23" sid="0xF4F50461FD43CA4191A1173B9350632A"><qn:Message>7fd415c7-2986-411d-abfd-615cbce0af28</qn:Message></qn:QueryNotification>

Thanks. Code follows:


private void Listen()
{
// infinite loop on this thread: keep listening even after
// receiving notification
while( true )
{
// connects to SqlServer queue and sleeps until a notification msg arrives
using( SqlConnection conn = new SqlConnection( _connect ) )
{
WriteMessage( "RequestNotification: Listen connection opened." );
using( SqlCommand cmd = conn.CreateCommand() )
{
int msgBodyId = InvalidSubscriptionId;
cmd.CommandText = waitFor;
cmd.CommandTimeout = 0; // _notificationTimeout + 100;
try
{
conn.Open();
// the thread is blocked until the waitfor event occurs.
SqlDataReader reader = cmd.ExecuteReader();
// the waitfor has triggered when we've reached here.
WriteMessage( "RequestNotification: Notification received." );
// there may be mulitple notifications waiting, but there seems only
// ever to be a single record to read, but we still use the while
// construct to ensure we get them all...
while( reader.Read() )
{
// the messageBody is actually XML with a GUID embedded as the msgId, eg:
// <qn:Message>82120744-f2bf-4c62-a17c-867cc6eb040e</qn:Message>
String messageBody = FixupMessageText( System.Text.ASCIIEncoding.ASCII.GetString( (byte[]) reader.GetValue( 13 ) ).ToString() );
msgBodyId = MessageBodyId( messageBody );
// doesn't work, sqlbinary...
// String messageBody = reader.GetSqlXml( 13 ).ToString();
#if __dbg
// used for debugging
// messageText = System.Text.ASCIIEncoding.ASCII.GetString( (byte[]) reader.GetValue( 13 ) ).ToString();
Byte status = reader.GetByte( 0 );
Byte priority = reader.GetByte( 1 );
Int64 queuingOrder = reader.GetInt64( 2 );
Guid conversationGroupId = reader.GetGuid( 3 );
Guid conversationHandle = reader.GetGuid( 4 );
Int64 messageSeqNo = reader.GetInt64( 5 );
String serviceName = reader.GetString( 6 );
Int32 serviceId = reader.GetInt32( 7 );
String serviceContractName = reader.GetString( 8 );
Int32 serviceContractId = reader.GetInt32( 9 );
String messageTypeName = reader.GetString( 10 );
Int32 messageTypeId = reader.GetInt32( 11 );
String validation = reader.GetString( 12 );
StringBuilder sb = new StringBuilder( "MESSAGE", 1024 );
sb.AppendLine();
sb.Append( " " );
sb.Append( BuildMessage( "status", status ) );
sb.Append( BuildMessage( "priority", priority ) );
sb.Append( BuildMessage( "queuingOrder", queuingOrder ) );
sb.Append( BuildMessage( "conversationGroupId", status ) );
sb.Append( BuildMessage( "conversationHandle", conversationHandle ) );
sb.Append( BuildMessage( "messageSeqNo", messageSeqNo ) );
sb.Append( BuildMessage( "serviceName", serviceName ) );
sb.Append( BuildMessage( "serviceId", serviceId ) );
sb.Append( BuildMessage( "serviceContractName", serviceContractName ) );
sb.Append( BuildMessage( "serviceContractId", serviceContractId ) );
sb.Append( BuildMessage( "messageTypeName", messageTypeName ) );
sb.Append( BuildMessage( "messageTypeId", messageTypeId ) );
sb.Append( BuildMessage( "validation", validation ) );
sb.AppendLine();
sb.Append( " " );
sb.Append( BuildMessage( "messageBody", messageBody ) );
WriteMessage( sb.ToString() );
#endif
}
reader.Close();
// and now we need to hand things back to the user's passed delegate.
// orphan notifications can be left behind from previous runs,
// determine if this notification is one we want to pass on
if( _subscriptionId == msgBodyId )
{
WriteMessage( "Message " + msgBodyId.ToString() + " calling delegate." );
// see http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlnotificationinfo.aspx
SqlNotificationEventArgs e = new SqlNotificationEventArgs( SqlNotificationType.Change, SqlNotificationInfo.AlreadyChanged, SqlNotificationSource.Database );
_delegate( this, e );
}
else
{
WriteMessage( "Message " + msgBodyId.ToString() + " ignored." );
}
}
catch( SqlException )
{
// if the queue name doesn't match one in the db an exception will be thrown
throw;
}
finally
{
conn.Close();
}
}
}
WriteMessage( "RequestNotification: Listen connection closed." );
}
}

View 7 Replies View Related

How To Detect And Add Exceptions To Firewall Programmatically?

Dec 10, 2006

I've been successful at installing a customized SQLexpress using setup.exe /settings template.ini.

What I'd like to do now is see if I can progammatically detect a Firewall on the SQLexpress machine and if there is one to add the exceptions for sqlservr and sqlbrowser programmatically so that the user doesn't have to do anything.

Is this possible and how would I do it?

Thanks,

jerry

View 3 Replies View Related

Converting D3 To SQL 2005

Mar 26, 2008

Does anyone have any experience converting from D3 to SQL 2005? I am attempting to translate D3 terminology in its SQL equivalent. I have very limited experience with D3. Any help would be appreciated.

View 2 Replies View Related

How To Catch Sql Exceptions Gracefully When Deleting Some Records

Jul 4, 2007

I use the following function (in the BLL) to delete some records:
Public Function DeleteStep4Dashboards() As Boolean
Try
adpDashboards.DeleteStep4Dashboards()Catch ex As Exception
Return False
End Try
Return True
End Function
How can I catch the sql database errors when deleting the records goes wrong.

View 5 Replies View Related







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