Tag | SQL Posts

I have been following the events at X-tensive.com and excited by the release of DataObjects.Net community license and new features in version 4.5.4. I have always had a sweet spot on DataObjects.Net, mainly because of the clean architecture and features that the product has. Now my mind is getting blown away by features that I never thought may be possible in an ORM. Over the past few months the DataObjects.Net community started working on plugins that would extend the functionality of DataObjects.Net. ...
When using SSMS 2008 I found it to be really slow when trying to save a file, even a small one with just some simple SELECT statements on it. The symptoms were the flashing save disk icons in the lower right corner and selecting the location to save in the Save File dialog would hang each time I picked a location (e.g. Libraries, a folder). This was the first I had seen anything like this where it was really, really slow. It ended up that a server had died last week and I was still mapping a drive ...
I came across this the other day. Using SQL 2000 I could not get a Top statement to work with a variable. I had forgotten that only with SQL 2005 and higher could you do this trick. I found a good way around it, you can read about it here. Anyway this works on SQL 2000: declare @top intset @top = 5 BEGINset rowcount @top select Some_ID from tblStuffset rowcount 0END The code above would return the first five records from tblStuff. For any of the newer SQL Server version you can simply use the @top ...
I came across this tool the other day and found it to be very useful. In the past if I needed to search within all the stored procedures or views in a database I would use some SQL to run a query using sysobjects and syscomments. That worked well but this is a bit slicker. The tool is redgate's SQL Search and it is available (for now at least) as a free stand alone tool. You can download it here. It supports SQL 2005 and later and I found it to integrate with the SSMS IDE well. It will add a red ...
At http://blog.sqlauthority.com/2012/03/25/sql-server-download-free-ebook-introducing-microsoft-sql-server-2012/ there is a free e-book from Microsoft Press on introducing SQL Server 2012. This book is available as PDF, mobi and epub formats.
At http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/ there is information on SQL Injection attack on a variety of databases.

At http://labs.portcullis.co.uk/application/bsql-hacker/ there is a tool for testing for SQL Injection vulnerability.
Effective immediately, new compute and storage resource options are now available when selecting data center options in the Windows Azure Portal. "West US" and "East US" options are now available, for Compute and Storage. SQL Azure options for these two data centers will be available in the next few months. The official announcement can be found here.In terms of geo-replication:US East and West are paired together for Windows Azure Storage geo-replicationUS North and South are paired together for ...
I'm in the process of building out a Data Warehouse and encountered this issue along the way.In the environment, there is a table that stores all the folders with the individual level. For example, if a document is created here:{App Path}\Level 1\Level 2\Level 3\{document}, then the DocumentFolder table would look like this:IDID_ParentFolderName1... 121Level 232Level 3To my understanding, the table was built so that:Each proposal can have multiple documents stored at various locationsDifferent ...
Installed package EntityFramework.SqlServerCo... after running my project was getting this error "The operation could not be completed. Unspecified error" Two ways to fix this:1. Install "Visual Studio 2010 SP1 Tools for SQL Server Compact 4" - Web Platforms Installer 2. Download directly offline installer from http://go.microsoft.com/fwl... After running it works great ...
This post shows how to customize the SQL query used by the Team Foundation Server 2010 SQL Server Reporting Services (SSRS) Stories Overview Report. The objective is to show test status for the current version while including user story status of the current and prior versions. Why? Because we don’t copy completed user stories into the next release. We only want one instance of a user story for the product because we believe copies can get out of sync when they are supposed to be the same. In the ...
One of the challenges recently thrown my way was to read an EBCDIC flat file, decode packed dates, and insert the dates into a SQL table. For those unfamiliar with packed data, it is a way to store data at the nibble level (half a byte), and was often used by mainframe programmers to conserve storage space. In the case of my input file, the dates were 2 bytes long and represented the number of days that have past since 01/01/1950. My first thought was, in the words of Scooby, Hmmmmph? But, I love ...
SSRS is a powerful tool, but there is very little available to measure it’s performance or view the SSRS execution log or catalog in detail. Here are a few simple queries that will give you insight to the system that you never had before. ACTIVE REPORTS: Have you ever seen your SQL Server performance take a nose dive due to a long-running report? If the SPID is executing under a generic Report ID, or it is a scheduled job, you may have no way to tell which report is killing your server. Running this ...
Our West Palm Beach Developer Group March 2012 meeting featured Herve Roggero, Azure MVP and co-founder of Pyn Logic. Herve covered multiple case studies on migrating existing application to SQL Azure. This event was quiet popular filling-in our meeting room. We would like to thank PC Professor for hosting our meeting and Sherlock Technology for sponsoring our free food. Our April 24th, 2012 meeting will feature Will Tartak who will be demonstrating how he used ServiceStack.net to quickly develop ...
MapRedux – #PowerShell and #Big Data Have you been hearing about “big data”, “map reduce” and other large scale computing terms over the past couple of years and been curious to dig into more detail? Have you read some of the Apache Hadoop online documentation and unfortunately concluded that it wasn't feasible to setup a “test” hadoop environment on your machine? More recently, I have read about some of Microsoft’s work to enable Hadoop on the Azure cloud. Being a "Microsoft"-leaning technologist, ...
SQLSaturday #141 South Florida 2012 will be here in less than 3 months! This is a training event for SQL Server professionals and those wanting to learn about SQL Server. This event will be held June 16, 2012 at Nova Southeastern University, Davie, FL 33314. The focus is on providing a good variety of topics, and making it all happen through the efforts of volunteers. Admittance to this event is free, all costs are covered by donations and sponsorships. Please register soon as seating is limited, ...
Recently I had to create couple SQL Server Reports (SSRS) with optional parameters built in. It took me a while to refresh memory how this can be done. It was very simple to create reports and processes behind, but connecting these two were are little bit challenging – stored procedure was tested and worked fine, but when the report was passing optional parameters it didn’t returned expected results. After tweaking SQL stored procedures and reports parameter options, the following approach turn to ...
We are almost done everything about the WCF transport extension over the message bus, which makes our services can be scaled out by introducing more instances over machines and servers. We had finished the structure of our transport extension and implemented the request reply mode in the 2nd post, the datagram and duplex mode in the 4th and 5th post. As I have said at the end of the 5th post, currently we can use our transport extension. But there still something left. Although are not that major ...
Well I like to look at pretty pictures on deployment days to keep my mind on the good side of software. Well I guess it is not that bad, but today we moved Geekswithblogs.net to a new server pool to update hardware, get some extra machines in the mix, and move to SQL Server 2008 R2. If you see any issues, please alert us directly via comments or support@geekswithblogs.com. Thanks and hopefully we will see more benefits that issues. Technorati Tags: Geekswithblogs.net ...
There are pieces of information spread out on this in various postings for SQL Server Reporting Services used in Team Foundation Server. Here are two: Customizing Report Parameters for Team Foundation Server 2010 TFS 2010: Using Stories Progress in your Dashboards but scoped to Iteration or Areas I will attempt to pull together the essential information. First, there are two ways that SSRS reports filter on iteration and area path: …MDXParam (i.e. Query Based) parameter. For example, the Stories ...
The beta for BIDS Helper 1.6 was just released. We have not updated the version notification just yet as we would like to get some feedback on people's experiences with the SQL 2012 version. So if you are using SQL 2012, go grab it and let us know how you go (you can post a comment on this blog post or on the BIDS Helper site itself). This is the first release that supports SQL 2012 and consequently also the first release that runs in Visual Studio 2010. A big thanks to Greg Galloway for doing the ...
In my early development days, I used Microsoft Access for building databases. It made things easy since I only needed to package the database with the installation package so my clients would have access to it. When we began the development of a new package in Visual Studio .NET I decided to use SQL Server Express. It was free and provided good tools - also free. I thought it was a tremendous idea until it came time to distribute our new software! What a surprise. The nightmare Ah, the choices! Detach ...
Eric Ligman, from Microsoft, posted a great blog post this week listing all of the SharePoint 2010 Virtual Labs that are available from Microsoft. His blog entry is here: http://blogs.msdn.com/b/mss... He also posted other resources as well. I’ve copied his Virtual Lab links here: SharePoint Server 2010 Virtual Labs MSDN Virtual Lab: SharePoint Server 2010: Introduction ...
Do you write stored procedures that might be used by others? And those others may or may not have already started a transaction? And your SP does several things, but if any of them fail, you have to undo them all and return with a code indicating it failed? Well, I have written such code, and it wasn’t working right until I finally figured out how to handle the case when we are already in a transaction, as well as the case where the caller did not start a transaction. When a problem occurred, my ...
If you are installing SharePoint 2010 on a new box you might see the Setup Errors notification from the installer. In my case, I am using Windows Server 2008 R2, but I have seen the similar Error on Windows 7 as well with little less requirements. As you can understand all the “-“ bullets are the requirements that needs to be installed or configured on the box. There are two ways to do this 1) Microsoft SharePoint 2010 Product Preparation tool In the SharePoint 2010 Splash Form, you can find that ...
In my attempt of installing and configuring SharePoint 2010 Farm, I have given a new Windows Server 2008 R2 box that should have SQL Server 2008. So when I attempt to install SQL Server 2008 on it, I came across the following error message. Not so weird because every server product have a set of requirement to be installed. First off, before you do any thing Just run the Windows Update. That’s recommended because there can be some thing else that is not mention in this post or any other but can hanged ...
0 0 1 437 2494 Simple Toad 20 5 2926 14.0 Normal 0 false false false EN-US JA X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; mso-pagination:widow-orphan; font-size:10.0pt; font-family:Cambria; mso-ascii-font-family:Cambria; ...
Prior to SSIS 2012 it was not possible to re-use or share the same cache across packages. What that meant is if you created a cache you will be able to consume it only in the very package where the cache was instantiated. Therefore, a developer could take only two routes from here – either make as much heavy ETL processing as possible inside the same package where the cache resides, or populate yet another cache object in every other package where it is needed. The latter was especially harmful leading ...
With as often as I write code that does not perform as well as I would like for it to, I can’t believe how hard it is to write slow code on purpose! My last post gave a mile-high overview of the new version of Redgate’s ANTS Performance Profiler and promised more detail to come. True to my word (this time), this post aims to take a fairly simple application with common “opportunities” and use ANTS Performance Profiler to quantify these opportunities and measure the results. If you’re working along ...
Today's Microsoft Press Ebook Deal of the Day at http://shop.oreilly.com/cat... is 50% off a series of E-books by William R. Stanekinin celebration of the launch of Microsoft SQL Server 2012. This offer will run to 14:00 PT on 8/March/2012. There are 12 other books also available at 50% off ...
This is nothing new, just a way for me to organize the information better. Personally, I like the first 2 ways better just because I can order the result set any way I want.USE {Database Name}GO-- SQL 2008, search table nameSELECT IS_C.COLUMN_NAME , IS_C.* FROM INFORMATION_SCHEMA.COLUMNS AS IS_CWHERE IS_C.TABLE_NAME = '{Table Name}'ORDER BY IS_C.COLUMN_NAME -- , ORDINAL_POSITION, IS_NULLABLE, DATA_TYPE-- SQL 2008, search column nameSELECT IS_C.COLUMN_NAME , IS_C.* FROM INFORMATION_SCHEMA.COLUMNS ...
If you have not heard the latest technical news yet, the SQL Server 2012 Virtual Launch event is today March 8, 2012! Register to not to miss this opportunity to interact with technology experts and win cool prizes! I am thrilled and excited! Why? Because like in the automotive industry, every new iteration of a vehicle is more fuel efficient, safer, more polished, looking more attractive and fun to drive. Sure, the the new version of the SQL Server is ready to take me further in what I can deliver ...
It is now possible to move your SQL Azure server from one subscription to another. Last week, the Windows Azure team added this new feature to the Windows Azure Management Portal. Permissions for moving a server between subscriptions simply require that you are an account administrator, Co-administrator, or service administrator in both the source and target subscriptions. Moving a SQL Azure server is simple; log in to the Windows Azure Management Portal and select the Database option in the Navigation ...
Last week was the Microsoft MVP Global Summit, where Microsoft brings together their independent experts and community leaders for a week of sessions, product group interactions, and some fun along the way. These nights are always epic, stretching into the wee hours of the morning. I brought my camera and flipcam with me this year to capture the events, and so I give you The Most Epic MVP Attendee Party EVAR in Three Acts! It has everything – Playing football on an NFL field, singing karaoke with ...
Last week I was asked to mask or obfuscate a large volume of data residing in a production database for our software quality assurance team to use in testing some functionality. The data resided in various tables and in several columns per table. Yet, this procedure would need to be done over and over again as the data gets depleted. Yet, the masking supposed to be hidden from the QA people and centrally controlled. I proposed to use SSIS. The next day I did a web scan to just find out that noting ...
I have two Great Plains databases, let's call them DB1A and DB1B, that are schematically identical and the data is 99% identical but DB1B has a tiny bit more data. I'm trying to optimize a very complex query that uses views nested in views and is way too long to post all of here. The query was averaging 1 min 43 sec before I started. I noticed that all of the tables involved were heaps (Microsoft's fault, not mine) so I started converting them to clustered one by one, checking the plans and parallelism ...
Recently I have gone through the process of selecting a web hosting company for one of my clients. There are a lot of options out there and a number things you need to be cautious about. I will go over some of the decision points and questions you will want to ask a company before signing a contract. The first thing you need to do is define the features that make up you site. Is it made up purely of static content or does not use a database? If that is the case then you can choose just about any ...
Single Page Application Frameworks are gaining popularity in the ever evolving web community with lot of libraries such as JavaScriptMVC, Backbonejs and many other libraries. ASP.NET MVC 4 introduces experimental support for building single page application (SPA) through a template. Much of the plumbing work of wiring up the client side scripts, javascript modelviews and the controllers is automated, making it a quick start to develop SPAs relatively easier. Lets examine a scenario where we are building ...
I have started to experiment with MiniProfiler to log our query performance. We currently use a mix of pure SQL and Entity Framework, since we need Fulltext search some pure SQL is unavoidable. Depending on the hotspots more queries will move back to pure SQL but for simplicity’s sake trivial queries will remain with EF. Getting started is relatively easy once you figure out which part of the documentation applies – I found my ways through various Stackoverflow questions and GitHub. Starting point ...
Some Background The AdventureWorks database has been around for over a decade; a staple amongst sample databases. The first version of the AdventureWorks database appeared in time for SQL Server 2000. Microsoft has been good at keeping the AdventureWorks sample database up to date as new versions of SQL Server are released. Case-in-point: SQL Server 2012 is at RC0 and yet you can already find a version of AdventureWorks for it (albeit, it really isn’t that different from the SQL Server 2008 R2 version). ...
You asked for it, you got it! To help meet the needs of existing and future SQL Azure customers, Microsoft has announced that they are lowering the price of SQL Azure, and as well introducing a 100MB database option! The new pricing structure will result in cost savings from 48% to 75% of SQL Azure databases for databases larger than 1GB. Additionally, the new 100MB database option has been added to enable new customers to start using SQL Azure at half the cost of the previous price, yet still provide ...
Check out WebHarvy Web Scraper to see how easy it is to scrape online data to an XML, CSV or TSV file. WebHarvy Web Scraper also allows you to export the extracted data to an SQL database. You may watch the video demo of WebHarvy at http://www.webharvy.com/dem... .Web Scraping is the process of extracting data from remote websites to local storage in spreadsheet / table format. WebHarvy is a visual web scraper which helps users to extract data from websites using mouse clicks instead of writing ...
A couple of days ago I decided to reinstall the latest Microsoft Developer Training Kits. One of those kits was the Windows Azure Training Kit. It turned out to be a web matrix install that seemed to take forever. More importantly it installed SQL Server 2012 for me. It may have prompted me but I don’t remember but once installed I entered a couple of days of nightmare mode. My RSSBus ADO connection to QuickBooks had stopped working and worst of all LightSwitch was totally broken. The problem is ...
Today's $10 Deal of the Day from APress at http://www.apress.com/97814... is Pro SQL Azure."Pro SQL Azure introduces you to Microsoft's cloud-based delivery of its enterprise-caliber, SQL Server database management system—showing you how to program and administer it in a variety of cloud computing scenarios." ...
Classes starting soon...First topics to start with will be Visual Studio and .NET 4. After that there are sessions on SharePoint 2010 - Admin, Dev & General Usage Inviting all the people who wish to expand their knowledge in the field of Microsoft Technologies. I will be conducting FREE classes on various streams in Microsoft Technologies like: SharePoint - Administration and Development Visual Studio - 2010 C# and .NET 4 LINQ Team Foundation Server 2010 SSIS ASP .NET Programming Office Apps ...
The Problem After setting up a new instance of TFS I attempting to use the TFS 2010 Power Tools (Dec ‘11) Team Foundation Backups wizard. However, during the Backup Plan Wizard Readiness Checks, the “Grant Backup Plan Permissions” step failed with the error – Account… failed to create backups using path… The Fix Digging into the log created during the Readiness Check I found the following error - Error @xxx Microsoft.SqlServer.Managem... Backup failed for Server 'xxx'. ...
Translate this pageArabicBulgarianCatalanC... SimplifiedChinese TraditionalCzechDanishDutch... CreoleHebrewHindiHungarianI... TranslatorCheck out this page in {0} translated from {1}translated fromOriginal:Translated:Aut... translation powered by Microsoft® TranslatorStart translatingStop translatingCloseClose ...
This blog provides links to a presentation and a sample application that shows how to load data in SQL Azure using different techniques and tools. The presentation compares the following techniques: INSERT, BCP, INSERT BULK, SQLBulkCopy and a few tools like SSIS and Enzo Data Copy. The presentation contains load tests performed from a local machine with 4 CPUs, using 8 threads (leveraging the Task Parallel Library), to a SQL Azure database using the code provided below. The test loads 40,000 records. ...
I ran across a unique scenario recently, and I’m not sure if I should be proud of the solution, or appalled at the Frankenstein result. Either way, I thought I’d post about it to possibly help others in the same situation. I was developing a website leveraging jQuery / AJAX to query views of data at runtime. The kicker? I didn’t know which views. The choice of database view was determined via configuration and user choice. I was leveraging jqGrid for the client-side grid presentation, sorting, filtering, ...
This article is written to assist SQL Azure customers to copy a SCHEMA container from one SQL Azure database to another. Schema separation (or compress shard) is a technique used by applications that hold multiple customer “databases” inside the same physical database, but separated logically by a SCHEMA container. At times it may be necessary to copy a given SCHEMA container from one database to another. Copying a SCHEMA container from one database to another can be very difficult because you need ...