I have a web application with a sql server 2000 backend. I use stored procedures to enter data, and use the sql RAISEERROR function to raise custom errors with the input.
My question is, is there anyway I can assign a number to these error and then catch them in my code?
e.g. I have an asset. Someone has authorised an inspection to occur on it. Now, they cannot authorise two inpsections - they must wait for one of the inspections to occur. I catch when someone is trying to authorise two inspections in the database, and raise an error.
But I then want my code to catch this error message and display a user friendly message to the user. Is there a way of attaching a number to the message so that I can catch it in my code and display an appropriate message?
I am showing my report in the web application using Report Viewer control.In the report i have start date and End date parameters.While running the report if i give startdate as '45/66/20007' it is displaying a message which is not user friendly.Is there is any way we can handle this type of errors and display our own custom error messages.
I wrote a custom task following the outline on MSDN. I signed it and installed it into the Tasks folder and in the GAC.
When I go to an SSIS project and add my task, the properties window shows "Could not get value for property 'd61935d9-430b-4c93-9f3e-a29f720d8659'. Specified cast is not valid." (where the guid is different obviously) for many of the properties.
What have I done wrong?
Update: I know this isn't my code because I tried a simple task that just returns success and doesn't do anything. I get the exact same errors, so I must be installing it incorrectly.
I created some custom code that will check to see if a file exists on a Windows Share.
Code Snippet Public Function FileExists(ByVal FileFullPath As String) As Boolean Try Dim f As New System.IO.FileInfo(FileFullPath) Return f.Exists Catch e As Exception Return e.Description End Try End Function
Code SnippetSystem.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.IO.FileInfo..ctor(String fileName) at ReportExprHostImpl.CustomCodeProxy.FileExists(String FileFullPath) The action that failed was: Demand The type of the first permission that failed was: System.Security.Permissions.FileIOPermission The Zone of the assembly that failed was: MyComputer
I'm building a custom task and just wondering what is the correct way of passing errors back to SSIS. Is there a rcommended approach to doing this. Currently I just wrap everything in a TRY...CATCH and use componentEvents to fire it back! Here's my code:
I recently updated the datatype of a sproc parameter from bit to tinyint. When I executed the sproc with the updated parameters the sproc appeared to succeed and returned "1 row(s) affected" in the console. However, the update triggered by the sproc did not actually work.
The table column was a bit which only allows 0 or 1 and the sproc was passing a value of 2 so the table was rejecting this value. However, the sproc did not return an error and appeared to return success. So is there a way to configure the database or sproc to return an error message when this type of error occurs?
I am creating a custom transformation component, and a custom user interface for that component.
In my custom UI, I want to show the custom properties, and allow users to edit these properties similar to how the advanced editor shows the properties.
I know in my UI I need to create a "Property Grid". In the properties of this grid, I can select the object I want to display data for, however, the only objects that appear are the objects that I have already created within this UI, and not the actual component object with the custom properties.
How do I go about getting the properties for my transformation component listed in this property grid?
I have a parent package that calls child packages inside a For Each container. When I debug/run the parent package (from VS), I get the following error message: Warning: The Execution method succeeded, but the number of errors raised (3) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
It appears to be failing while executing the child package. However, the logs (via the "progress" tab) for both the parent package and the child package show no errors other than the one listed above (and that shows in the parent package log). The child package appears to validate completely without error (all components are green and no error messages in the log). I turned on SSIS logging to a text file and see nothing in there either.
If I bump up the MaximumErrorCount in the parent package and in the Execute Package Task that calls the child package to 4 (to go one above the error count indicated in the message above), the whole thing executes sucessfully. I don't want to leave the Max Error Count set like this. Is there something I am missing? For example are there errors that do not get logged by default? I get some warnings, do a certain number of warnings equal an error?
What I want to accomplish is that at design time the designer can enter a value for some custom property on my custom task and that this value is accessed at executing time.
I am writing a custom task that has some custom properties. I would like to parameterize these properties i.e. read from a varaible, so I can change these variables from a config file during runtime.
I read the documentation and it says if we set the ExpressionType to CPET_NOTIFY, it should work, but it does not seem to work. Not sure if I am missing anything. Can someone please help me?
In the Editor of my custom task, under custom properties section, I expected a button with 3 dots, to click & pop-up so we can specify the expression or at least so it evaluates the variables if we give @[User::VaraibleName]
Starwin writes "when i execute DBCC CHECKDB, DBCC CHECKCATALOG I reveived the following error. how to solve it?
Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -2093955965, index ID 711, page ID (3:2530). The PageId in the page header = (34443:343146507). . . . . . . . .
CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object ID -1635188736)' (object ID -1635188736). CHECKDB found 0 allocation errors and 1 consistency errors in table '(Object ID -1600811521)' (object ID -1600811521).
. . . . . . . .
Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -8748568, index ID 50307, page ID (3:2497). The PageId in the page header = (26707:762626875). Server: Msg 8909, Level 16, State 1, Line 1 Table error: Object ID -7615284, index ID 35836, page ID (3:2534). The PageId in the page heade"
Our software vendors upgraded their software and our environment - and applications do not interface as they ought. The vendors do not appear to have any further ideas (to those listed below) and at this stage neither do I. It is now a week since the *upgrade* went live. Looking for new suggestions....
Full story (epic) below. Object names have been changed to protect the *innocent*.
Our organisation had 2 applications:-
appBank appHouse
both running on the respective platforms:
Server name svrCAT: Windows Server 2000 sp 4 / SQL Server 2000
Server name svrDOG: Windows Server 2000 sp 4 / SQL Server 2000
Transactions were "posted" from svrDOG to svrCAT via a linked SQL Server, using login dbL1nkLogin.
dbL1nkLogin was made a user of (with relevant table permissions) of the respective databases:
dbForBank dbForHouse
*** At this point all was working ***
Upgrading appBank to appBigBank required SQL Server 2005 (and more diskspace).
A new server was purchased:
Windows Server 2003 R2 sp 2 / SQL Server 2005 (Server name svrHORSE)
A linked server was created from the SQL instance on svrHORSE to svrDOG using login name dbL1nkLogin. dbL1nkLogin was made a user (with relevant table permissions) on database:
dbForBigBank
Attempts to "post" transactions were "posted" from svrDOG to svrHORSE via the linked SQL Server fail with the appBank application generating the following errors:
On first attempt:
************* FILE ERROR ************* Error Code...... 3902- Error Message...The COMMIT TRANSACTION request has no co .rresponding BEGIN TRANSACTION. Table Name......** NOT APPLICABLE ** Description.....** NOT APPLICABLE ** Function....... COMMIT sys991: Program already in use COBOL error at 000444 in sys500 Called from 00076A in sys990ssv Called from 000457 in sys991 Called from 01177D in gls489 Called from 000DFA in gls396 Called from 003961 in gls394 Called from 000258 in glp900 Called from 003DC1 in syp250
On subsequent attempts:
************* FILE ERROR ************* Error Code...... 1206- Error Message...The Microsoft Distributed Transaction Co .ordinator (MS DTC) has cancell Table Name......tblHouseFinancials Description.....DYNAMIC SQL CALL INTERLUDE Function....... UPDATE *FAILED* Processing Job 'WIN/'
* Parameters and controls within the appBank application were verified.
* Password on dbL1nkLogin was reset in the SQL instances on svrHORSE and svrDOG
* Compared the link server settings on svrHORSE to svrCAT:
Security tab: Be made using security context - Remote Logging: dbL1nkLogin / password
Server Options: Collation Compatible checked (on svrHORSE only) Data Access checked RPC checked RPC Out checked
* Made dbL1nkLogin dbo on databases dbForBigBank and dbForHouse. * Changed default database from master to dbForBigBank on svrHORSE * Rebooted svrHORSE and svrDOG (multiple times) * Verified that svrHORSE could ping svrDOG, and vice versa * Using DTCping.exe, Verified that the SQL instance on svrHORSE could ping svrDOG, and vice versa * On svrHORSE, Administrative Tools -> Component Services -> Computers has the following settings for "My Computer" Network DTC Access:
These settings were already set. My understanding of KB329332 suggest they are correct. As I could not establish the configuration date of these settings rebooted the server to ensure they'd taken effect.
* Loaded SQL Server 2000 sp4 on svrDOG (Rebooted afterwards in case services not stopped and started correctly) srvDOG now has MDAC 2.8 sp1 (2.81.1117.6) while srvHORSE has a later version (2.82.3959)- I assume sp2. While they are not the same version, MDAC 2.8 sp2 KB 231943 advises that 2.8 sp2 is not available via the web - so I think it's the best I can do).
* Stopped and manually started MSDTC and SQL Server (via Administrative Tools - Services) in case MSDTC was not being started first.
* KB873160 suggests opening port 135 and adding msdtc.exe as an exception in the Windows Firewall. At present there is no firewall on svrHORSE - which I would assume negates this necessity (at present). In Administration Tools - Services there was a service for the firewall running. Stopping this service has no effect on this issue.
* ( The svrHORSE machine was not created from an ghosted image ).
** None of these things have resolved the issue. **
I created an SSIS package for a client that does data importing. When I run the pacakge from Visual Studio there is an error window showing all the errors and warnings. A good example of an error is if the import file is in the wrong format.When there is a error or warning can I write the error log to a file OR notify someone of the errors so they can make corrections and rerun the package OR any ideas that the client can find out what went wrong and then make corrections accordingly? Thanks
It gives following errors 1.time out 2.general network failure
* Are these due to large number of online connnections *If so what is the maximum number of connections possible *what is the hardware requirement to avoid this *what is the impact on stored procedures *How to tune the server to overcome the problems *I'm currently using the standard edition what is the impact on enterprise edition
I am getting the following errors when I try to connect to certain databases. Thanks for any help. Do I need to use the Surface area configuration tools to allow remote connections?
Error: 0xC0202009 at Populate_DBA_REP, Connection manager "MultiServer": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Login timeout expired". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Named Pipes Provider: Could not open a connection to SQL Server [2]. ". Error: 0xC020801C at Load Servers, OLE DB Source [1]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "MultiServer" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. Error: 0xC0047017 at Load Servers, DTS.Pipeline: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C. Error: 0xC004700C at Load Servers, DTS.Pipeline: One or more component failed validation. Error: 0xC0024107 at Load Servers: There were errors during task validation.
I run a large support site - which was recently rebuilt from the ground up using the CSK - its hosted on a shared SQL server enviroment - and although bandwith and SQL server usage are huge - it was running fine.
But increasingly badly now - to the point where almost no internal pages will work in anything but the quietest times, we are getting sql timeout errors. This basically means most of the site (which is 1850 odd pages of dynamic) is offline. Since this is a support site and responsible for saving a great many lives - this is a serious serious problem.
the SQL DB, which is shared between the CSK, and a dotnetbb forum - is a little over a gig...big I know - but surely SQL is capable of managing tons more than that?
Has anyone heard of a situation like this - and perhaps shed some light? there are a number of connections that are set to sleeping (about 5-10 at a time) - but they tend only to be about 2 minutes old, and I am under the impression that only if they are sleeping for more than 5 minutes should you be concerned?
I really hope someone can help...because this is a complete nightmare.
Please help. We have no idea what is wrong. Error message occurs at the end of the load. "Error at Destination for Row number 6218607. Errors encountered so far in this task: 1. SqlDumpExecptionHandler: Preocess 11 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is terminating this process."
Hello, I want the server to check validation rules and not the user application is this possible??? I want to send my own messages to the user and dont want the user to see the servers messages. Thank you in advance Eran
I moved an instance of SQL Server 2005 Express to a different server and now receive the following error:
System.Data.SqlClient.SqlException: An error occurred in the Microsoft .NET Framework while trying to load assembly id 65538. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error: System.IO.FileLoadException: Could not load file or assembly 'xmpdbif, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred.
I have read about a resolution that requires you to change the db owner on select databases; I have contacted the software provider to see what users own what databases. I wanted to see if anyone had suggestions on this as well.
Hi, im new to SQL server and the report services. I have SQL 2005 express installed on windows xp pro with reporting services and use .net 2.0 framework.
I have recently tried deploying a report i have wrote in VB.net (VS2005 standard) but encountered problems. I have setup the report server to allow remote connections and i am able to connect to it from other computers on my LAN. I have setup anonymous login through IIS to both reports and reportserver instances, this works fine. When i try to deploy a report to my server i am asked for login details. I have tried to login with the execution account set in report server manager but that doesn't work and i have tried the sa SQL account.
When i connect to the report server by http://servername/reportserver it says internat error and there is also the error page displayed when i connect with http://servername/reports. Is this becuase i have not deployed any reports? If i check the server status it says running and initialised, sometimes. I have reinstalled SQL 2005 and report services about three times and still i am getting a problem. I am sure there is something wrong with how i have configured the server but dont know what.
Also when deploying reports should i put the URL as http://servername/reports or ../reportserver?
I can provide error logs if someone could point me in the direction of them if required to. (reportserver just says refer to error log)
I am sure this is an old problem and down to my config of the server. Need help though!!
Does anyone know if the following sql view is possible to write and execute as a view script?
********** find employee matching the given UserID************* SELECT * FROM Employees WHERE EmployeeID=@UserID
*********** find client matching the given ClientID********** SELECT * FROM Clients WHERE ClientID=@ClientID
**********find all contacts and events associated with ClientID********* SELECT * FROM Contacts WHERE Contact.ClientID=@ClientIDSELECT * FROM Events WHERE Event.ClientID=@ClientID
*********select all audits with Key values matching the primary keys of each client, contact or event*********SELECT * FROM Audit Where Key In (Client.ClientID, Contact.ContactID, Event.EventID)
I basically need to find a employee based on its ID. Then I need to find any records from the table Audit with Key values matching the given fields in the results of any clients, contacts events that were returned from the previous select statements. Is this possible?
I have tried to search on the topic, but there's a variety of answers that has left me a bit confused, so let me try asking a-new...
I have RS 2005 installed (Report Server on one server with IIS and everything else, Integrated Security set; the Report Catalog on a separate server with SQL Server 2005, etc.). So far so good.
I can easily access a few of my test reports using URL Access, and I can also access Report Mgr just fine; all that to indicate I'm pretty sure I have RS installed and setup and working correctly.
Now I have a custom ASP.NET 2.0 based web app that, of course, uses Forms based authentication, not Windows. I can create a hyperlink on one my web pages that uses URL Access to get to some of my test reports. But, of course, it's prompts me for (and seems to remember) domain credentials.
That's the piece I want to avoid. I have created a specific Windows domain account that would be used for this purpose. Now, I just need to figure out code to put in my ASP.NET page to pass that along. I am not using the ReportViewer control.
So, I am trying to find a decent reference/example code on how to set the credentials. I have seen much example code that is like:
//assumes a web reference has been setup... ReportingService rs = new ReportingService();
But I don't think I want "DefaultCredentials"... I want to use my custom domain account. Any help?
My other wild idea was creating this custom page in a directory where I could drop in a custom web.config that set the <authentication> element to "Windows" then set the <identity> element to my custom account... any thoughts on that would be appreciated.
Hello to everyone, I've a question about UDTs and the way I can use them to access tables and columns where they are applied in a SQL Server 2005 DB. I've already spent 2 days googling and MSDN reading but nothing helped me to solve my problem, thats why I'm posting it here (this is the second post, maybe the last one was in the wrong Forum).
The scenario follows:
I've created a UDT called MyUDT that exposes 2 properties MyTable, MyColumn, here its the code:
[Serializable] [SqlUserDefinedType(Format.UserDefined, IsByteOrdered = true, MaxByteSize = 8000, Name = "MyUDT")] public class MyUDT : INullable, IBinarySerialize {
/// <summary> /// Set or Get the Table Name where the UDT is applied. /// </summary> public string MyTable { get { return this._myTable; } set { this._myTable = value; } }
/// <summary> /// Set or Get the Table's Column Name where the UDT is applied. /// </summary> public string MyColumn { get { return this._myColumn; } set { this._myColumn = value; } }
....
}
And here it's my question/s:
How can I expose the defined Properties (MyTable, MyColumn) in order to be directly used from SQL Server Management Studio within the Column Properties Panel?
If it is not possible, is there a way for any UDT to get back from the sql server execution context the table and the column where it is applied/used?
I need to solve that in order to later retrieve via SQL the Extended Table Properties where the UDT is used and make some work on presented MetaData. Thanks in advance, every answer/help will be very much appreciated.
For the above function I added reference to the System.Data . The report works as desired when I execute in the VS 2005 IDE but when I deploy the report on the reporting server and execute it from there the function doesn€™t execute and returns me #Error.
Can any one provide some insight into it to as to how i can resolve this issue.
I notice this running the SQL Server Profiler under the application name Report Server. Every time it runs, it reports an error (in the Error field of Profiler). Does anyone know what this is?declare @p1 nvarchar(64)set @p1=NULLexec GetDBVersion @DBVersion=@p1 outputselect @p1
hi i am running a stored procedure and i want to trap the error of that stored procedure and pass it on the user in the asp.net prog.
my stored procedure are running thru a class library using C#. i tried various options of creating a new sql connnection with out using the classlibrary, but i dont get any errors. the code s used is as follows Dim conn As New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("dbconnection1"))
Dim cmd As New SqlCommand("usp_ImportPlanDetails", conn)
and also tried doing this oImportPlan = New ImportPlan(System.Configuration.ConfigurationManager.AppSettings(APPSETTINGS_CONNECTION))
With oImportPlan Try .ClientID = Session("ClientId") ' .FileName = strFilePath1 .save() Catch sqlex1 As SqlException LogException(sqlex1) End Try
End With Catch sqlex As SqlException LogException(sqlex) End Try Catch ex As Exception lblErrorMsg.Text = "Error: Import Failed" + ex.Message lblErrorMsg.Visible = True
End Try but have no luck in displaying the errors, My stored procedure has raiseerrors, Please help me out
I have a multitier app running 24 x 7...All is running ok until the server delay too much to respond when I'm trying to add the records, so I start to receive erros from the msdtc and the transaction is aborted...How can I resolved this trouble? I'm not sure if the cause is too long response from the server, but I have noted that in some moments the server is busier than when it's running ok...just for clearing this, my app have a maximum of 5 threads each one create an transactional objects to process the new entry.
I have my error routines and raiserrors working fine. I can run my stored procs through query analyzer and I get the error messages I expect. WHen the stored proces are run through Access, VB, C++, what is required to return the error messages I see in QA. Is it specific to the app front end. All my front ends will be using ODBC as their connection