Wednesday, March 16, 2011

It is not funny

It is always good to research before trying out. Windows 7 64-bit does not recognize 64-bit CPU in Virtual PC.

Monday, March 07, 2011

SQL Server compound statment operator support?

compound assignment operators. Here is a working example of those operators:

declare @i int
set @i = 100

/**************************
Addition and assignment
***************************/
set @i += 1
select @i

———–
101

/**************************
Subtraction and assignment
***************************/
set @i -= 1
select @i

———–
100

/**************************
Multiplication and assignment
***************************/
set @i *= 2
select @i

———–
200

/**************************
Division and assignment
***************************/
set @i /= 2
select @i

———–
100

/**************************
Addition and assignment
***************************/
set @i %= 3
select @i

———–
1

/**************************
xor operation and assignment
***************************/
set @i ^= 2
select @i

———–
3

/**************************
Bitwise & operation and assignment
***************************/
set @i &= 2
select @i

———–
2

/**************************
Bitwise | operation and assignment
***************************/
set @i |= 2
select @i

———–
2

using SQL Server strongly typed table variable

The following code is an illustration of how to use strongly typed table variable.

1. create type
create type typ as table (id int);

2. create table
create table temp(id int not null)

3. create procedure

create procedure myproc
@t typ readonly
as

insert into temp
select * from @t typ

4. run

declare @mytype typ
insert into @mytype values(1), (2), (3)
exec myproc @mytype

Microsoft Secure Cloud Service for SQL Server Deployments

Microsoft just released a configuration assessment cloud service that helps to check your SQL Server configration deployments and enable DBA's proactively avoid configration problems. But for the tool to work it needs to be installed on Windows server box. So, if you want to play with it then you need a server. It will install both gateway and agent. But you only required to install agent if you don't need it to monitor SQL Server 2008.

To download the new tool or read more you can Read about atlanta (Cloud sql config)

I definately wouldn't put this product on produciton server but can check on my development and test servers to check if the configration is right. The tool collects all configration information and uploads to microsoft portal.

First preview of the portal is shown below.