viernes, 7 de mayo de 2010

Error en SQL Server Reporting Services configurado para Team Foundation Server 2010

Si está instalando SQL Server Reporting Services 2008 R2 para que sea utilizado por TFS 2010, podría encontrar este error:

TFxxxxxx: SQL Server Reporting Services is configured to require a secure connection, however no HTTPS URL is configured with a valid certificate


Si desea utilizar certificados, lo cual es recomendando, proceda con su configuración. Si por el contrario no desea utilizar SSL, entonces siga estos pasos para evitar este mensaje de error:

 

  1. Remueva los SSL bindings del servidor de reportes utilizando el Reporting Services Configuration Manager
  2. Vaya al directorio  MSRS10.MSSQLSERVER\Reporting Services\ReportServer, abra el archivo rsreportserver.config y busque la entrada SecureConnectionLevel y cambie el valor por 0
  3. Ahora puede volver a ejecutar la instalación y deberá proceder sin problemas.

 

Saludos,

 

Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP

http://mswindowscr.org

http://comunidadwindows.org

Costa Rica

Technorati Tags: SQL Server

LiveJournal Tags: SQL Server

del.icio.us Tags: SQL Server

http://ecastrom.blogspot.com

http://ecastrom.wordpress.com

http://ecastrom.spaces.live.com

http://universosql.blogspot.com

http://todosobresql.blogspot.com

http://todosobresqlserver.wordpress.com

http://mswindowscr.org/blogs/sql/default.aspx

http://citicr.org/blogs/noticias/default.aspx

http://sqlserverpedia.blogspot.com/




Note: Cross posted from Eduardo Castro.

Permalink

Error on SQL Server Reporting Services for Team Foundation Server 2010

If you are installing a Reporting Services 2008R2 instance that is going to be used as report repository for TFS 2010, you may find this error:

TFxxxxxx: SQL Server Reporting Services is configured to require a secure connection, however no HTTPS URL is configured with a valid certificate


If you want to use certificates, just request a new one an configure it, but if you don’t want to use SSL you can follow these steps to get over this error:

 

  1. First remove the SSL binding from the report server using the Reporting Services Configuration Manager
  2. Navigate to your report server folder (by default MSRS10.MSSQLSERVER\Reporting Services\ReportServer), open the rsreportserver.config file and locate the entry named SecureConnectionLevel and set its value to 0
  3. Now you can run the configuration checker and the error will be gone.

 

Regards,

 

Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP

http://mswindowscr.org

http://comunidadwindows.org

Costa Rica

Technorati Tags: SQL Server

LiveJournal Tags: SQL Server

del.icio.us Tags: SQL Server

http://ecastrom.blogspot.com

http://ecastrom.wordpress.com

http://ecastrom.spaces.live.com

http://universosql.blogspot.com

http://todosobresql.blogspot.com

http://todosobresqlserver.wordpress.com

http://mswindowscr.org/blogs/sql/default.aspx

http://citicr.org/blogs/noticias/default.aspx

http://sqlserverpedia.blogspot.com/




Note: Cross posted from Eduardo Castro.

Permalink

Introduction to SQL Azure: database in the cloud

In this presentation we introduce the basic SQL Azure concepts.

Regards,

 

Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP

http://mswindowscr.org

http://comunidadwindows.org

Costa Rica

Technorati Tags: SQL Server

LiveJournal Tags: SQL Server

del.icio.us Tags: SQL Server

http://ecastrom.blogspot.com

http://ecastrom.wordpress.com

http://ecastrom.spaces.live.com

http://universosql.blogspot.com

http://todosobresql.blogspot.com

http://todosobresqlserver.wordpress.com

http://mswindowscr.org/blogs/sql/default.aspx

http://citicr.org/blogs/noticias/default.aspx

http://sqlserverpedia.blogspot.com/




Note: Cross posted from Eduardo Castro.

Permalink

martes, 4 de mayo de 2010

Error al instalar SQL 2008 SP1 en Windows 7 o Windows 2008 R2

Si se presenta el siguiente error cuando se está instalando el SQL 2008 SP1 en Windows 7 o Windows 2008 R2

 

Invoke or BeginInvoke cannot be called on a control until the window handle has been created

 

Este es un problema ya conocido y usted tiene dos opciones:

1. Volver a ejecutar el instalador del SP1 y debería instalarse sin ningún problema

2. El instalador crea un directorio temporal C:\{GUID} usted puede copiar ese directorio (contiene el setup.exe y los archivos del SP1) en el escritorio u otro directorio temporal y ejecutar el instalador desde ahí.

 

 

Saludos,

Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP

http://mswindowscr.org

http://comunidadwindows.org

Costa Rica

Technorati Tags: SQL Server

LiveJournal Tags: SQL Server

del.icio.us Tags: SQL Server

http://ecastrom.blogspot.com

http://ecastrom.wordpress.com

http://ecastrom.spaces.live.com

http://universosql.blogspot.com

http://todosobresql.blogspot.com

http://todosobresqlserver.wordpress.com

http://mswindowscr.org/blogs/sql/default.aspx

http://citicr.org/blogs/noticias/default.aspx

http://sqlserverpedia.blogspot.com/

Note: Cross posted from Eduardo Castro.

Permalink

Error installing SQL 2008 SP1 in Windows 7 or Windows 2008 R2

If you receive the following error when installing SQL 2008 SP1 in Windows 7 or Windows 2008 R2

 

Invoke or BeginInvoke cannot be called on a control until the window handle has been created

 

This is a known issue with the installer and you have two options:

1. Rerun the service pack and you should be able to install it

2. The installer creates a directory  C:\{GUID} you can copy that folder (that contains setup.exe and the supporting files) to your desktop or a temporary folder and then install the service pack.

 

Regards,

 

Saludos,

Ing. Eduardo Castro Martínez, PhD – Microsoft SQL Server MVP

http://mswindowscr.org

http://comunidadwindows.org

Costa Rica

Technorati Tags: SQL Server

LiveJournal Tags: SQL Server

del.icio.us Tags: SQL Server

http://ecastrom.blogspot.com

http://ecastrom.wordpress.com

http://ecastrom.spaces.live.com

http://universosql.blogspot.com

http://todosobresql.blogspot.com

http://todosobresqlserver.wordpress.com

http://mswindowscr.org/blogs/sql/default.aspx

http://citicr.org/blogs/noticias/default.aspx

http://sqlserverpedia.blogspot.com/

Note: Cross posted from Eduardo Castro.

Permalink

lunes, 3 de mayo de 2010

Problemas con las DMV de Indices

Deseo compartir con ustedes este excelente artículo publicado por Paul Randall, http://www.sqlskills.com/BLOGS/PAUL/post/Missing-index-DMVs-bug-that-could-cost-your-sanity.aspx

Existe un detalle con las DMV de índices no existentes que podría causarle muchos problemas cuando está analizando consultas con el plan de ejecución. Este es el problema: el código de índice faltante podría recomendar un índice non clustered que ya existe, una y otra vez. Además podría recomendar un índice que no ayuda en la consulta. Este caso ya ha sido reportado  (Connect item #416197) y será corregido en SQL11 pero no en versiones anteriores.

Este es un ejemplo utilizando SQL Server 2008 SP1.

Estos son los pasos para reproducirlo:

CREATE TABLE t1 (
    c1 INT IDENTITY,
    c2 AS c1 * 2,
    c3 AS c1 + c1,
    c4 CHAR (3000) DEFAULT 'a');
GO
CREATE UNIQUE CLUSTERED INDEX t1_clus ON t1 (c1);
GO

SET NOCOUNT ON;
GO
INSERT INTO t1 DEFAULT VALUES;
GO 100000

Esto crea una tabla con muchas filas, y ahora ejecutamos la siguiente consulta: 

SELECT COUNT (*) FROM t1
    WHERE c2 BETWEEN 10 AND 1000
    AND c3 > 1000;
GO

Se despliega el plan de ejecusión

...Me recomienda crear un índice:

Ahora creamos este índice:

CREATE NONCLUSTERED INDEX [_missing_c2_c3] ON [dbo].[t1] ([c2],[c3]);
GO

Ahora creamos este código de ejemplo para fines ilustrativos, es cierto no debería utilizar cursores pero es solo para fines ilustrativos.

DECLARE testcursor CURSOR FOR
    SELECT c1 FROM t1
    WHERE
        c2 BETWEEN 10 AND 1000
        AND c3 > 1000;

DECLARE @var BIGINT;

OPEN testcursor;

FETCH NEXT FROM testcursor INTO @var;

WHILE (@@fetch_status <> -1)
BEGIN
    -- empty body
    FETCH NEXT FROM testcursor INTO @var;
END

CLOSE testcursor;
DEALLOCATE testcursor;

Se despliega el plan de ejecución 

Hmmm, parece que me está solicitando el crear el mismo índice anterior (aunque está solicitando que c1 debe ser incluido, aunque ya existe un índice non cluster con  c1 como cluster key, el cual es incluído de forma automática). Bueno, voy a crear el índice que solicita:

CREATE NONCLUSTERED INDEX [_missing_c2_c3_inc_c1] ON [dbo].[t1] ([c2],[c3]) INCLUDE ([c1]);
GO

Y no cambia nada, siempre continúa solicitando el índice.  El índice no es utilizado por el *Key Lookup* en el plan de ejecución – pero el missing index code piensa que sería útil y lo sugiere. Este índice no ayudará en el Key Lookup, además ya existe!

Si utiliza una consulta que sumariza la salida del missing index DMV (tal y como lo hace Bart Duncan's excellent script) y si usted tiene consultas comunes en su sistema que se encuentran con esta características de las DMV entonces sus agregaciones podrían estar incorrectas.

 

Saludos,

 

Ing. Eduardo Castro, SQL Server MVP

Note: Cross posted from Eduardo Castro.

Permalink

Missing index DMVs bug that could cost your sanity

Just want to share with you this excelent post from Paul Randall, http://www.sqlskills.com/BLOGS/PAUL/post/Missing-index-DMVs-bug-that-could-cost-your-sanity.aspx

 

Here's yet another reason to be very careful when using the missing index DMVs...

There's a bug in the missing index DMVs that could end up causing you to knock your head against a brick wall and question your sanity. I know I did.

The bug is this: the missing index code may recommend a nonclustered index that already exists. Over and over again. It might also recommend an index that won't actually help a query.

Yes, I'm surprised by this too - as the missing index code is in the query optimizer too. However, it will continue to recommend you create the already-existing index - which is terribly annoying.

This is a little-known bug (Connect item #416197) which is fixed in SQL11 but won't be fixed in earlier versions.

I experienced this on SQL Server 2008 SP1 this weekend and I wanted to blog about it so you don't spend ages trying to work out what's going on.

Here's a repro for you:

CREATE TABLE t1 (
    c1 INT IDENTITY,
    c2 AS c1 * 2,
    c3 AS c1 + c1,
    c4 CHAR (3000) DEFAULT 'a');
GO
CREATE UNIQUE CLUSTERED INDEX t1_clus ON t1 (c1);
GO

SET NOCOUNT ON;
GO
INSERT INTO t1 DEFAULT VALUES;
GO 100000

This creates a table with a a bunch of rows, with each row pretty large so that the cost of scanning the table is expensive.

Now say I want to run a query:

SELECT COUNT (*) FROM t1
    WHERE c2 BETWEEN 10 AND 1000
    AND c3 > 1000;
GO

If I display the estimated execution plan...

...it will tell me there's a missing index I should create:

So I go ahead and create the index and everything's cool:

CREATE NONCLUSTERED INDEX [_missing_c2_c3] ON [dbo].[t1] ([c2],[c3]);
GO

Now what if I want to do something more complicted? How about a cursor over the table? (Don't start on about not using cursors - they're everywhere in application code we see - this is just an easy example to engineer.)

DECLARE testcursor CURSOR FOR
    SELECT c1 FROM t1
    WHERE
        c2 BETWEEN 10 AND 1000
        AND c3 > 1000;

DECLARE @var BIGINT;

OPEN testcursor;

FETCH NEXT FROM testcursor INTO @var;

WHILE (@@fetch_status <> -1)
BEGIN
    -- empty body
    FETCH NEXT FROM testcursor INTO @var;
END

CLOSE testcursor;
DEALLOCATE testcursor;

If I display the estimated execution plan again, it shows:

Hmm. That index is actually exactly the same as the one we created earlier (even though it's asking for c1 to be INCLUDEd, it already is in the existing nonclustered index as c1 is the cluster key and is included automatically). However, just to prove I'm not doing anything dodgy, I'll create the index it wants:

CREATE NONCLUSTERED INDEX [_missing_c2_c3_inc_c1] ON [dbo].[t1] ([c2],[c3]) INCLUDE ([c1]);
GO

And nothing changes. You cannot get the missing index code to stop recommending the index. The index isn't being used for the *Key Lookup* in the query plan above  - but the missing index code thinks the index would be useful and suggests it. Not only would that index not actually help the Key Lookup, it already exists!

If you use a query that aggregates the missing index DMV output (such as Bart Duncan's excellent script) and you have some very common queries on your system that are hitting this bug, you will find that the missing index DMV aggregation will be broken too.

Be careful out there!

 

Regards,

 

Ing. Eduardo Castro, SQL Server MVP

Note: Cross posted from Eduardo Castro.

Permalink