Florida’s first ITCampSaturday 2011 Open for Speakers…

OK!  Calling all Florida West and Central Coast IT professionals.  The first Florida ITCampSaturday is coming to Tampa, Florida on Saturday March 19th.  It’s an all day free event you don’t want to miss.

Topics can be anything applicable to SysAdmins or IT Pros including: SharePoint, System Center, SQL Server, PowerShell, Active Directory, or Windows 2008 R2 and Windows 7.

Call for Speakers is Open Now…  Here’s the link to register your session(s): http://itcampsaturday.com/tampa/2011/01/13/call-for-speakers-open/

Don’t be left out!  Register now at: http://itcampsaturday.com/tampa/

Have fun and learn more!

SQL Azure available PowerShell Cmdlets…

Here’s some links you check on available cmdlets for SQL Azure:

Windows Azure Service Management CmdLets: http://code.msdn.microsoft.com/azurecmdlets

Exercise 2: Using PowerShell to Manage Windows Azure Applications: http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_deployingapplicationsinwindowsazurevs2010_topic3.aspx

This something to keep in mind.  Azure is here to stay!

SQL Denali missing “IF Exist…", default option is “False”…

On my previous blog, I mention about the missing “IF EXIST …” SQL Statement when scripting out a Drop/Create a table.

image

I should have known that there’s an option you can change this behavior.  On SSMS Denali, look under “Tools | Options | SQL Server Object Explorers | Scripting”, and under “Object Scripting Options” you will find the “Include IF NO EXIST Clause”.  Yes, you read it right!!  People have complain about the wording of this option.  Why not use “Include IF EXIST clause” or “Enable/Disable IF EXIST Clause”?   Well, as they say in Survivor…  It’s time to vote!

I found this Microsoft Connect feedback: http://connect.microsoft.com/SQLServer/feedback/details/624075/include-if-not-exists-clause-impacts-drop-scripting

Look like Microsoft is listening and they have a fix for the next release of Denali.  Good Job Microsoft! 

Creating Multi-Dimension Arrays with PSObjects

While working on my book, on my chapter about working with objects, I went through a series of examples on using PSObject and Hash Tables which made me realized that creating NoteProperties is a thing of the past.  Thanks to the “-Property” parameter whe using the New-Object which allows you to use your Hash Table content and build your object Property member type.

New-Object PSObject –Property [HashTable]

Take a look at this previous blog post by the PowerShell Team: http://blogs.msdn.com/b/powershell/archive/2009/12/05/new-object-psobject-property-hashtable.aspx

So, while answering the forum post about “NoteProperties on an ArrayList”, I found myself creating a Multi-Dimension Array on a PSObject.    In my example, I’m trying the create two different Hash Tables, $o1 and $o2, containing the same property with some values.  Then, I’m adding them to the my $a1 PSObject variable using the “+=” operator and this have allow me to create a Multi-Dimension array.

Here’s the code:

## Creating multi-dimension array

[Array] $a1 = $null

$o1= @{ Num = “12”,”34″}

$a1 = new-object PSObject -Property $o1

foreach($i in $a) { $i.num }

$o2 = @{Num = “2”,”4″}

$a1 += new-object PSObject -Property $o2

$a1

foreach($i in $a1) { $i.num }

# Display one of the Dimension Element:
$a1[1].num[1]      # will return value = 4

$a1[0].num[1]      # will return value = 34

Here’s the image with the results:

image

Now, let’s take a look at the $a1 list of member types using Get-Member:

image

Yes, although we use the “-Property” in the New-Object, it will create the NoteProperty for you. 

So would you rather code using Add-Member:

Add-Member -InputObject $o1 -Type NoteProperty -Name Num -Value 12

Or, use the Hash Table concept:

$o1= @{ Num = “12”,”34″}

Well, just let your imagination go!!

First ITCamp 2011 for IT Professionals been organize in Tampa, FL

Just to let you all know that we have something cooking in Tampa in March 19th. We are organizing our first event by the community, for the community.

Event: ITCamp for IT Professionals

Location: KForce – Tampa FL

Event Date: March 19th, 2011

Time: 8am-5pm

Sessions: Four Different Tracks – Including multi-sessions.

Session Times: 40 mins with 10 mins Q and A (50 mins total)

4 Tracks are:

– Windows 7 Deployment, Systems Management

– Office, SharePoint and Office WebApps

– Windows 7 Mobile, Cloud Sessions

– SQL Server Administration

We planning to cover PowerShell in most of the tracks.

This event is been spearheaded with the help of our Microsoft Senior IT Pro Evangelist for the Southeast (FL, AL, and MS) Mr. Blain Barton (http://blogs.technet.com/blainbar ). We want to spread this concept throughout the Southeast and possibly many more areas… just like SQLSaturday if possible.

I’ll keep you all posted.

Can’t create SSIS solution in BIDS R2 after installing SQL Denali CTP1

Although, this is not PowerShell, I do work with SQL Server and SSIS packages.  I shouldn’t be surprise to find problems because I installed a CTP (Community Technology Preview).  I do expect to have some issue so I can figure out the answers, find the workaround to fix it, and then blog about it.

Well, here’s one issue I found after installing the new SQL Server ‘Denali’ CTP1 on my Windows 7 along with my RTM version of SQL Server 2008 R2.   I needed to develop a new SSIS solution using SQL Server 2008 R2 BIDS and I ended up with the following error:

image

image

image

So, my first thought was, Oh-Oh!! Machine rebuild! 

But, after having good experience with the recent release of SQL Server uninstall process, then I decided to do the following steps:  ( and it did work for me )

1. Under your Windows 7, Control Panel | Programs | Uninstall Programs, go to and right-click on “SQL Server Denali CTP1 Setup” or “SQL Server Denali CTP1 Setup (64bit)” and select “uninstall”.  You may need to media in order to proceed with the uninstall.

image

image

image

2. Go through the SQL Denali uninstall setup steps, until you reach to the “Select Instance” where you pick to “<<Remove shared features only>>”.

image

3. Now, you only going to “Select Feature” you really want to uninstall, which is “Business Intelligence Development Studio”.  Click Next to continue.

image

4. At the “Removal Rules” click Next, and at the “Ready to Remove”, Click Remove to start the uninstall process.

5. You will get the following screen, click Close to finish, and you will need to restart your machine.

image

image

Are we done yet?  No!! 

I want to make sure I uninstall all BIDS versions starting with SQL Server Denali and then SQL Server 2008 R2.  So, we need to repeat all previous steps but for SQL Server 2008 R2:

image

After, you’ve done repeating the steps and everything completed successfully, now we can install SQL Server 2008 R2 in order to recover this BIDS version.

image

image

Now, we are ready to re-install SQL Server 2008 R2 BIDS.  This step may ask you for the SQL Server media.

image

image

image

image

Keep clicking Next until the process starts installing the BIDS.

image

Now, the final test. Let’s open BIDS R2 and create an SSIS solution.

image

And, we got our BIDS R2 working again.

image

I hope this information helps everyone out there.

Smile

Denali – Get your SQLPSv2 module set to go…

Denali – PowerShell, Surprise! …not too fast. Beside the fact that PowerShell V2 is required before the installation, I was excited to see that thing were moving forward.  But wait a second,  still is a mini-shell,  and it still doesn’t run some of the nice PowerShell V2 cmdlet such as: Send-MailMessage or Out-GridView.  This is sad, you got these two useful cmdlets and you can’t use them unless  you customize your environments.  Well, there’s no escape from it.
Now, taking the lesson learned from Chad Miller’s blog on how to create your SQLPS module (http://sev17.com/2010/07/making-a-sqlps-module/), you can do the same thing with Denali and create a SQLPSV2 module so we can the new cmdlets the CTP1 have included.  Please, go ahead and grab the SQLPS module from his Chad’s blog in order to proceed with the following instructions.
Here’s how we create our new SQLPSv2 module?
1. I locate the Denali SQLPS component, which is in the following path: “C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn”
2. Under your “Documents\WindowsPowerShell\Module” folder, create the “SQLPSv2” folder.
3.  From the “..\Binn” folder we are going to copy the following things:
a. Copy/Paste the “\en” folder to the “SQLPSv2” folder”.
b. Copy/Paste these 2 *dll’s files: “Microsoft.SqlServer.Management.PSProvider.dll” & “Microsoft.SqlServer.Management.PSSnapin.dll”.
c. Copy/Paste these 2 *ps1xml files: “SQLProvider.Format.ps1xml” & “SQLProvider.Types.ps1xml”.
4. To complete our new SQLPSv2 module, we are going to copy the from Chad’s solution, the following two files but renaming it to SQLPSv2.*: Sqlps.psd1 –> SqlpsV2.psd1 and Sqlps.ps1 –> SqlpsV2.ps1.
At the end, you will have you Module folder looking like the following sample:
Directory: C:\Users\User01\Documents\WindowsPowerShell\Modules\SQLPSV2
Mode                LastWriteTime     Length Name
—-                ————-     —— —-
d—-        11/10/2010   9:59 PM            en
-a—         9/25/2010   8:32 PM      92000 Microsoft.SqlServer.Management.PSProvider.dll
-a—         9/25/2010   8:32 PM      83808 Microsoft.SqlServer.Management.PSSnapins.dll
-a—         9/21/2010   6:14 PM      84619 SQLProvider.Format.ps1xml
-a—         9/21/2010   6:14 PM      15552 SQLProvider.Types.ps1xml
-a—          7/8/2010   4:38 PM        374 SqlpsV2.ps1
-a—        11/10/2010  10:05 PM       1062 SqlpsV2.psd1
Now, let us test if this works, by opening your PowerShell Console or ISE editor, then typing “Import-Module SQLPSv2 –DisableNameChecking
PS C:\>
PS C:\> Import-module SQLPSv2 -DisableNameChecking
PS C:\>
PS C:\> GCM *sql* -CommandType Cmdlet | Select name
Name
—-
Add-SqlAvailabilityGroupDatabase
Decode-SqlName
Encode-SqlName
Invoke-Sqlcmd
Join-SqlAvailabilityGroup
New-SqlAvailabilityGroup
New-SqlAvailabilityReplica
Remove-SqlAvailabilityGroup
Resume-SqlAvailabilityGroupDatabase
Suspend-SqlAvailabilityGroupDatabase
Switch-SqlAvailabilityGroup

PS C:\> cd SQLServer:\SQL\MAX-PCWIN1\MSQLDENALI01\Databases
PS SQLSERVER:\SQL\MAX-PCWIN1\MSQLDENALI01\Databases>
If you want to download my solution, just click the link below:

Stay tuned for more on SQL Server Denali CTP1 and SQL PowerShell.
Happy PowerShelling!!

Meet “Denali”, the new SQL Server CTP1 with more PowerShell…

Yes!  As many SQL PASS members already know, the next SQL Server CTP1 is available for download (http://www.microsoft.com/downloads/en/details.aspx?FamilyID=6a04f16f-f6be-4f92-9c92-f7e5677d91f9).  Go and get it!

I was able to installed it on my Windows 7 64bit version without a glitch. I had a problem installing in a Windows Server 2008 SP2 Virtual Machine, but I’m sure it because I needed access to the internet.  So, make sure you got internet connectivity.

The new SQL Server CTP1 has SQL Server Management Studio Denali GUI is based on Visual Studio 2010.  It’s Impressive!!

There’s a few things to know:

1. Prior installing SQL Server Denali CTP1, you need the following:

1. Install PowerShell V2 – Look for Windows Management Framework: http://support.microsoft.com/kb/968929

b. .NET Framework 3.5

2. The Get-Command bug is fix and there’s are a few new PowerShell cmdlets:

image

Add-SqlAvailabilityGroupDatabase
Join-SqlAvailabilityGroup
New-SqlAvailabilityGroup
New-SqlAvailabilityReplica
Remove-SqlAvailabilityGroup
Resume-SqlAvailabilityGroupDatabase
Suspend-SqlAvailabilityGroupDatabase
Switch-SqlAvailabilityGroup

Of course, don’t forget to include the new set SQL cmdlets from the “MasterDataServices” snapin, already introduce in SQL Server 2008 R2 (See my blog: http://www.maxtblog.com/index.php/2010/09/surprise-sql-server-2008-r2-has-new-cmdlets/)

I’m very excited about this new product and expect to see more PowerShell cmdlets later in the process.    KUDOS to the Microsoft SQL Server Team!!

I will be blogging more later.  Happy PowerShelling!

Some SQL Server and PowerShell Resource information

Here’s some PowerShell and SQL Server valuable resource information you don’t want to miss.

 

PowerShell:

 

IDERA’s: http://powershell.com/cs/blogs/ebook/default.aspx, http://powershell.com/cs/media/p/4908.aspx

Sapien – Powershell TFM V1 eBook: (this is V1 but is valid information): http://www.primaltools.com/downloads/communitytools/

The Administrator Crash Course: Windows PowerShell v2: http://nexus.realtimepublishers.com/accwp.php

 

 

 

SQL Server:

 

IDERA’s Webcast: http://www.idera.com/Content/Resources.aspx#WC

Pragmatics Webinars: http://www.pragmaticworks.com/Resources/webinars/Default.aspx

MSSQLTIPS Webcasts: http://www.mssqltips.com/webcastlist.asp?m1

SQLServerPedia – Podcast and Presentations: http://sqlserverpedia.com/wiki/Podcasts_and_Presentations

QUEST Communities – Database Management: http://db-management.com/blog/category/sqlserver/tutorials-sqlserver/