Posts

Showing posts from 2012

Oracle impdp command ORA-39145, ORA-31655, ORA-39154

While using the Oracle 11g impdp command there are few precursors that need to be taken care: 1. impdp is a OS command and hence need to be executed from command prompt and not SQL Plus. For using it within SQL Plus,you got to use the following command: host impdp 2. Prerequisite steps: a. First create the directory within SQL Plus : create or replace directory importTestDB as 'c:\importTestDB'; If there is an issue with this directory, you may receive the following error: ORA-39145: directory object parameter must be specified and non-null b. Grant the permissions to user for this directory: grant read,write on DIRECTORY importTestDB to user1; c. Grant the permission to import full database to the user:  grant imp_full_database to user1; Failing which you may receive the following error: ORA-31655: no data or metadata objects selected for job ORA-39154: Objects from foreign schemas have been removed from import 3. Execute the following command from com

Query execution failed for dataset (rsErrorExecutingCommand) / SELECT permission was denied on the object

Image
After resolving the permissions issue for 'NT AUTHORITY\NETWORK SERVICE'  i landed on the following error upon accessing the aspx page where i have a Microsoft.Reporting.Webforms.Reportviewer control embedded. An error has occurred during report processing. (rsProcessingAborted) Query execution failed for dataset 'dataset1'. (rsErrorExecutingCommand) For more information about this error navigate to the report server on the local server machine, or enable remote errors  To find out the exact error : 1. Navigate to C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__10_09_2012_17_05_27.log 2. Located the following error  Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for data set 'dataset1'. ---> System.Data.SqlClient.SqlException:

The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation reportviewer

Image
I had a .aspx page wherein i embedded a Microsoft.Reporting.Webforms.ReportViewer with the processingmode as "Remote". On the report server side, i deployed my .rdl file which uses a dataset. When i put my web application in a Test environment, i was receiving the following error on accessing the .aspx page: The permissions granted to user 'NT AUTHORITY\NETWORK SERVICE' are insufficient for performing this operation reportviewer Upon some research i found the following resolution: 1. Go to http://dotdevsql2/Reports/Pages/Folder.aspx 2. Open the Properties of the respective report 3. Under security tab: add NT AUTHORITY\NETWORK SERVICE Thats it, the above error was gone but landed up in another error that i will describe in my next post. The error was :   An error has occurred during report processing. (rsProcessingAborted)          Query execution failed for dataset 'dataset1'. (rsErrorExecutingCommand) For more information about this error nav

VB.NET OnClientClick javascript server side

Here is the scenario: I have a aspx page that displays Table with few data columns driven by database and an additional column which displays a dynamically created "Delete" button. This button is created at run time in the server side code (vb.net). When the user clicks this delete button, i want to display a confirmation message. Solution: 1. Define the following javascript function within aspx page: <script type = "text/javascript">         function ConfirmDeleteClient() {             var confirm_output = document.createElement("INPUT");             confirm_output.type = "hidden";             confirm_output.name = "confirm_output";             if (confirm("Are you sure you want to delete this item?")) {                 confirm_output.value = "Yes";             } else {                 confirm_output.value = "No";             }             document.forms[0].appendChild(confirm_outp

must declare the scalar variable SSRS RDL VS 2008

I have been juggling with RDL and RDLC files. Previously one of my developers developed the RDL files in VS 2005 and later we decided to roll it over to VS 2008. We recreated those RDL files into RDLC files using the VS 2008 editor. However we are using SQL Server 2005 database and we are ought to deploy RDL files on the SQL Server reporting services site. So i tried renaming RDLC files to RDL files but was getting the following error: An error has occurred during report processing. Query execution failed for data set 'ABCDataSet_T_TABLE_NAME. Must declare the scalar variable "@rid".  I was using a select statement to pull the data for generating the reports. Please note that for some reason i dont have the Business Intelligence project type under Visual Studio 2008. After some research i found that the following XML element was missing from the RDL file: <QueryParameters>           <QueryParameter Name="@rid">             <Value>

HTTP Error 500.19 - Internal Server Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined

After the recent Windows updates installation on our 2008 R2 server, all of a sudden all the web applications hosted in IIS 7.0 started throwing the HTTP error 500.19 with the following details: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information Module IIS Web Core Notification BeginRequest Handler Not yet determined Error Code 0x800700b7 Config Error There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined Config File \\?\C:\inetpub\wwwroot\XXXX\web.config Requested URL http://localhost:80/XXXX Physical Path C:\inetpub\wwwroot\XXXX Logon Method Not yet determined Logon User Not yet determined Config Source 14: <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, C

SSRS Switch statement with Not IsNothing condition

Sometimes it is required that you have display one of the available contact numbers such as either home phone or work phone or cell phone. I came across this requirement for one of our SSRS reports where we have to display the table of customers with one of their contact numbers. Here is the expression i used: Switch (   Not(IsNothing(Fields!home_phone.Value)),Fields!home_phone.Value,   Not(IsNothing(Fields!work_phone.Value)),Fields!work_phone.Value,   Not(IsNothing(Fields!cell_phone.Value)),Fields!cell_phone.Value,   1=1,"No # Listed" ) It works like a charm. How it works: The Switch statement will first check if home phone is present. If its not null then select home phone. else it will check for work phone. If work phone is not null then select it else check for cell phone, so on and so forth. The last condition is "1=1" meaning it is always true. So in case if none of the numbers are available, then select this value  "No # Listed"

[rsMissingDataSetName] The data set name is missing in the data region ‘DataSetName’

It is a very common compilation error that Visual studio throws when you try to add multiple datasets to your report (.rdl) file. At the time of this writing, i am using MS Visual studio 2008 and developing a report to be deployed on SQL Server 2005 database. I had the following two datasets : 1. dataset1: To retrieve the stored procedure and fill the table in the report with the data 2. dataset2: The stored procedure requires two input parameters (one is date and other is list of valid values) To populate the list of valid values, i need to get the data from database. I used this dataset to query the table and return the list of valid values. Here is how you can fix this compilation problem: 1. Open the layout tab of your report. 2. Select the table where dataset1 is being used. 3. Right-click and select the "properties" menu option. You should be able to see the table properties on right hand side lower pane. 4.  Under the table properties, look for DataSetName. Yo