SQL Server Analysis Services is a very powerful tool, which was introduced with SQL Server 2000. In SQL Server 2005 it is far more powerful, but still underappreciated by a lot of developers. This is a quick and dirty attempt to convey the value of Analysis Services cubes in under ten minutes. Related Resources:
SQL Server Analysis Services Home
Microsoft Business Intelligence Home
SQL Server Analysis Services on MSDN
Watch the screencast(WMV)
Thursday, September 27, 2007
Screencast: SQL Server Analysis Services what's in it for me?
Posted by Denis at 9:38 AM 0 comments
Labels: Analysis Services, Business Intelligence, Data Warehouse, OLAP, SQL Server 2005
Screencast: Dave Redding and John Stevens on XNA and Independent Gaming
Code to Live: Dave Redding and John Stevens on XNA and Independent Gaming
In this inaugural show, hosts Steve Loethen and Josh Holmes interview Dave Redding and John Stevens about XNA and game development.
Watch the screencast(WMV)
Posted by Denis at 9:36 AM 0 comments
Labels: Gaming, Screen Cast, XNA
Monday, September 24, 2007
Grandma still drives joke
GRANDMA STILL DRIVES- She is eighty-eight years old and still drives her own car. She writes:
Dear Grand-daughter:
The other day I went up to our local Christian book store and saw a Honk if you love Jesus bumper sticker.
I was feeling particularly sassy that day because I had just come from a thrilling choir performance, followed by a thunderous prayer meeting. So, I bought the sticker and put it on my bumper.
Boy, am I glad I did, what an uplifting experience that followed. I was stopped at a red light at a busy intersection, just lost in thought about the Lord and how good he is, and I didn't notice that the light had changed It is a good thing someone else loves Jesus because if he hadn't honked, I'd never have noticed. I found that lots of people love
Jesus!
While I was sitting there, the guy behind started honking like crazy, And then he leaned out of his window and screamed, For the love of God! Go! Go! Go! Jesus Christ, GO! What an exuberant cheerleader he was for Jesus!
Everyone started honking! I just leaned out my window and started Waving and smiling at all those loving people. I even honked my horn a few times to share in the love!
There must have been a man from Florida back there
because I heard him yelling something about a sunny beach.
I saw another guy waving in a funny way with only his middle finger Stuck up in the air. I asked my young teenage grandson in the back seat what that meant. He said it was probably a Hawaiian good luck sign or something.
Well, I have never met anyone from Hawaii , so I leaned out the window And gave him the good luck sign right back.
My grandson burst out laughing.
Why even he was enjoying this religious experience!!
A couple of the people were so caught up in the joy of the moment that they got out of their cars and started walking
towards me.
I bet they wanted to pray or ask what church I attended, but this is When I noticed the light had changed.
So, I waved at all my brothers and sisters grinning, and drove on through the intersection. I noticed that I was the only car that got through the intersection before the light changed again and felt kind of sad that I had to leave them after all the love we had shared.
So I slowed the car down, leaned out the window and gave them all the Hawaiian good luck sign one last time as I drove away.
Praise the Lord for such wonderful folks!!
Will write again soon,
Love grandma
Posted by Denis at 3:30 PM 0 comments
Increase Your Productivity With Query Analyzer/SQL Server Management Studio
Drag And Drop Column Names
In Query Analyzer you can save a lot of time by using this trick instead of typing all the column names of a table
Hit F8, this will open Object Browser
Navigate to DatabaseName/TableName/Columns
Click on the column folder and drag the column folder into the Code Window
Upon release you will see that all the column names are in the Code Window
Use Shortcuts
Did you know that you can have CTRL + Number key combinations/shortcuts in Query Analyzer? You can set it up so that CTRL + 5 executes sp_who2 for example. I thought everyone already knew this but apparently not; I showed this to 3 coworkers yesterday and they didn't know about it. So how do you set this up? It is pretty easy, select Tools -->Customize from the toolbar. In the Customize tab you will see 3 shortcuts already:
ALT + F1 sp_help
CTRL + 1 sp_who
CTRL + 2 sp_lock
To add your own queries/procedures type or paste the query or stored procedure that you want to execute into one of the empty ones (see picture below)
If you have 4 Query Analyzers applications open it will be available in all 4 of them. I usually have 4 Query Analyzer applications open, one for staging, one for development and one each for one of the production boxes. so if I have to quickly check that a table is the same on all 4 machines I just hit CTRL + 6 in all 4 Query Analyzer applications and I am done.
I created a Word document that looks like this
3 - errorlog
4 - product table
5 - country table
6 - vendor codes
7 - sp_who2
etc etc etc
The font-size is 32, I printed this out and put it next to my monitor so that I can quickly see which key combination I have to hit. Once you set this up you will see how much time it will save you.
In SSMS 2005. Click Tools -> Customize -> "Commands" tab -> "Keyboard" button (Lower left corner of screen).On the options window, click the Keyboard option (under Environment). See pictures below:
Posted by Denis at 11:50 AM 0 comments
Labels: Productivity, Shortcut, SQL Server 2000, SQL Server 2005, SQL Server 2008, Tip, Tips and Tricks
Starting at Midnight the Worldwide Wait for Halo 3 Ends
Starting tonight Halo® 3 the final chapter of Microsoft Corp.’s epic video game trilogy, finally goes on sale around the world. By the end of the week, fans in 37 countries will be playing the game Wired magazine recently called “a cultural touchstone, a Star Wars for the thumb stick generation.”
In the United States, more than 10,000 retailers across the country are opening their doors at midnight tonight solely to sell copies of the game and accompanying Xbox 360® consoles and accessories. With nary a pirate, a spider or a wand in sight, day-one sales of the highly anticipated video game are expected to shatter entertainment sales records and top the biggest entertainment launches of all time.
“The excitement and demand for ‘Halo 3’ has transcended a typical video game release and we’re preparing dedicated registers for its midnight release in our 24-hour stores,” said Darin Dickson, video game merchandise buyer, Wal-Mart Stores Inc. “It’s clear that this is one of the most anticipated games of the year and that 12:01 am Sept. 25 will be a memorable moment for thousands of gamers.”
The conclusion of “Halo 2” left unanswered questions around the fates of the beloved protagonist Master Chief™ and his artificial intelligence sidekick Cortana® as they struggle to save humankind from destruction at the hands of the alien coalition known as the Covenant. The legions of dedicated fans lining the streets tonight are waiting for the chance to be among the first to own the coveted final chapter in the “Halo” trilogy and unearth the well-kept secrets of the storyline.
“Our customers have been waiting for ‘Halo 3’ since the day after ‘Halo 2’ launched in 2004,” said Jill Hamburger, vice president of movies and games at Best Buy. “‘Halo 3’ is going to bring the experience to new levels, and we are excited to help our customers get the best possible game playing experience.”
Developed by Bungie Studios, the “Halo” franchise is exclusive to the Xbox 360 video game and entertainment system and optimized for the Xbox LIVE® online entertainment network. The more than 7 million Xbox LIVE users will get a continually evolving gaming experience with “Halo 3” and its online multiplayer and cooperative gameplay for Xbox LIVE Gold users, the much-talked-about Saved Films feature that enables players to capture and save their favorite moments on their hard drives, and Forge, an innovative map editor that enables infinite customization options.
“With ‘Halo 3,’ Bungie Studios has further mastered the art of marrying fantastic gameplay with the intangibles that make the experience extraordinary for gamers, evoking incredible emotion through its story and character development,” said Shane Kim, corporate vice president of Microsoft Game Studios. “That emotion is at the heart of what makes this more than a game and why ‘Halo’ connects with its audience in the way other great stories like ‘Star Wars’ resonated with theirs. But unlike the static experiences of a great film or novel, ‘Halo 3’ offers a dynamic and social interactive entertainment experience that enables players to finish the fight themselves.”
Regional Marquee Events and Global Celebration
More than 10,000 retailers are planning events and opening their doors at midnight to celebrate this third installment in the billion-dollar franchise. In New York, Seattle, Miami and Los Angeles, Microsoft and retail partners are hosting marquee launch events that will feature contests and appearances by local celebrities and celebrities and professional athletes who are fanatical about the “Halo” franchise.
The marquee launch events will be held at the following stores:
• New York: Best Buy, 529 5th Ave, New York, N.Y. 10017
• Seattle: Best Buy, 457 120th Ave NE, Bellevue, Wash. 98005
• Los Angeles: GameStop, 1000 Universal Studios Blvd, Universal City, Calif. 91608
• Miami: Circuit City, 8575 Northwest 13th Terrace, Miami, Fla. 33126
A list of retail outlets opening at 12:01 a.m. can be found at http://www.xbox.com/unitetofight.
More than 1.5 million copies of “Halo 3” have been sold before a single store opens its doors at midnight, making this the fasting pre-selling game in history, surpassing the previous record-setting pre-sales of “Halo 2.” Well beyond just a U.S. phenomenon, the launch of “Halo 3” is a worldwide celebration that is releasing in 37 countries and available in 17 languages.
Made exclusively for Xbox 360, “Halo 3” will be made available in three versions: Standard Edition at $59.99 (U.S. ERP*), Limited Edition for $69.99 (U.S. ERP*), and the ultimate collector’s item, the Legendary Edition at $129.99 (U.S. ERP*). The Legendary Edition will be released in limited quantities and arrive in a highly collectible Spartan helmet case, along with two bonus discs full of exclusive content. The Limited Edition will ship in a sleek metal collector’s case and include the first bonus disc found in the Legendary Edition, as well as a special “Halo” fiction and art book. And for those who crave nothing more than the highly anticipated third chapter to one of the greatest gaming trilogies of all time, the Standard Edition will consist of the “Halo 3” game.
In November 2004 the world’s view of video games changed forever with the release of “Halo 2,” which generated a record-setting $125 million (U.S.) in sales within the first 24 hours and changed the way people think about interactive entertainment. Three years later, it remains the most-played game on Microsoft’s Xbox LIVE online gaming and entertainment network, with nearly 1 billion hours of online gaming logged to date.
About Xbox 360
Xbox 360 is a superior video game and entertainment system delivering the best games, unique entertainment features and a unified online gaming network that revolve around gamers. Xbox 360 will have a portfolio of more than 300 games and will be available in nearly 40 countries by the end of 2007. More information can be found online at http://www.xbox.com/xbox360.
About Xbox LIVE
Xbox LIVE is the first and most comprehensive unified online entertainment network seamlessly integrated throughout the entire console experience, making it easy for people to find the friends, games and entertainment they want from the moment they power on their Xbox 360 system. Xbox LIVE connects millions of members across 25 countries to enjoy hundreds of multiplayer games, downloadable games via Xbox LIVE Arcade, free and premium playable game demos, music videos, TV shows and movies in the United States as well as new game levels, characters and vehicles for all their favorite retail games. More information can be found online at http://www.xbox.com/en-us/live.
About Microsoft Game Studios
Microsoft Game Studios is a leading worldwide publisher and developer of games for the Xbox® and Xbox 360 video game systems, the Windows® operating system and online platforms. Comprising a network of top developers, Microsoft Game Studios is committed to creating innovative and diverse games for Windows (http://www.microsoft.com/games), including such franchises as “Age of Empires®,” “Flight Simulator” and “Zoo Tycoon®”; Xbox and Xbox 360 (http://www.xbox.com), including such games as “Gears of War” and franchises such as “Halo,” “Fable®,” “Project Gotham Racing®” and “Forza Motorsport®”; and MSN® Games (http://www.games.msn.com), the official games channel for the MSN network and home to such hits as “Bejeweled” and “Hexic®.”
About Bungie Studios
Bungie Studios was founded in 1991 with two goals: to develop games that combine brilliant technology, beautiful art, intelligent stories and deep gameplay, and then sell enough of those games to achieve its real goal of total world domination. Over the past 10 years, it has produced games such as the “Marathon” trilogy and the first two “Myth” games, hailed as classics by critics and gamers around the world. Bungie’s “Halo” franchise is an international award-winning action title that has grown into a global entertainment phenomenon, selling more than 14.8 million units worldwide, logging nearly one billion hours of multiplayer action on Xbox LIVE, and spawning action figures, books, a graphic novel, apparel and more. Bungie is currently at work on “Halo 3,” which represents the third chapter in this “Halo” trilogy and is slated for release on Sept. 25, 2007. More information on Bungie can be found at http://www.bungie.net
Friday, September 21, 2007
Now Really! Just what were you thinking?
1. When I go in I might cause pain. I cause you to spit and ask you not to swallow. I can fill your hole. What am I?
2. A finger goes in me. You fiddle with me when you're bored. The best man always has me first. What am I?
3. I'm spread before I'm eaten. Your tongue gets me off. People sometimes like to lick my nuts. What am I?
4. I go in hard. I come out soft. You blow me hard . What am I?
5. All day long it's in and out. I discharge loads from my shaft. Both men and women go down on me. What am I?
6. I come in many sizes. When I'm not well, I drip. When You blow me you feel good. What am I?
7. If I miss, I hit your bush. It's my job to stuff your box. When I come, it's news. What am I?
8. I offer protection. I get the finger ten times. You use your fingers to get me off. What am I?
9. I assist an erection. Sometimes big balls hang from me. I'm called a big swinger. What am I?
10. I'm at least 6 inches long. I leave foamy lubrication when engaged in my job. What am I?
Answers: Down Below
1. a dentist
2. a wedding ring
3. peanut butter
4.chewing gum
5. an elevator
6. a nose
7. a newspaper boy
8. a glove
9. a crane
10. a toothbrush, of course!
Now Really! Just what were you thinking?
Posted by Denis at 9:46 AM 0 comments
SQL Teaser PASS Special: Table Size
What will be the outcome of this script?
First we create a table with a total of 6000 bytes
Next we increase col2 from 1000 to 2000 bytes, this will give us a total of 7000 bytes
Finally we add col3 which has 1000 bytes, this will give us a total of 8000 bytes
First run these two statements
--Total size = 6000
CREATE TABLE TestSize (Col1 char(5000),col2 char(1000))
GO
--total size = 7000
ALTER TABLE TestSize
ALTER COLUMN col2 char(2000)
GO
Now what do you think will happen when you run this?
--total size should be 8000 bytes (5000 + 2000 + 1000)
ALTER TABLE TestSize
ADD Col3 char(1000)
GO
Now for bonus points. What book have I been reading.
Hint: the author is at PASS
Posted by Denis at 9:05 AM 0 comments
Labels: SQL Server 2000, SQL Server 2005, Teaser
Wednesday, September 19, 2007
Return A Rowcount By Using Count Or Sign
Sometimes you are asked by the front-end/middle-tier developers to return a rowcount as well with the result set. However the developers want you to return 1 if there are rows and 0 if there are none. How do you do such a thing?
Well I am going to show you two ways. the first way is by using CASE and @@ROWCOUNT, the second way is by using the SIGN function
For CASE we will do this
RETURN CASE WHEN @@ROWCOUNT > 0 THEN 1 ELSE 0 END
So that's pretty simple, if @@ROWCOUNT is greater than 0 return 1 for everything else return 0
Using the SIGN function is even easier, all you have to do is this
RETURN SIGN(@@ROWCOUNT)
That's all, SIGN Returns the positive (+1), zero (0), or negative (-1) sign of the given expression. In this case -1 is not possible but the other two values are
So let's see this in action
USE pubs
GO
--Case Proc
CREATE PROCEDURE TestReturnValues
@au_id VARCHAR(49) ='172-32-1176'
AS
SELECT *
FROM authors
WHERE au_id =@au_id
RETURN CASE WHEN @@ROWCOUNT > 0 THEN 1 ELSE 0 END
GO
--Sign Proc
CREATE PROCEDURE TestReturnValues2
@au_id VARCHAR(49) ='172-32-1176'
AS
SELECT *
FROM authors
WHERE au_id =@au_id
RETURN SIGN(@@ROWCOUNT)
GO
--Case Proc, 1 will be returned; default value is used
DECLARE @Rowcount int
EXEC @Rowcount = TestReturnValues
SELECT @Rowcount
GO
--Case Proc, 0 will be returned; dummy value is used
DECLARE @Rowcount int
EXEC @Rowcount = TestReturnValues 'ABC'
SELECT @Rowcount
GO
--Sign Proc, 1 will be returned; default value is used
DECLARE @Rowcount int
EXEC @Rowcount = TestReturnValues2
SELECT @Rowcount
GO
--Sign Proc, 0 will be returned; dummy value is used
DECLARE @Rowcount int
EXEC @Rowcount = TestReturnValues2 'ABC'
SELECT @Rowcount
GO
--Help the environment by recycling ;-)
DROP PROCEDURE TestReturnValues2,TestReturnValues
GO
Posted by Denis at 12:48 PM 0 comments
Labels: Count, Rowcount, Sign, SQL Functions, SQL Server 2000, SQL Server 2005, SQL Server 2008
Microsoft Office PerformancePoint Server 2007 Extends Microsoft’s Business Intelligence Solution
As part of its commitment to providing industry-leading business intelligence solutions, Microsoft Corp. has launched Microsoft® Office PerformancePoint™ Server 2007, an application that enables companies to drive performance through monitoring, analyzing and planning their business using one integrated solution. Microsoft Business Intelligence (BI) allows more people at all levels of an organization to make better decisions, and has the vision of reaching every decision-maker and adding value to every decision. With Office PerformancePoint Server 2007, Microsoft is building on its existing BI solution to enable companies to drive strategy development, alignment and accountability across the entire organization.
“First we built a highly scalable BI platform, then we built BI tools with an unparalleled ease of use. Today we are extending customer value by bringing an integrated performance management application to market,” said Chris Caren, general manager of Office Business Applications at Microsoft. “Our goal as a leading BI provider is to deliver the most complete and integrated BI product line with unparalleled ease of use, and this matches what customers have been waiting for.”
Office PerformancePoint Server 2007 takes the same approach as the rest of the Microsoft Business Intelligence product line — Office PerformancePoint Server 2007 is simple to use because of the familiar look and feel of the Microsoft Office interface, and it puts intelligence right where people work and collaborate. Office PerformancePoint Server 2007 is built to meet the functional and performance requirements of a large enterprise, but its competitive pricing allows companies of all sizes to use the application broadly throughout the organization. The application is very flexible, allowing businesspeople to build and manage plans, workflows and rules, while IT centrally controls security and information.
Strong Customer and Market Momentum
“Microsoft has developed and assembled and is launching a formidable business intelligence and performance management (BI/PM) strategy that will change market dynamics…,” said John Hagerty, vice president of AMR Research Inc. “Because of Microsoft’s ubiquitous presence within enterprises of all sizes, its BI/PM products will certainly have long-term impact on how buyers perceive and purchase information-based products across all areas of their companies.”
Customers have expressed their interest in implementing a performance-management application from Microsoft, as witnessed by the overwhelming size of the Community Technology Preview (CTP) program. In fact, at more than 10,000 organizations, the CTP program was larger than most performance-management application vendors’ installed base. Many of the customers involved in the CTP program were large, multinational organizations with very complex requirements.
“Timely and easy access to business data from multiple systems, delivered through a familiar interface, is critical in support of effective decision-making,” said George J. Carlin, director of business integration at Merck Research Laboratories. “Office PerformancePoint Server 2007 is intuitive and seamless, and has shown the ability to mine the data in developing answers to key business questions, allowing us to stay competitive in our field.”
Greater Business Opportunities for Partners
Microsoft’s complete and integrated Business Intelligence product line consists of SQL Server™ and the Microsoft Office system, and it gives solution providers and systems integrators a greater opportunity to develop comprehensive BI solutions that are customized to meet needs specific to a particular customer or industry. Microsoft has already extensively trained almost 1,000 partners worldwide on the application.
“Office PerformancePoint Server 2007 has expanded our portfolio of custom solutions and now enables us to more easily meet the needs of our existing customers,” said Eddie Short, vice president and global lead of business information management at Capgemini. “There’s been such a growth in customers wanting solutions to truly help improve business performance, and with Office PerformancePoint Server 2007, the open platform allows us to create Key Performance Indicators (KPIs) and dashboards that are tailored to our customers’ needs, and helps us build a revenue stream around BI.”
Posted by Denis at 12:45 PM 0 comments
Industry Leaders Develop Superspeed USB Interconnect USB (Universal Serial Bus) 3.0
Intel Corporation and other industry leaders have formed the USB 3.0 Promoter Group to create a superspeed personal USB interconnect that can deliver over 10 times the speed of today's connection. The technology, also developed by HP, Microsoft Corporation, NEC Corporation, NXP Semiconductors and Texas Instruments Incorporated, will target fast sync-and-go transfer applications in the PC, consumer and mobile segments that are necessary as digital media become ubiquitous and file sizes increase up to and beyond 25 Gigabytes.
USB (Universal Serial Bus) 3.0 will create a backward-compatible standard with the same ease-of-use and plug and play capabilities of previous USB technologies. Targeting over 10x performance increase, the technology will draw from the same architecture of wired USB. In addition, the USB 3.0 specification will be optimized for low power and improved protocol efficiency. USB 3.0 ports and cabling will be designed to enable backward compatibility as well as future-proofing for optical capabilities.
"USB 3.0 is the next logical step for the PC's most popular wired connectivity," said Jeff Ravencraft, technology strategist with Intel and president of the USB Implementers Forum (USB-IF). "The digital era requires high-speed performance and reliable connectivity to move the enormous amounts of digital content now present in everyday life. USB 3.0 will meet this challenge while maintaining the ease-of-use experience that users have come to love and expect from any USB technology."
Intel formed the USB 3.0 Promoter Group with the understanding that the USB-IF would act as the trade association for the USB 3.0 specification. A completed USB 3.0 specification is expected by the first half of 2008. USB 3.0 implementations will initially be in the form of discrete silicon.
The USB 3.0 Promoter Group is committed to preserving the existing USB device class driver infrastructure and investment, look-and-feel and ease-of-use of USB while continuing to expand this great technology's capabilities.
About the USB-IF
The non-profit USB Implementers Forum, Inc. was formed to provide a support organization and forum for the advancement and adoption of USB technology. The USB-IF facilitates the development of high-quality compatible USB devices, through its logo and compliance program and promotes the benefits of USB and the quality of products that have passed compliance testing. Further information, including postings of the most recent product and technology announcements, is available by visiting the USB-IF Web site at www.usb.org.
Participating Company Press Quotes:
"HP's commitment to providing customers with a reliable method for connecting peripherals is evident through our support of both USB 2.0 and Wireless USB technologies," said Phil Schultz, vice president, Consumer Inkjet Solutions, HP. "Now, with USB 3.0, we're creating an even better experience for customers when connecting their printers, digital cameras or other peripheral devices to their PCs."
"Intel worked jointly with industry leaders in the development and adoption of two generations of USB, which has become the number one peripheral interface in computing and hand-held consumer electronic devices," said Patrick Gelsinger, senior vice president and general manager, Digital Enterprise Group, Intel Corporation. "As the market evolves to support customer demands for storing and moving larger amounts of digital content, we look forward to developing the third generation of USB technology that leverages the current USB interface and optimize it to meet these demands."
"NEC has been a supporter of USB technologies since the first installment of wired USB," said Katsuhiko Itagaki, general manager, SoC Systems Division, NEC Electronics Corporation. "Now it's time to evolve an already successful interface to meet market demands for moving large amounts of content at faster speeds to minimize users wait time."
" NXP is pleased to join other top-tier companies in advancing the number one interconnect technology in the world to meet the needs of next-generation peripherals," said Pierre-Yves Couteau, director of Strategy & Business Development, Business Line Connected Entertainment, NXP Semiconductors. "As a leading provider of USB semiconductor solutions, NXP is committed to drive the standardization and applications of Superspeed USB in the industry."
"With the proliferation of Hi-Speed USB in a wide number of market segments, including personal computing, consumer electronics, and mobility, we anticipate that USB 3.0 will rapidly become the de facto standard as the replacement of USB 2.0 ports in applications where higher bandwidth is valued," said Greg Hantak, vice president Worldwide ASIC at Texas Instruments Incorporated. "TI is excited about the new applications and improved user experience that will be enabled by the performance of USB 3.0."
Posted by Denis at 11:54 AM 0 comments
SQL Injection Cheat Sheet
What is SQL Injection? From wikipedia: SQL injection is a technique that exploits a security vulnerability occurring in the database layer of an application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed
Here is a nice SQL injection cheat sheet. Currently only for MySQL and Microsoft SQL Server, some ORACLE and some PostgreSQL
http://ferruh.mavituna.com/makale/sql-injection-cheatsheet/
Table Of Contents
About SQL Injection Cheat Sheet
Syntax Reference, Sample Attacks and Dirty SQL Injection Tricks
Line Comments
SQL Injection Attack Samples
Inline Comments
Classical Inline Comment SQL Injection Attack Samples
MySQL Version Detection Sample Attacks
Stacking Queries
Language / Database Stacked Query Support Table
About MySQL and PHP
Stacked SQL Injection Attack Samples
If Statements
MySQL If Statement
SQL Server If Statement
If Statement SQL Injection Attack Samples
Using Integers
String Operations
String Concatenation
Strings without Quotes
Hex based SQL Injection Samples
String Modification & Related
Union Injections
UNION – Fixing Language Issues
Bypassing Login Screens
Enabling xp_cmdshell in SQL Server 2005
Other parts are not so well formatted but check out by yourself, drafts, notes and stuff, scroll down and see.
Posted by Denis at 10:38 AM 0 comments
Labels: Best Practices, Security, SQL Injection
Microsoft Codename Astoria - Sept 2007 Community Technology Preview Available For Download
Brief Description
(CTP Refresh for Visual Studio 2008 Beta 2)The Microsoft Codename "Astoria" CTP toolkit enables developers to create and consume Data Services for the Web. These services expose application data over a simple HTTP interface that can be consumed by AJAX-based web sites and Rich Interactive Applications.
Overview
The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within corporate networks and across the internet. The data service is reachable over regular HTTP requests, and standard HTTP verbs such as GET, POST, PUT and DELETE are used to perform operations against the service.
The payload format for the data exchanged with the service can be controlled by the client and all options are simple, open formats such as plan XML and JSON.
The use of web-friendly technologies make it ideal as a data back-end for AJAX-style applications, Rich Interactive Applications and other applications that need to operate against data that is across the web.
The first Astoria CTP is a dual release, making Astoria available in the form of downloadable bits that can be used to build data services that are entirely contained within a single computer or network and as an experimental online service that you can use to create online stores that are hosted by Microsoft and are accessible over the internet.
This September 2007 CTP is mostly a refresh of the past May 2007 that enables developers to use Astoria together with Visual Studio 2008 Beta 2 and the ADO.NET Entity Framework and Tools Beta 2.
Download it here: http://www.microsoft.com/downloads/details.aspx?FamilyId=0FA1413C-CB55-4577-960E-0F3491847F58&displaylang=en
Posted by Denis at 9:58 AM 0 comments
Labels: ADO.NET Entity Framework, Ajax, Astoria, JSON, Visual Studio 2008
Tuesday, September 18, 2007
Microsoft Releases .NET Micro Framework 2.0 Service Pack 1, Announces New Partner Deployments
Microsoft Corp. announced the availability of Service Pack 1 (SP1) for the Microsoft® .NET Micro Framework 2.0, featuring new enhancements to build more secure, attractive, innovative and globalized applications. Demonstrating further momentum, Microsoft also announced that several partners completed ports of the .NET Micro Framework to additional development platforms and released new products built on the .NET Micro Framework.
The new features of Service Pack 1 provide precision-engineered functionality and tools that streamline the manufacturing process and ease the burdens often associated with the deployment of updates to devices in the field. Original equipment manufacturers (OEMs) and original device manufacturers (ODMs) can use the new tools to create their own customized deployment software for their unique manufacturing environments.
With SP1, developers and device-makers gain the ability to help prevent unsigned firmware or application code from being installed on a device. SP1 also provides a new tool for generating bitmap fonts for applications, giving application developers increased flexibility in interface design and providing increased localization support.
“Since the launch of .NET Micro Framework earlier this year, the interest we’ve received from the embedded community has been tremendous,” said Colin Miller, product unit manager of the .NET Micro Framework at Microsoft. “The support we’ve received from partners is a testament to the value the platform provides, and fuels our commitment to expand Microsoft’s embedded offerings into the territory of smaller, less expensive and more resource-constrained devices.”
Combining the reliability and efficiency of managed code with the development tools of Microsoft Visual Studio®, the .NET Micro Framework provides flexibility, cost-efficiency and productivity for developing applications on small resource-constrained devices.
At ESC Boston, Atmel Corp., NXP Semiconductors, Adeneo, SJJ Embedded Micro Solutions LLC and EmbeddedFusion have all announced enhanced or added support for the .NET Micro Framework, broadening the scope of available resources for device-makers and developers.
Atmel Ports .NET Micro Framework Onto the AT91SAM9261 Microcontroller
Atmel, a leading microcontroller manufacturer, announced a port of the Microsoft .NET Micro Framework onto its AT91SAM9261 ARM9-based microcontroller.
“The .NET Micro Framework is a compelling platform as it’s a key differentiator for applications that require fewer features than high-end operating systems, and it provides interoperability with the PC world,” said Jean-Christophe Zettel, applications manager for Atmel’s ARM-based products. “The AT91SAM7 microcontrollers and AT91SAM9 application processors perfectly match the requirements of systems that .NET Micro Framework targets, and are ideally suited for a wide range of applications addressed by .NET Micro Framework.”
NXP Ports .NET Micro Framework Onto LPC2000 Microcontroller
NXP, the independent semiconductor company founded by Philips, announced that the Microsoft .NET Micro Framework has been ported to support NXP’s popular LPC2000 microcontroller family based on the ARM7 processor.
“With support for the Microsoft .NET Micro Framework, we expect to reach a broad range of embedded and desktop developers building feature-rich applications for portable, energy-efficient products,” said Geoff Lees, general manager, Microcontroller Product Line, NXP Semiconductors. “For developers using Microsoft Visual Studio, it’s now easier than ever to use NXP LPC2000 microcontrollers to accelerate the development of applications for small-footprint, low-power devices.”
Adeneo Ports .NET Micro Framework to Atmel and NXP Microcontrollers
Adeneo, a Microsoft Windows® Embedded Gold Partner with facilities in Europe and in the United States, announced that it has ported .NET Micro Framework onto Atmel’s AT91SAM9261 and NXP’s LPC3180 ARM9-based microcontrollers.
These ports demonstrate the ability of Adeneo to offer engineering services to OEMs looking to build home automation, medical, industrial or other products with resource constraints, on the .NET Micro Framework.
SJJ Embedded Micro Solutions Unveils Low-Cost Development Kit for the .NET Micro Framework
SJJ Embedded Micro Solutions, a Windows Embedded Partner, announced the launch of its Embedded Development Kit (EDK) for .NET Micro Framework. The EDK contains a multipurpose development board with the .NET Micro Framework already installed and ready to run C# applications. The kit includes a step-by-step instruction manual to guide engineers, students and hobbyists through the process of developing .NET Micro Framework managed code applications.
EmbeddedFusion Extends Its .NET Micro Framework Product Line
EmbeddedFusion, a provider of integrated hardware and software core solutions for developers of embedded systems, announced the Meridian/B CPU, a lower-cost variant of the existing Meridian/A product. Meridian/B is aimed at .NET Micro Framework devices that do not require liquid crystal display (LCD) or an alternative to the 2.7-inch display supported on the original Meridian CPU. The Meridian/B CPU is suitable for a wide variety of products including Windows SideShow™-enabled devices, industrial monitoring and control devices, instrumentation, medical, security, and home automation products.
The Microsoft Connected Experience
Microsoft has developed a complete embedded product family that supports the extremely diverse needs of the embedded device industry helping to drive smart connected experiences. Microsoft offers three platforms to serve the varied needs of the embedded category: Windows XP Embedded, Windows Embedded CE and the .NET Micro Framework. Microsoft also offers a retail-optimized operating system platform designed for retail point-of-service systems called Windows Embedded for Point of Service, based on the technologies available in Windows XP Embedded with Service Pack 2. Microsoft embedded platforms can be found everywhere from computer devices such as cash registers, automated teller machines (ATMs), industrial controllers, gateways, Internet protocol (IP) telephones, server appliances, Windows-based thin clients, advanced consumer electronics, specialized handheld devices and more.
Those interested in learning more about .NET Micro Framework can visit http://msdn2.microsoft.com/en-us/embedded/bb267253.aspx. More information about Windows Embedded is available at http://www.microsoft.com/Windows/embedded/default.mspx.
About .NET Micro Framework
The .NET Micro Framework expands Microsoft’s embedded offerings into a new market of simpler devices that are based on low-cost 32-bit processors and are constrained in terms of memory, battery power or other resources. By providing powerful, modern programming paradigms to this arena, the .NET Micro Framework is aimed at accelerating the innovation of small, connected devices. More information can be found at http://msdn.microsoft.com/embedded/netmf.
Posted by Denis at 8:44 AM 0 comments
Labels: .NET Micro Framework, Mobile, Windows Embedded
Thursday, September 13, 2007
Podcast: Learn about System Center Data Protection Manager 2007
Channel 9 has posted their latest podcast: Learn about System Center Data Protection Manager 2007
Currently in Beta 2, and set to release later this year, System Center Data Protection Manager 2007 combines the best aspects of continuous data protection (CDP) and traditional tape backup to provide a complete data protection solution using disk and tape. DPM is designed to protect Microsoft Exchange Server, SQL Server, SharePoint Services, as well as most Windows Server and Windows desktop environments. For this TechNet Radio session, learn all about the rich new features and functionality in DPM 2007.
Eric Ostrowski – Your Show Host and TechNet Radio Producer
Matt Hester – IT Pro Evangelist
Jason Buffington – Technical Product Manager
Posted by Denis at 10:52 AM 0 comments
Do You Know How Between Works With Dates?
Do you use between to return data that has dates? Do you know that between will get everything since midnight from the first criteria and up to midnight exactly from the second criteria. If you do BETWEEN 2006-10-01 AND 2006-10-02 then all the values that are greater or equal than 2006-10-01 and less or equal to 2006-10-02 will be returned. So no values after 2006-10-02 midnight will be returned.
Let's test this out, first let's create this table
CREATE TABLE SomeDates (DateColumn DATETIME)
Insert 2 values
INSERT INTO SomeDates VALUES('2006-10-02 00:00:00.000')
INSERT INTO SomeDates VALUES('2006-10-01 00:00:00.000')
Return everything between '2006-10-01' and '2006-10-02'
SELECT *
FROM SomeDates
WHERE DateColumn BETWEEN '20061001' AND '20061002'
ORDER BY DateColumn
This works without a problem
Let's add some more dates including the time portion
INSERT INTO SomeDates VALUES('2006-10-02 00:01:00.000')
INSERT INTO SomeDates VALUES('2006-10-02 00:00:59.000')
INSERT INTO SomeDates VALUES('2006-10-02 00:00:01.000')
INSERT INTO SomeDates VALUES('2006-10-01 00:01:00.000')
INSERT INTO SomeDates VALUES('2006-10-01 00:12:00.000')
INSERT INTO SomeDates VALUES('2006-10-01 23:00:00.000')
Return everything between '2006-10-01' and '2006-10-02'
SELECT *
FROM SomeDates
WHERE DateColumn BETWEEN '20061001' AND '20061002'
ORDER BY DateColumn
Here is where it goes wrong; for 2006-10-02 only the midnight value is returned the other ones are ignored
Now if we change 2006-10-02 to 2006-10-03 we get what we want
SELECT *
FROM SomeDates
WHERE DateColumn BETWEEN '20061001' AND '20061003'
ORDER BY DateColumn
Now insert a value for 2006-10-03 (midnight)
INSERT INTO SomeDates VALUES('2006-10-03 00:00:00.000')
Run the query again
SELECT *
FROM SomeDates
WHERE DateColumn BETWEEN '20061001' AND '20061003'
ORDER BY DateColumn
We get back 2006-10-03 00:00:00.000; between will return the date if it is exactly midnight
If you use >= and < then you get exactly what you need
SELECT *
FROM SomeDates
WHERE DateColumn >= '20061001' AND DateColumn < '20061003'
ORDER BY DateColumn
--Clean up
DROP TABLE SomeDates
So be careful when using between because you might get back rows that you did not expect to get back and it might mess up your reporting if you do counts or sums
Posted by Denis at 9:08 AM 2 comments
Labels: Dates, Datetime, Howto, SQL Server 2000, SQL Server 2005, SQL Server 2008
Wednesday, September 12, 2007
Microsoft Introduces Star-Studded Lineup of Japanese Developers and Blockbuster New Games for Xbox 360
Flanked by a who’s who of Japanese gaming luminaries and video game development legends, Takashi Sensui, general manager of the Home and Entertainment Division at Microsoft Co. Ltd., took the stage at the Yebisu Garden Hall during Xbox 360 Briefing 2007 to announce support from some of Japan’s most renowned game developers and unveil an unparalleled lineup of holiday blockbuster hits and exclusives for the Xbox 360® video game and entertainment system.
Two of Japan’s most celebrated game developers, Tomonobu Itagaki from Team NINJA/Tecmo Ltd. and Hironobu Sakaguchi from Mistwalker, joined Sensui onstage to announce their support for the Xbox 360 platform. Itagaki highlighted the announcement that Team NINJA will develop “NINJA GAIDEN® 2,” the true sequel to the best-selling and critically acclaimed Xbox® original, exclusively for Xbox 360. Sakaguchi revealed pricing1 and availability for Mistwalker’s upcoming role-playing game (RPG) “Lost Odyssey™,” available Dec. 6, 2007, in Japan, and around the world in early 2008. In addition, representatives from SQUARE ENIX took the stage to discuss two new games for Xbox 360: “INFINITE UNDISCOVERY™” and “THE LAST REMNANT™.”
Japanese Developers Embrace Xbox 360
“NINJA GAIDEN® 2” is the long-awaited sequel to the platinum-selling Xbox original, where players once again assume the role of Ryu Hayabusa as they guide the ninja hero on a quest to avenge his clan and prevent the destruction of the human race. Team NINJA’s announcement that “NINJA GAIDEN® 2” will be exclusive to Xbox 360 and available worldwide in 2008 provided gamers everywhere with plenty of reason for excitement, and served as yet another example of the blockbuster games being created by Japanese developers exclusively for the platform.
Xbox 360 owners in Japan will be the first to experience the magical world of “Lost Odyssey,” created by Mistwalker/feelplus Inc., and featuring a beautifully told story by Hironobu Sakaguchi, creator of the “Final Fantasy” video game franchise. Available Dec. 6, 2007, in Japan, January 2008 in Asia, and February 2008 in North America and Europe, “Lost Odyssey” headlines a lineup of games by Japanese developers for Xbox 360 owners around the world this holiday, including these:
• “Ace Combat 6: Fires of Liberation” (NAMCO BANDAI Games). “Ace Combat 6: Fires of Liberation” takes players up to the sky and into the heat of realistic air combat with next-generation audio and visual effects and online multiplayer action.2 Available this holiday, only on Xbox 360.
• “Beautiful Katamari” (NAMCO BANDAI Games). Marking the debut of Namco’s beloved ball-rolling puzzle game on a next-generation platform, “Beautiful Katamari,” the fourth installment of the “Katamari” series, features levels of quirkiness, cosmic animations and musical stylings never seen before. Available in October.
• “Lost Odyssey” (Microsoft Game Studios/Mistwalker/feelplus Inc.). Famed game producer Hironobu Sakaguchi leads a staff of gaming masters to bring a truly next-generation role-playing experience to Xbox 360 in “Lost Odyssey.” Players will be led through a dramatic story of massive scale that features breathtaking visuals and an epic adventure made possible only by the power of Xbox 360. Available Dec. 6, 2007, in Japan, and worldwide in 2008, only on Xbox 360.
Plus:
“Battlefield: Bad Company” (Electronic Arts)
• “Battlestations: Midway” (Eidos Interactive Ltd.)
• “Bladestorm: The Hundred Years’ War” (KOEI Co. Ltd.)
• “CASTLE SHIKIGAMI III” (ArcSystemWorks Co. Ltd.)
• “Dynasty Warriors 6” (KOEI Co. Ltd.)
• “Dynasty Warriors: Gundam” (NAMCO BANDAI Games)
• “Final Fantasy XI Play Online All in One Pack 2007” (SQUARE ENIX)
• “Final Fantasy XI Wings of the Goddess” (SQUARE ENIX)
• “Just Cause” (Electronic Arts)
• “Mobile Ops: The One Year War” (NAMCO BANDAI Games)
• “Operation Darkness” (SUCCESS Corp.)
• “Winning Eleven: Pro Evolution Soccer 2008” (Konami)
• “ZOIDS ALTERNATIVE” (TOMY Co. Ltd.)
This incredible lineup joins many other amazing games from developers around the globe that will be available this holiday in Japan and around the world, including the following:
• “Assassin’s Creed” (Ubisoft Entertainment). “Assassin’s Creed” is the next-generation game developed by Ubisoft that merges technology, game design, theme and emotions into a world where players will assume the role of the main character, Altair, and will have the power to throw their immediate environment into chaos and experience the art of a master assassin. Available this November.
• “Halo 3” (Microsoft Game Studios/Bungie Studios). In “Halo® 3,” the third installment of the landmark “Halo” trilogy and hugely anticipated sequel to the critically acclaimed “Halo 2,” people everywhere can take on the role of Master Chief™ and experience Master Chief’s greatest battle as he launches an epic mission to stop the Covenant, destroy the impending Flood threat and ultimately save mankind. In this third chapter of the “Halo” trilogy, Master Chief returns to face his greatest challenge as he readies himself for the final battle and seals his place in history. A hero must rise. Believe. Available worldwide, with availability in the United States on Sept. 25 and Japan on Sept. 27, only on Xbox 360.
• “Kingdom Under Fire: Circle of Doom” (Microsoft/Blueside Inc.). Six heroes from the “Kingdom Under Fire” universe fight their way through the Dark Dimension against hordes of demented monsters in a twisted action RPG exclusive to Xbox 360. Coming this winter, “KUF:COD” features seamless four-player co-op2 via Xbox LIVE®, randomly generated maps and nearly infinite weapons combos with unique abilities, enhancements and magical powers for players to learn and master.
• “Project Gotham Racing 4” (Microsoft Game Studios/Bizarre Creations Ltd.). “Project Gotham Racing® 4” will redefine the acclaimed “PGR®” franchise by delivering a unique, exciting racing experience complete with dynamic weather and iconic cars and motorcycles. Available this October, only on Xbox 360.
• “Viva Piñata: Party Animals” (Microsoft Game Studios/Krome Studios Pty. Ltd.). An exciting new party game based on the critically acclaimed Xbox 360 exclusive and hit animated TV series, “Viva Piñata™: Party Animals” brings back the familiar piñata characters and invites players to compete in more than 40 mini-games against friends at home or over Xbox LIVE.2 Available this holiday season, only on Xbox 360.
“Gamers around the world can look forward to the greatest holiday lineup in video game history,” said Don Mattrick, senior vice president of the Interactive Entertainment Business in the Entertainment and Devices Division at Microsoft Corp. “We continue to evolve our strong relationships with Japan’s best and most innovative developers, and we’re looking forward to delivering exclusive high-definition titles for consumers worldwide, this year and beyond.”
Xbox LIVE Arcade Continues High-Definition Downloadable Games Innovation in Japan
Japanese developers have long embraced and championed Xbox LIVE Arcade, with hits including “Pac-Man Championship Edition” (NAMCO BANDAI Games), “Bomberman Live” (Hudson Entertainment), “Frogger” (Konami) and “Fatal Fury Special” (SNK PLAYMORE Corp.). Several new titles from these and other Japanese developers will be added to the diverse portfolio of digitally distributed, high-definition original and classic games currently available on Xbox LIVE Arcade, including the following:
• “Every Extend Extra Extreme” (Q Entertainment). The latest creation from Q Entertainment, “Every Extend Extra Extreme,” or E4, is a unique action-packed shooter where the goal is to perfectly time your self-destruction to create chain reactions that explode surrounding enemies. With outrageous visuals and the ability to play your own favorite music, E4 puts a new twist on puzzle shooter games.
• “EXIT” (Taito). An addictive, frenzied puzzle game, “EXIT” has players using their decision-making skills and wits to escape numerous obstacles, while rescuing people from more than 100 different emergencies. Players must save as many lives as possible while finding the fastest way out when “EXIT” arrives on Xbox LIVE Arcade by the end of the year.
• “Ikaruga” (Treasure Co. Ltd.). “Ikaruga” is a quick-paced shooter with strong strategy elements featuring a slow-motion training mode and co-op play for two.2 Available soon for download from Xbox LIVE Arcade, “Ikaruga” is the perfect combination of beautiful, manga-style storytelling and refined, ultra-challenging arcade heroics.
• “OMEGA FIVE” (Hudson Entertainment). “OMEGA FIVE” is a next-generation, high-definition shooter with awe-inspiring graphics. Players fly through dangerous 3-D environments in this side-scroller and try to avoid the enemies that come at them from all sides, even from behind.
• “Rez” (Q Entertainment). “Rez,” the legendary action-shooter created by Tetsuya Mizuguchi, is coming to Xbox LIVE Arcade. A fast-moving, wire-frame adventure backed by industrial beats, the story of “Rez” takes players deep into the world’s computer network, where they must hack the system, altering the visual output and even taking over the music, creating their own rhythms and eye candy as they dig deeper into the dreamlike cyberworld.
• “Triggerheart Exelica” (Warashi). A shoot’em-up game where players battle against hordes of enemy ships, “Triggerheart Exelica” dynamically adjusts the difficulty to match a player’s skill level. “Triggerheart Exelica” launches on Xbox LIVE Arcade this year.
Other exciting Xbox LIVE Arcade games available in the coming months include these:
• “Braid” (Number None Inc.). Arriving in early 2008 on Xbox LIVE Arcade, “Braid” is a platformer/puzzle game. The player journeys across seven worlds to rescue a princess; in each world, time behaves in its own peculiar way. The player must cleverly manipulate the flow of time to solve puzzles. “Braid” aims to provide a mind-expanding, filler-free experience.
• “Castlecrashers” (The Behemoth). Arriving in early 2008 on Xbox LIVE Arcade, “Castlecrashers” is the second title currently in development by award-winning independent developer the Behemoth. The four-player RPG adventure will let players hack, slash and smash their way to victory. “Castlecrashers” delivers unique high-resolution illustrated visuals, including memorably hand-drawn characters that are cute and menacing at the same time. Gamers can play with up to three friends locally or over Xbox LIVE2 and discover mind-boggling magic and mystery in the amazing world of “Castlecrashers.”
• “Schizoid” (Torpex Games LLC). “Schizoid,” from independent studio Torpex Games, is the first Xbox LIVE Arcade game to be created with XNA™ Game Studio. Debuting on Xbox LIVE Arcade later this year, “Schizoid” is an action-packed game focused on co-op gameplay2 in which players smash barrages of glowing enemies while cooperating closely to protect each other.
Microsoft Brings Tokyo Game Show Home With Xbox LIVE
Once again, Microsoft will bring the Tokyo Game Show experience into living rooms worldwide as it offers its “TGS Bring It Home” programming, delivering hours of coverage from the press briefing, all the best highlights from the show floor, interviews with developers, gameplay videos, exclusive cinematic trailers and a variety of Xbox 360 content for gamers to download over Xbox LIVE Marketplace, beginning Sept. 13, 2007.
About Xbox 360
Xbox 360 is a superior video game and entertainment system delivering the best games, unique entertainment features and a unified online gaming network that revolve around gamers. Xbox 360 will have a portfolio of more than 300 games and will be available in nearly 40 countries by the end of 2007. More information can be found online at http://www.xbox.com/xbox360.
Screencast: Building N-Tier Applications in Visual Studio 2008
Channel 9 has made available their latest screen cast: Building N-Tier Applications in Visual Studio 2008
From the site:
In this in interview John Stallo, a Program Manager on the Visual Basic Team, talks about WCF and simple N-Tier applications. He talks about a specific architecture scenario and some of the pain points we have building n-tier applications today. He then walks us through the improvements made in the DataSet Designer that physically separates the data access from the structure and validation code and then quickly creates a WCF service and a client that demonstrates this architecture.
0:00 Intro
1:33 Architecture discussion
6:30 N-tier project layout
7:15 Separating data access code (TableAdapters) from the structure (DataSet)
10:36 Adding validation code
12:55 Creating the WCF service
15:31 Adding the service reference on the client and reusing types
19:17 Databinding to the client form and calling the service
Watch the screencast(WMV)
Posted by Denis at 8:05 AM 0 comments
Labels: Screen Cast, Visual Studio 2008
Bill Clinton Jogging
Bill Clinton started jogging near his new home in Chappaqua. But on each run he happened to jog past a hooker standing on the same street corner, day after day.
With some apprehension he would brace himself as he approached her for what was most certainly to follow.
"Fifty dollars!" she would cry out from the curb.
"No, Five dollars!" fired back Clinton ..
This ritual between Bill and the hooker continued for days.
He'd run by and she'd yell, "Fifty dollars!" And he'd yell back, "Five dollars!"
One day however, Hillary decided that she wanted to accompany her husband on his jog! As the jogging couple neared the problematic street corner, Bill realized the "pro" would bark her $50 offer and Hillary would wonder what he'd really been doing on all his past outings.
He realized he should have a darn good explanation for the junior Senator.
As they jogged into the turn that would take them past the corner, Bill became even more apprehensive than usual.
Sure enough, there was the hooker!
Bill tried to avoid the prostitute's eyes as she watched the pair jog past. Then, from the sidewalk, the hooker yelled...
See what you get for five bucks!?"
Posted by Denis at 7:35 AM 0 comments
Tuesday, September 11, 2007
Cumulative update package 3 for SQL Server 2005 Service Pack 2 Available
Cumulative update package 3 for SQL Server 2005 Service Pack 2 is available.
How to obtain Cumulative Update 3 for SQL Server 2005 Service Pack 2
A supported cumulative update package is now available from Microsoft. However, it is intended to correct only the problems that are described in this article. Apply it only to systems that are experiencing these specific problems. This cumulative update package may receive additional testing. Therefore, if you are not severely affected by any of these problems, we recommend that you wait for the next SQL Server 2005 service pack that contains the hotfixes in this cumulative update package.
To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the cumulative update package. To submit an online request to obtain the cumulative update package, visit the following Microsoft Web site:
http://go.microsoft.com/?linkid=6294451
Here is what is fixed:
50001581
938243 (http://support.microsoft.com/kb/938243/)
FIX: Error message when you run a full-text query against a catalog in SQL Server 2005: “The execution of a full-text query failed. The content index is corrupt."
50001585
938712 (http://support.microsoft.com/kb/938712/)
FIX: Some records in the fact table may not be processed when you process a dimension that contains many attributes or many members in SQL Server 2005
50001499
938962 (http://support.microsoft.com/kb/938962/)
FIX: You may receive an access violation or error 942 when you drop a database in SQL Server 2005
50001524
939563 (http://support.microsoft.com/kb/939563/)
FIX: Error message when you synchronize a merge replication in Microsoft SQL Server 2005: "MSmerge_del_
50001582
939942 (http://support.microsoft.com/kb/939942/)
FIX: You receive an error message when you try to access a report after you configure SQL Server 2005 Reporting Services to run under the SharePoint integrated mode
50001583
940128 (http://support.microsoft.com/kb/940128/)
FIX: You receive error 8623 when you run a complex query in SQL Server 2005
50001586
940129 (http://support.microsoft.com/kb/940129/)
FIX: An MDX query does not return results when you execute the query against a cube that contains an unnatural hierarchy in a dimension in SQL Server 2005 Analysis Services
50001517
940160 (http://support.microsoft.com/kb/940160/)
FIX: Error message when you deploy a SQL Server 2005 Analysis Service project that contains many cubes, and the cubes contain linked measure groups: "Unexpected internal error"
50001449
940210 (http://support.microsoft.com/kb/940210/)
FIX: Error message when you try to insert more than 3 megabytes of data into a distributed partitioned view in SQL Server 2005: "A system assertion check has failed"
50001447
940220 (http://support.microsoft.com/kb/940220/)
FIX: Error message when you run a SQL Server 2005 Integration Services package that contains an FTP task: “An error occurred in the requested FTP operation"
50001448
940221 (http://support.microsoft.com/kb/940221/)
FIX: Error message when you try to create an Oracle publication by using the New Publication Wizard in Microsoft SQL Server 2005 Service Pack 2: “OLE DB Provider "OraOLEDB.ORACLE" for Linked server
50001451
940223 (http://support.microsoft.com/kb/940223/)
FIX: Error message when you synchronize a subscription by using Windows Synchronization Manager in SQL Server 2005: “The merge process failed to get correct information about the Interactive Resolver component from the Registry"
50001416
940260 (http://support.microsoft.com/kb/940260/)
FIX: Error message when you use Service Broker in SQL Server 2005: "An error occurred while receiving data: '64(The specified network name is no longer available.)'"
50001435
940269 (http://support.microsoft.com/kb/940269/)
FIX: Error message when you try to edit a SQL Server Agent job or a maintenance plan by using SQL Server Management Studio in SQL Server 2005: "String or binary data would be truncated"
50001567
940281 (http://support.microsoft.com/kb/940281/)
FIX: An access violation may occur, and you may receive an error message, when you query the sys.dm_exe_sessions dynamic management view in SQL Server 2005
50001351
940370 (http://support.microsoft.com/kb/940370/)
FIX: The "User:" prefix is lost for the event information that is generated by a child package in SQL Server 2005 Integration Services after you install SQL Server 2005 Service Pack 2
50001382
940373 (http://support.microsoft.com/kb/940373/)
FIX: The performance of a Multidimensional Expressions query in SQL Server 2005 Analysis Services Service Pack 2 is much slower than the performance in earlier builds of SQL Server 2005 Analysis Services
50001433
940378 (http://support.microsoft.com/kb/940378/)
Fix: Unable to Change Transaction Isolation Level After Cursor Declaration
50001479
940384 (http://support.microsoft.com/kb/940384/)
FIX: You receive a System.InvalidCastException exception when you run an application that calls the Server.JobServer.Jobs.Contains method on a computer that has SQL Server 2005 Service Pack 2 installed
50001494
940386 (http://support.microsoft.com/kb/940386/)
FIX: You cannot install SQL Server 2005 Reporting Services Add-in for Microsoft SharePoint Technologies on a beta version of Windows Server 2008-based computer
50001602
940545 (http://support.microsoft.com/kb/940545/)
FIX: The performance of insert operations against a table that contains an identity column may be slow in SQL Server 2005
50001589
940935 (http://support.microsoft.com/kb/940935/)
FIX: Error message when you run a parallel query in SQL Server 2005 on a computer that has multiple processors: “SQL Server Assertion: File:
50001599
940937 (http://support.microsoft.com/kb/940937/)
FIX: Error message when you try to update the index key columns of a non-unique clustered index in SQL Server 2005: " Cannot insert duplicate key row in object 'ObjectName' with unique index 'IndexName'"
50001609
940939 (http://support.microsoft.com/kb/940939/)
FIX: Data is not rolled back after you roll back a transaction that contains a writeback operation in SQL Server 2005 Analysis Services
50001629
940942 (http://support.microsoft.com/kb/940942/)
FIX: Error message when you run a stored procedure that references a table that is upgraded from SQL Server 2000 to SQL Server 2005: “A time-out occurred while waiting for buffer latch"
50001573
940949 (http://support.microsoft.com/kb/940949/)
FIX: You receive an error message when you run an UPDATE CUBE statement to update a cube in SQL Server 2005 Analysis Services
50001576
940962 (http://support.microsoft.com/kb/940962/)
FIX: When processing a dimension on SQL Server 2005 Analysis Services an error is raised with the following format: "The following file is corrupted: Physical file: \\?\
50001511
940126 (http://support.microsoft.com/kb/940126/)
FIX: Error 9003 is logged in the SQL Server error log file when you use log shipping in SQL Server 2005
50001436
940379 (http://support.microsoft.com/kb/940379/)
FIX: Error message when you use the UNLOAD and REWIND options to back up a database to a tape device in SQL Server 2005: "Operation on device '
50001412
940375 (http://support.microsoft.com/kb/940375/)
FIX: Error message when you use the Copy Database Wizard to move a database from SQL Server 2000 to SQL Server 2005
50001522
939562 (http://support.microsoft.com/kb/939562/)
FIX: Error message when you run a query that fires an INSTEAD OF trigger in SQL Server 2005 Service Pack 2: "Internal Query Processor Error The query processor could not produce a query plan"
50001224
937100 (http://support.microsoft.com/kb/937100/)
FIX: Error message when you run a SQL Server 2005 Integration Services package that contains a Script Component transformation: "Insufficient memory to continue the execution of the program"
50001415
940377 (http://support.microsoft.com/kb/940377/)
FIX: Error message when you process cubes for one of the named instances of SQL Server 2005 Analysis Services: "Error opening file"
50001523
938363 (http://support.microsoft.com/kb/938363/)
FIX: Data is not replicated to a subscriber in a different partition by using parameterized row filters in SQL Server 2005
50001529
940945 (http://support.microsoft.com/kb/940945/)
FIX: Performance is very slow when the same stored procedure is executed at the same time in many connections on a multiple-processor computer that is running SQL Server 2005
50001578
939285 (http://support.microsoft.com/kb/939285/)
FIX: Error message when you run a stored procedure that starts a transaction that contains a Transact-SQL statement in SQL Server 2005: "New request is not allowed to start because it should come with valid transaction descriptor"
50001525
938086 (http://support.microsoft.com/kb/938086/)
FIX: A SQL Server Agent job fails when you run the SQL Server Agent job in the context of a proxy account in SQL Server 2005
50000872
936252 (http://support.microsoft.com/kb/936252/)
The file name of Cumulative Update 3 for SQL Server 2005 Service Pack 2 is incorrectly associated with Microsoft Knowledge Base article 936252
50000872
The MDX query performance is slow in SQL Server 2005 Analysis Services because SQL Server 2005 Analysis Services does not reuse the data cache
50001109
The dta utility stops unexpectedly and an exception occurs in SQL Server 2005
50001224
When you run a SQL Server 2005 Integration Services package that uses the VariableDispenser class, the package fails and you receive an error message
50001365
After you install SQL Server 2005 Service Pack 2, you receive error 8624 if the result set of a fast forward cursor contains a certain number of columns
50001368
After you install SQL Server 2005 Service Pack 2, the performance of a MDX query is 10 times slower than the performance on SQL Server 2005 Analysis Services build 1555
50001396
When you open a SQL Server 2005 Reporting Services report after you install SQL Server 2005 Service pack 2, the parameter toolbar and the report toolbar does not appear correctly if you specify the SP_Full value for the rc:StyleSheet URL access parameter on a report URL
50001412
Error message when you use the Copy Database Wizard to move a database from SQL Server 2000 to SQL Server 2005: "Cannot drop database "Database_Name" because it is currently in use.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly"
50001414
Error message when you use the bcp utility together with the queryout option to bulk copy data from SQL Server 2005 to a file: "SQLState = HY000, NativeError = 0 Error = [Microsoft][SQL Native Client]BCP host-files must contain at least onecolumn"
50001415
After you install SQL Server 2005 Service Pack 2, the Msmdredir.ini file is frequently updated by each instance of SQL Server 2005
50001436
Error message when you use the BACKUP DATABASE statement together with the UNLOAD option and with the REWIND option to back up a tape device in SQL Server 2005: "Operation on device 'TAPE0(<\\.\Tape0>)' exceeded retry count"
50001461
When some MDX queries are executed at the same for the same role or for the same user in SQL Server 2005 Analysis Services, the CPU usage is very high
50001475
When you open a report that contains a date and time picker (DTP) control in SQL Server 2005 Reporting Services, the format of the DTP control appears incorrectly
50001511
Error 9003 occurs when you restore a transaction log backup in SQL Server 2005
50001520
The query syntax of a report is changed when you run the report in SQL Server 2005 Reporting Services Service Pack 2 on SAP BW 3.5
50001522
Error 8624 occurs when you run a query in SQL Server 2005 Service Pack 2 (SP2) or later versions. However, you can successfully run the query in pre-SP2 version of SQL Server 2005
50001523
After you install SQL Server 2005 Service Pack 2, publications that use precomputed partitions can cause the non-convergence of data
50001525
Error message when you use SQL Server Agent to run jobs by using a proxy account: " SQLServer Error: 22046, Encryption error using CryptProtectData, CryptUnprotectData failed (1723)"
50001526
Using SQL Server Agent to run jobs in the context of a proxy account may fail with error "SQLServer Error: 22046, Encryption error using CryptProtectData, CryptUnprotectData failed (1723)"
50001529
The performance of SQL Server 2005 decreases because SQL Server 2005 is waiting for access to memory objects which is indicated by the CMEMTHREAD waittype
50001578
An exception occurs in SQL Native Client: "New request is not allowed to start because it should come with valid transaction descriptor"
50001579
When you use SQL Native Client to retrieve a value in a column of the TEXT data type, you obtain incorrect result if the value contains more than 1024 characters
50001580
Memory leak of the TokenAndPermAccessCheckResult entries occurs in SQL Server 2005
50001595
When you use SQL Native Client for a connection, the connection switches to use the auto-commit mode from the manually-commit mode
50001598
SQL Native Client overwrite error codes which causes that you do not receive informative error messages when some operations fails
50001639
The performance of an INSERT statement or an UPDATE statement that uses the result from a query is much slower in SQL Server 2005 Service Pack 2 than in SQL Server 2005 Service Pack 1 or earlier versions if the query uses the nodes method
50001164
FIX: Error message when you connect to an instance of SQL Server 2008 Analysis Services by using the AMO library that is included with SQL Server 2005 Service Pack 2 Analysis Services: "Cannot connect to Analysis Services version '10.0.1019.17'"
Posted by Denis at 1:56 PM 0 comments
Labels: Hotfix, Service Pack, SQL Server 2005
Podcast: Don Demsak on LINQ to XML
DotNetRocks has published their latest podcast: Don Demsak on LINQ to XML.
From the site:
Don Demsak (DonXML) discusses LINQ to XML and the new XML language features in Visual Basic.
Don Demsak (a.k.a. DonXML) is a Microsoft MVP and an independent consultant who specializes in architecting and programming multi-tier applications using Microsoft's .Net framework. He is an evangelist that is known for preaching the benefits of XML, SVG, and the .Net framework on various discussion groups across the web and on his blog. He also enjoys the intellectual comradery of working with people from around the world. Don is one of the founders of the SharpVectorGraphics (aka SVG#) open source project, which is bringing SVG to the .Net framework and a member of XmlInsiders, a select group of international professionals who have a demonstrated expertise in Microsoft's XML technologies and who provide valuable, early feedback on related developing technologies and publications to their peers, the Microsoft XML team, and others.
Download it here: http://www.dotnetrocks.com/default.aspx?showNum=271
Posted by Denis at 12:41 PM 0 comments
Labels: LINQ, LINQ to XML, Podcast, XLINQ
The Real Reason China Is Adding Lead To All Their Products [joke]
Why do all the toys made in China have so much lead in them lately? Here is the reason; it is because of the language barrier. The supervisors from the US companies would call up the factories in China and ask if they can make the products redder by adding more red to the paint mixture. As you know Chinese people have a problem with the letter R and will usually substitute it with the letter L. So more red became more led which sounds exactly like lead. The factory supervisor in China would instruct the workers to add more lead and here is the problem.
So to solve the problem I propose not to make red product anymore ;-)
Posted by Denis at 12:14 PM 0 comments
How Are Dates Stored Internally In SQL Server?
Internally dates are stored as 2 integers. The first integer is the number of dates before or after the base date (1900/01/01). The second integer stores the number of clock ticks after midnight, each tick is 1/300 of a second.
So if we run the following code for the base date (1900/01/01)
DECLARE @d DATETIME
SELECT @d = '1900-01-01 00:00:00.000'
SELECT CONVERT(INT,SUBSTRING(CONVERT(VARBINARY(8),@d),1,4)) AS DateInt,
SUBSTRING(CONVERT(VARBINARY(8),@d),1,4) AS DateBinary
SELECT CONVERT(INT,SUBSTRING(CONVERT(VARBINARY(8),@d),5,4)) AS TimeInt, SUBSTRING(CONVERT(VARBINARY(8),@d),5,4) AS TimeBinary
Go
The results are
DateInt DateBinary
----------- ----------
0 0x00000000
TimeInt TimeBinary
----------- ----------
0 0x00000000
If we use the max date 9999/12/31
DECLARE @d DATETIME
SELECT @d = '9999-12-31 23:59:59.997'
SELECT CONVERT(INT,SUBSTRING(CONVERT(VARBINARY(8),@d),1,4)) AS DateInt,
SUBSTRING(CONVERT(VARBINARY(8),@d),1,4) AS DateBinary
SELECT CONVERT(INT,SUBSTRING(CONVERT(VARBINARY(8),@d),5,4)) AS TimeInt, SUBSTRING(CONVERT(VARBINARY(8),@d),5,4) AS TimeBinary
Go
we get the following result
DateInt DateBinary
----------- ----------
2958463 0x002D247F
TimeInt TimeBinary
----------- ----------
25919999 0x018B81FF
If you take binary values and convert to datetime you get the following results
SELECT CONVERT(DATETIME,0x0000000000000001) --1 Tick 1/300 of a second
------------------------------------------------------
--1900-01-01 00:00:00.003
SELECT CONVERT(DATETIME,0x000000000000012C) -- 1 minute = 300 ticks
------------------------------------------------------
--1900-01-01 00:00:01.000
SELECT CONVERT(INT,0x12C) --= 300
SELECT CONVERT(VARBINARY(3),300) --= 0x00012C
SELECT CONVERT(DATETIME,0x0000000100000000) --add 1 day
------------------------------------------------------
--1900-01-02 00:00:00.000
For smalldatetime the time is stored as the number of minutes after midnight
Now here is some fun stuff
DECLARE @d DATETIME
SELECT @d = .0
SELECT @d
GO
------------------------------------------------------
--1900-01-01 00:00:00.000
DECLARE @d DATETIME
SELECT @d = .1
SELECT @d
GO
------------------------------------------------------
--1900-01-01 02:24:00.000
DECLARE @d DATETIME
SELECT @d = .12
SELECT @d
GO
------------------------------------------------------
--1900-01-01 02:52:48.000
DECLARE @d DATETIME
SELECT @d = '0'
SELECT @d
GO
Server: Msg 241, Level 16, State 1, Line 2
Syntax error converting datetime from character string.
DECLARE @d DATETIME
SELECT @d = 0
SELECT @d
GO
------------------------------------------------------
--1900-01-01 00:00:00.000
So there is no implicit conversion, o is fine 'o' is not
DECLARE @d DATETIME
SELECT @d = 20061030
SELECT @d
GO
Server: Msg 8115, Level 16, State 2, Line 2
Arithmetic overflow error converting expression to data type datetime.
DECLARE @d DATETIME
SELECT @d = '20061030'
SELECT @d
GO
------------------------------------------------------
--2006-10-30 00:00:00.000
Here we have the reverse, the varchar value is fine but the int is not.
This happens because the max integer value that a datetime can take is 36523
If we run the following we are okay
DECLARE @d DATETIME
SELECT @d = 2958463
SELECT @d
GO
------------------------------------------------------
--9999-12-31 00:00:00.000
Posted by Denis at 8:59 AM 0 comments
Labels: Dates, Datetime, SQL Server 2000, SQL Server 2005, SQL Server 2008
Monday, September 10, 2007
SQL Gotcha: Do you know what data type is used when running ad-hoc queries?
This is for SQL Server 2000 only, SQL Server 2005 is a lot smarter which is another reason to upgrade.
When running the following query you probably already know that 2 is converted to an int datatype
SELECT *
FROM Table
WHERE ID =2
What about the value 2222222222? Do you think since it can't fit into an int that it will be a bigint? Let's test that out.
First create this table.
CREATE TABLE TestAdHoc (id bigint primary key)
INSERT INTO TestAdHoc
SELECT 1 UNION
SELECT 2433253453453466666 UNION
SELECT 2 UNION
SELECT 3 UNION
SELECT 4 UNION
SELECT 5 UNION
SELECT 6
Now let's run these 2 queries which return the same data
SELECT *
FROM TestAdHoc
WHERE ID =2433253453453466666
SELECT *
FROM TestAdHoc
WHERE ID =CONVERT(bigint,2433253453453466666)
Now run the following SET statement and run the 2 queries again
SET SHOWPLAN_TEXT ON
SELECT *
FROM TestAdHoc
WHERE ID =2433253453453466666
SELECT *
FROM TestAdHoc
WHERE ID =CONVERT(bigint,2433253453453466666)
And what do we see?
First Query
--Nested Loops(Inner Join, OUTER REFERENCES:([Expr1002], [Expr1003], [Expr1004]))
--Compute Scalar(DEFINE:([Expr1002]=Convert([@1])-1,
[Expr1003]=Convert([@1])+1, [Expr1004]=If (Convert([@1])-1=NULL)
then 0 else 6If (Convert([@1])+1=NULL) then 0 else 10))
--Constant Scan
--Clustered Index Seek(OBJECT:([Blog].[dbo].[TestAdHoc].[PK__TestAdHoc__2818EA29]),
SEEK:([TestAdHoc].[id] > [Expr1002] AND [TestAdHoc].[id] < [Expr1003]), WHERE:(Convert([TestAdHoc].[id])=[@1]) ORDERED FORWARD)
Second Query
--Clustered Index Seek(OBJECT:([Blog].[dbo].[TestAdHoc].[PK__TestAdHoc__2818EA29]),
SEEK:([TestAdHoc].[id]=2433253453453466666) ORDERED FORWARD)
The first query has a much different execution plan than the second query. The first execution plan has a lot more than the second execution plan and will be a little slower.
So how do you know what dataype the value is converted to? Here is a simple SQL query which I first saw on Louis Davidson's blog. Just run this query.
SELECT CAST(SQL_VARIANT_PROPERTY(2433253453453466666,'BaseType') AS varchar(20)) + '(' +
CAST(SQL_VARIANT_PROPERTY(2433253453453466666,'Precision') AS varchar(10)) + ',' +
CAST(SQL_VARIANT_PROPERTY(2433253453453466666,'Scale') AS varchar(10)) + ')'
So the output is this numeric(19,0). So instead of a bigint SQL Server converts the value to a numeric data type.
Here is another query which demonstrates the different datatypes used.
SELECT CAST(SQL_VARIANT_PROPERTY(2,'BaseType') AS varchar(20))
UNION ALL
SELECT CAST(SQL_VARIANT_PROPERTY(222222222,'BaseType') AS varchar(20))
UNION ALL
SELECT CAST(SQL_VARIANT_PROPERTY(2222222222,'BaseType') AS varchar(20))
So when running ad-hoc queries it is always a good practice to use parameters or inline convert statements.
Posted by Denis at 10:22 AM 0 comments
Labels: Gotcha, SQL Server 2000, Tip, Tips and Tricks, Trick