Showing posts with label SQL Server. Show all posts
Showing posts with label SQL Server. Show all posts

Thursday, November 6, 2008

SQL Server Reporting Services 2008 on Vista : "RsClientController is undefined"

When working with the Sql Server 2008 Reporting Services web control on a Vista workstation, I was receiving a JavaScript error message: "RsClientController is undefined".

First, I thought to check the Handler Mappings, since I've experienced a similar problem with the .axd extension not being mapped properly. No luck. The mapping existed, and was set properly.

After investigating, and digging into the problem a little deeper, it would seem the solution is to add a mapping specifically for the Reserved.ReportViewerWebControl.axd

These are the steps:
1. Open Internet Information Services (IIS Manager)
2. Select your reporting site
3. Click on the "Add Managed Handler" from the actions

4. Enter the information for your new handler:

5. Click 'OK'

Resources:
Deployed reports have javascript errors?
Javascript Error When trying url access
SQL Server Web Report Viewer Issues on Longhorn/IIS7

Monday, September 29, 2008

ALTER SCHEMA (Transact-SQL) for SQL Server 2005

If your working with different schemas on SQL Server 2005, you may want to switch the schema of your objects.

ALTER SCHEMA can only be used to move securables between schemas in the same database. To change or drop a securable within a schema, use the ALTER or DROP statement specific to that securable.

Syntax: ALTER SCHEMA schema_name TRANSFER securable_name

Example:
ALTER SCHEMA work TRANSFER dbo.ItemNameValuePair
GO
ALTER SCHEMA person TRANSFER work.ItemNameValuePair
GO

Resources:
MSDN Article

Thursday, August 28, 2008

Finding missing sequence values in sql server

Recently while troubleshooting a problem, I had the need to identify missing rows from a table with an identity column.

There is always the simple way of joining to a lookup table with all of the possible values, and then search where the value appears in the lookup table, and not in your source table.

However, a quick google found this blog post, that has some great examples, and a fairly complete analysis of the different alternatives.

How to find missing values in a sequence with SQL

Sunday, August 17, 2008

Connect to SQL Server on Windows Server 2008

To connect to Microsoft SQL server on from another machine on Server 2008, there is now an additional step. Windows Server 2008 is the first OS with the included firewall feature already in present in Windows XP and Windows Vista.

You will need to configure a new rule for the Firewall to allow external c to your SQL server.

(If this is SQL server 2005 or greater, you are still going to need to configure your network protocols with the SQL Server Configuration Manager)

Unless your planning on turning off the firewall (not something that I would recommend), then you should add a new Inbound rule to allow this type of traffic.

From the server manager, select "Go to Firewall"

You will then scroll down to the "Getting Started" section, and look for the "View and Create Firewall Rules" section of the application.

At this point, you should think about contacting your infrastructure team if this is for a corporate server, but if this is a simple installation, and you feel confident in doing so, click "Inbound Rules". The on the right hand side, select "New Rule". You will then create a new rule to open Port 1433.

The "New Rule" feature is a wizard, and is really simple to use. Once you've complete your new firewall rule, then test connect from another machine. After a few tries, I was able to reduce the level of access available quite a bit by tweaking the rule itself.

If your looking for more information on Windows Server 2008, SQL Server and developing a cohesive stragegy for managing the firewall, then I suggest checking out this post:
SQL Server and the Windows Server 2008 Firewall