Welcome to Sign in | Join | Help

ianuarie 2008 - Posts

It may surprise you but this is the official announcement "Microsoft is excited to deliver a feature complete CTP during the Heroes Happen Here launch wave and a release candidate (RC) in Q2 calendar year 2008, with final Release to manufacturing (RTM) of SQL Server 2008 expected in Q3. Our goal is to deliver the highest quality product possible and we simply want to use the time to meet the high bar that you, our customers, expect."

Read more here: Microsoft SQL Server 2008 Roadmap Clarification

New Year - new passion - R/C Helicopters - such as Silverlit Picoo Z. Luckily for beginners like me YouTube has plenty of movies. But how to save them? You may say: just copy all files starting with the get_video from C:\Documents and Settings\UserName\Local Settings\Temporary Internet Files\ where Internet Explorer stores them. It's not that easy. What you see in C:\Documents and Settings\UserName\Local Settings\Temporary Internet Files\ it's not the reality Big Smile a list of files and that's all. Nope. If you look under the covers in C:\Documents and Settings\UserName\Local Settings\Temporary Internet Files\Content.IE5 you will see a list of folders such as:

  • 0D2FK9MZ
  • 0FXR6YBD
  • 21FCXKBQ
  • 37XJRPWW
  • 452N8XUJ
  • 54HYO4IU
  • 81AB0PQ7
  • MP96B6LC
  • O7BFU49L
  • ST6VKLMZ
  • TC83X1S5
  • TNB3X9GE
  • TS079HG5
  • US5RAW9A
  • W9AJWLQF
  • WVZ7E0P1
  • Z4MJ8L5Y
  • ZIV1B004 

So what? So, if you try to copy all files that start with get_video you will be prompted (if you loaded enough movies):

This folder already contains a file named 'get_video[1]'.
Would you like to replace the existing file blablabla with this one? blablabla
Yes Yes to All No Cancel

Why? Because inside the temporary folders the YouTube videos have names such as get_video[1], get_video[2] and so on. And that for more than one temporary folder.

What is my solution? To move them from the temporary folders using the next PowerShell statements:

Get-ChildItem -literalpath "C:\Documents and Settings\Cristi\Local Settings\Temporary Internet Files\Content.IE5\" -recurse -Filter get_video*.* | %{$x=0} {Move-Item -LiteralPath $_.FullName -Destination ("C:\HeliMovies\Movie$x"+".flv"); $x++}

One question may arise: why literalpath ? Because file names that include '[',']' characters cannot be handle by PowerShell - at least not in this version so I needed to use a workaround.

The result: in my C:\HeliMovies\ folder I had files named movie0.flv, movie1.flv, movie2.flv etc

That spared me of manually copy them, renamed them and adding the flv extension and delete them from temporary internet files.

Paul A. Mestemaker II, Program Manager for SQLCAT, starts the year by bringing gifts - an updated version of SQL Server 2005 Best Practices Analyzer. You can find in the box more than 60 new rules, rules for Analysis Services, BPA UI and command-line tools, rich documentation and of course bug fixex Big Smile 

Read more on SQL Server Managebility Team's Blog: SQL Server 2005 Best Practices Analyzer (January 2008) -- Now Available!

SQL Server 2008 - Resource Governor Questions

Bob Dorr answers some of the most common questions regarding Resource Governor:

What is the difference between priority and importance?

How (an when) can I throttle an active query that is taking too much CPU?

If  a pool has the max CPU percent set to 10% and another to 100% why does the first one may exceed 10%?

And more...

 

Since SQL Server 2005 in all the demos (even in Microsoft demos) involving sys.dm_exec_sessions DMV I saw this usage for retrieving user sessions:

SELECT * FROM sys.dm_exec_sessions WHERE SPID > 50

This comes from SQL Server 2000 where you could select using from sysprocesses table the client processes using:

SELECT * FROM sysprocesses WHERE spid > 50 

In SQL Server 2005 there is no guarantee that SQL Server will use less than 50 system sessions so you should use SELECT * FROM sys.dm_exec_sessions WHERE is_user_process = 1 to get user sessions.

Read more about it here: How It Works: System Sessions

P.S. For three years, I promised myself that I will blog about it but somehow it slipped from my mind.

When you have just become comfortable with the idea that you have to certify yourself on SQL Server 2005 - guess what - new certifications are coming. My advice - if you have the time - take the SQL Server 2005 certifications as SQL Server 2008 builds on SQL Server 2005. However, for a preview of the new certifications you can participate in a webcast - see the details bellow:

[quote]

SQL Server 2008 and Your Microsoft Certifications
Join the Microsoft Certification team for guidance on your certification path for SQL Server. Click to register for:

[/quote]

In a discussion with Remus Rusanu, he reminded me that if you use a SqlString to pass a varchar(max) to a client application, the whole value is copied into the memory (think big - a varchar(max) can have up to 2GB). The alternative is to use streaming and one method of doing that is to use SqlChars.

 

To answer a question on a previous blog post - YES, there is a PowerShell Add-In for Visual Studio - the VSCmdShell. It works with Visual Studio 2005 and Visual Studio 2008 (I tested with 2008 version) and you can also get the code for it from the project home on codeplex.com.

More about it here:

VS Command Shell - Home

Bertan's Blog

Additional Resources: PowerShellLanguage - .NET Reflector Add-InPowerShell Debug VisualizerCreating a Windows PowerShell CmdLet using the Visual Studio Windows PowerShell Templates, Building and Debugging Powershell cmdlets in the VS IDE, NetBeans Support for PowerShell   

One of the perks of being MVP is that you can use lots of commercial applications for free. Two of them come from Shell Tools: PowerShell Analyzer and PowerShell Plus. If you are into PowerShell then I recommend you to at least download the free version of PowerShell Pluss and give it a try. You will be impressed.

PowerShell Analyzer:

PowerShell Plus:

The differences between the two are listed in the next list:

 

 Feature  PowerShellAnalyzer 1.0  PowerShell+ Beta
 Debugging PowerShell Scripts P Y
 Rich UI-Console (truly native console with full intellisense-like UI) N Y
 Rich help system for cmdlets, aliases etc. Y N
 Graphical visualization of pipeline output Y N
 Code Snippets N Y
 Intellisense Y Y
 PowerShell Drives and Providers Explorer Y N
 PowerGUI-like Navigator Support and Dynamic Context Menus N Y
 Multiple Runspace (tabbed Runspaces) Y N
 Real-time Variable and Property Monitor N Y
 Editing with color syntax highlighting Y Y
 Support for XML-documents including XSD support N Y
Support for c# and VB.NET documents including compilation N Y
PowerTAB tabexpansion integrated N Y

Legend:

  • Y - Full Support
  • N - No Support
  • P - Partial Support 

Find out more at Shell Tools.

A few days ago I wrote how can one talk to Analysis Services. Though I have no PowerShell skills (I opened a PowerShell console 2-3 times) and I come from the Database Engine world - I thought that it would be interesting to try the powerSSAS provider for Analysis Services created by Darren Gosbell.

So here's a screencast on this subject.

Windows Media Video archive: Download

Resources:

Format: wmv
Duration: 00:09:46

or should I say Forever Young? If you try to troubleshoot AS connections like I had to, you will choose the second characterization for the Troubleshooting Analysis Services 2005 connectivity problems article.

The answer depends on who you asked the question. If you ask an Analysis Services member team he/she might answer XML DDL, MDX (Multidimensional Expressions). DMX (as in Data Minining Extensions and not DMX the rapper), XMLA (XML for Analysis), PMML (Predictive Model Markup Language), OLE DB for OLAP (ODBO), ADOMD, ADOMD.NET, DSO, AMO and SQL. Yes even SQL, or at least a subset of SQL.

You don't have to trust my words (SQL to talk to AS), here's the proof:

If you are reading Books Online then you find out that you use Analysis Services Scripting Language.

So many words can make thing that Analysis Services is too complicated but the truth is that is not Big Smile

[edit]

I just added another way here: Screencast - Exploring Analysis Services using PowerShell

[/edit]

At least it would not be supported though the API can be somewhere in the code.

What is the execution plan? It was a feature of Analysis that resembles the actual execution plan from the Database Engine though it is not the same thing. What makes them similar (besides the name) is the final result, an XML that describes what happened. What makes them different? A lot of things such as no execution plan space for Analysis Services (the execution is done on the fly). Technically behind the execution plan feature was a tracing.


If the execution plan will make it in a future Service Pack or in the next version of SQL Server is not decided yet but what is sure is that SQL Server 2008 won't have it.

If you need this feature then please vote for it!

There's a small link on the top right corner of the site to the Heroes Happen Here :: SQL Server 2008 Test Drive

If you didn't check it then you should. Why? You can play with an online installation of SQL Server 2008  without having to install your own, plus you can add some cool videos.

Just have a look:

You are looking at the Resource Governor demo and in the next image at the demo selector:

An Introduction to New Data Warehouse Scalability Features in SQL Server 2008

[quote from="Table of Contents"]

SQL Server Relational DBMS DW Improvements 
Star Join 
Partitioned Table Parallelism 
Partition-Aligned Indexed Views 
GROUPING SETS 
MERGE 
Change Data Capture 
Minimally Logged INSERT 
Data Compression 
Backup Compression 
Resource Governor 
Lookup Performance 
Pipeline Performance 
MDX Query Performance: Block Computation 
Query and Writeback Performance 
Analysis Services Enhanced Backup 
Scalable Shared Database for AS 
Reporting Scalability 

[/quote]

I guess you'll have another year to keep hearing the phrase at ROSQL meetings "Cristian Lefter, SQL Server MVP" :)

Good news for Romania, we have a "fresh" MVP - Andrei Iacob with the Client Application Development competency. You can read more about Andrei's first thoughts about being an MVP here: <2008 type=”MVP”>

What I expect from this year? A book (I am the one that is currently writting it), SQL Server 2008 RTM, a vacation and the usual wish of Miss World candidates "Peace on Earth" Cool

Correction, we have two new MVPs - add Victor Constantinescu to the group and we make a total of 16 Romanian MVPs:

  • Andrei Ungureanu - Directory Services (Perot, ITBoard.ro)
  • Grigore Dolghin - FoxPro (ProFox.ro)
  • Bogdan Tarla - VSTO (ProManagement)
  • Angela Dobrea - SQL Server (Intelprof)
  • Gicu Dobrea - Security (Intelprof)
  • Me Myself and I - SQL Server (SQLServer.ro)
  • Aurelian Popa - ASP.NET (winDigita, RONUA.ro)
  • Marius Bancila - VC++ (Siemens VDO, CodeGuru.com, CodExpert.ro)
  • Dragos Cojocari - VC++ (GEBS, CodeGuru.com, CodExpert.ro)
  • Ovidiu Cucu - VC++ (RomSoft, CodeGuru.com, CodExpert.ro)
  • Hilde Corbu - Project (Trilex)
  • Ciprian Jichici - Architecture (Genisoft)
  • Razvan Socol - SQL Server (sqlserver.ro)
  • Viorel Bejan - Visual C++ (MSDN, CodeGuru.com)