Tuesday, February 22, 2011

ODBC error 208 (42S02) Invalid object name

Issue

You may get this error even though the table is available in the database.

Solution

Using qualified table name "database.owner.table" will fix this issue.

Friday, February 11, 2011

How to create XSD file path as expression for XML Source in SSIS

In your CONTROL FLOW tab, select the data flow step that contains the XML Source step. Do not go into the dataflow, it must be done in control flow.

1. Bring up its properties (right-click > Properties)
2. Click the elipsis button next to EXPRESSIONS
3. Select the [XML Source].[XMLSchemaDefinition] property then hit the elipsis button to the right of the Expression textbox to set the XSD File path
4. Drag and Drop your variable that holds your XSD path into the expression box, you should be able to evaluate expression here.
5. Click OK
6. Click OK again
7. Done

SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified

Check the following and fix the issue accordingly.

1) Make sure your server name is correct, e.g., no typo on the name.
2) Make sure your instance name is correct and there is actually such an instance on your target machine. [Update: Some application converts \\ to \. If you are not sure about your application, please try both Server\Instance and Server\\Instance in your connection string]
3) Make sure the server machine is reachable, e.g, DNS can be resolve correctly, you are able to ping the server (not always true).
4) Make sure SQL Browser service is running on the server.
5) If firewall is enabled on the server, you need to put sqlbrowser.exe and/or UDP port 1434 into exception.
6) Also check whether TCP/IP is enabled and the port is added to the firewall exception (if it is not using the default 1433 port)

You can download PortQry from http://support.microsoft.com/kb/832919, run "portqry.exe -n yourservername -p UDP -e 1434". If this command returns information and it contains your target instance, then you can rule out possiblity 4) and 5) above, meaning you do have a SQL Browser running and your firewall does not block SQL Browser UDP packet. In this case, you can check other issue, e.g. wrong connection string.

Failed to load expression host assembly. Details: Could not load file or assembly 'expression_host_f7d608c0ebb24f48bac018b81c6ff665, Version=11.2.30319.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)

This error normally occurs if you try to use the Report Viewer control or local RDLC reports.

This is because RDLC or Report Viewer control requires the website to run in Full trust mode.

MS Response

This issue is by design. Local mode requires full trust. The main reason for it is because local mode processing and rendering engine are hosted with the viewer and those operations demand full trust.

The EntityContainer name must be unique. An EntityContainer with the name 'xxxxx' is already defined.

This issue arises if you have two models in a project that have the same schema.

Even if you delete the one of the model, make sure that the reference to the original assembly that is still in the client application's BIN folder is deleted to fix this error.

Entity Framework was attempting to load the metadata files from both assemblies and detected the conflict.

Cleaning the project didn't fix the problem. The leftover assembly was still there.. that had to be deleted (dll and pdb file manually)

Tuesday, February 08, 2011

The base class includes the field 'ReportViewer1', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer)

This error normally occurs when different versions of Microsoft.ReportViewer.WebForms.dll are referenced in web.config and in controls.

Clean the solution and delete the related dll files and then again rebuild the solution

The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded.

You may get the above error when trying to view a RDLC report using with the VS 2005 or VS 2008 viewer controls with 2008 schema.

When using local mode, you are using the same report processing engine that was shipped with SQL Server 2005. This engine does not understand the new report definition schema and attempting to load a report created with one of the new SQL Server 2008 authoring tools will result in this error.

Open the RDLC in VS2010 and use the v10 of the report viewer control to run the report.

How to get files to the Miscellaneous folder in SSIS project?

Right click on the SSIS project and click on Add -> Existing Item and navigate to any file that you’d like to add to the project.

Files of a different type than the usual SSIS files such as .dtsx and .ds are automatically added under the Miscellaneous folder.

When adding files, they will be automatically copied to the SSIS project folder, no matter where they were stored originally.

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.

If you get the above error, the reason would be the connection string information is not provided by the Client using the Entity framework.

Add/Update the connection string and try again.

Entity framework and calling a stored procedure

Calling a stored procedure using Entity Framework without adding the stored procedure to the Designer.

RDL and RDLC

RDL - RDL stands for Report Definition Language

RDLC - Report Definition Language Client-side processing

RDL files are created by the SQL Server 2008 version of Report Designer. RDLC files are created by the Visual Studio 2008 version of Report Designer.

RDL and RDLC formats have the same XML schema. However, in RDLC files, some values (such as query text) are allowed to be empty, which means that they are not immediately ready to be published to a Report Server. The missing values can be entered by opening the RDLC file using the SQL Server 2008 version of Report Designer. (You have to rename .rdlc to .rdl first.)