Tag | Database Posts

There aren’t many applications that are of value without having some for of data store. In Windows Phone development we have a few options. You can store text directly to isolated storage. You can also use a number of third party libraries to create or mimic databases in isolated storage. With Mango we gained the ability to have a native .NET database approach which uses LINQ to SQL. In this article I will try to bring together the components needed to implement this last type of data store and fill ...
While I spend a certain amount of my time creating databases (coding around SQL Server and setup a server when I have to) it isn’t my bread and butter. Since I have run into a number of time that SQL Server needed to be tuned I figured I would step out of my comfort zone and see what I can learn. Brent Ozar packed a mountain of information into his session on making SQL Server faster. I’m not sure how he found time to hit all of his points since he was allowing the audience abuse him on Twitter instead ...
My most recent project has been to migrate a bunch of sites from WSS 3.0 (SharePoint 2007) to SharePoint Server 2010. The users are currently working with WSS 3.0 and Office 2003, so the new ribbon based UI in 2010 will be completely new. My client wants to avoid the new SharePoint 2010 look and feel until they’ve had time to train their users, so we’ve been testing the upgrades by keeping them with the 2007 user interface. Permission to perform the Visual Upgrade One of the first things we noticed ...
After reading this section you should be able to Understand methods of network design unique to TCP/IP networks, including subnetting, CIDR, and address translation Explain the differences between public and private TCP/IP networks Describe protocols used between mail clients and mail servers, including SMTP, POP3, and IMAP4 Employ multiple TCP/IP utilities for network discovery and troubleshooting Designing TCP/IP-Based Networks The following sections explain how network and host information in ...
I have been working with Database Development and the aspects that come with it, the pain and the joy of moving from Dev to QA and then on to Production. Source Control has a place in Dev, and that is where the baselines should be established. Where am I going with this? I have been working with Redgate’s Source Control 3.0, and I am seeing some features that are great for the process of moving from Dev to … well something that allows for quite a level of control. We are not only talking about scripting ...
Node.js is a server-side JavaScript platform "for easily building fast, scalable network applications". It's built on Google's V8 JavaScript engine and uses an (almost) entirely async event-driven processing model, running in a single thread. If you're new to Node and your reaction is "why would I want to run JavaScript on the server side?", this is the headline answer: in 150 lines of JavaScript you can build a Node.js app which works as an accelerator for WCF REST services*. It can double your ...
It has been a week since we moved our Geekswithblogs.net System to a new set of load balanced servers and everything has been going great. I am so amazed at the performance of the new hardware. On average, we only use less than 5% of the CPU at any given moments or the database and web servers. I have seen a performance boost in page load as well, but I will have to confirm that with the statistics as they roll in. This is all in preparation for a new community we are launching with some friends ...
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 ...
Introduction I’m currently working on broadening the content in the Windows Azure Service Bus Developer Guide. One of the features I have been looking at over the past week is the support for transactional messaging. When using the direct programming model and the WCF interface some, but not all, messaging operations can participate in transactions. This allows developers to improve the reliability of messaging systems. There are some limitations in the transactional model, transactions can only ...
C4C (Coders 4 Charities), in Kansas City, is always a fun event. At points it gets to be a pressure cooker as you zone in trying to crank out some fantastic code in just a few hours, but it is always fun. A great challenge of your skill as a software developer and for a good cause. This year my team helped The United Cerebral Palsy of Greater Kansas City organization to add online job applications and a database for tracking internal training. I keep finding that there is one key rule to pulling ...
Hey everyone, I just discovered this great post yesterday that shows how to have msbuild build projects in parallel Basically all you need to do is… Read more at http://blog.danskingdom.com... ...
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, ...
So, day 1 of DevWeek. Lots and lots of Windows 8 and WinRT, as you would expect. The keynote had some actual content in it, fleshed out some of the details of how your apps linked into the Metro infrastructure, and confirmed that there would indeed be an enterprise version of the app store available for Metro apps.) However, that's, not what I want to focus this post on. What I do want to focus on is this: Windows 8 does not make .NET developers obsolete. Phew! .NET in the New Ecosystem In all the ...
This post is continued HERE. Go to Part 1 – List of Product Updates for information on Visual Studio and TFS 2012 updates Looking for the VS 2010 extensions ? Go to Visual Studio 2010 - List of Product Updates (Part 1) + Extensions (Part 2). Looking for links to the test adapters, go to this blog post. UPDATE Aug 18th 2013: Updates: Visual Studio Tools for Git, TypeScript, ReSharper, TFS Power Tools, Code Contracts, Build Manager, Web Essentials, Code Contracts, tangible T4 editor , Just Decompile, ...
One of the earliest lessons I was taught in Enterprise development was "always program against an interface". This was back in the VB6 days and I quickly learned that no code would be allowed to move to the QA server unless my business objects and data access objects each are defined as an interface and have a matching implementation class. Why? "It's more reusable" was one answer. "It doesn't tie you to a specific implementation" a slightly more knowing answer. And let's not forget the discussion ...
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 ...
It is with some sadness that I write this post as my last for the Redmond Diary blog on the Redmond Developer News and Visual Studio Magazine Web sites. Eleven days ago, I started a new blog for ZDNet covering Big Data, at http://zdnet.com/blog/big-d... There’s been a ton of interest around Big Data in the industry lately and the topic ties into the database and BI work that I’ve done throughout most of my career. So when I was asked to write the blog, I really couldn’t say no. I agreed to write ...
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 ...
This is just one of those cool post which are not written as often as it should be. Hats off to Glenn Berry for stating it so clearly for all BI / database developers.http://sqlserver... read some Microsoft paper on "Fast Track Data Warehouse Architecture", and did not appreciate the benefit at the time. What a great way for developers to start with someone already figured out the licensing + cost + performance. There ...
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 ...
Recently a colleague of mine encountered the error below and wanted to know how to get past itRecently a colleague of mine encountered the error below and wanted to know how to get past it. When configuring SharePoint 2010 Publish Portal you encounter the following error “The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator. “ This issue is caused by lack of Session State Service ...
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 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 ...
This is my first blog post and will be short and concise. I will get back to formatting later.Edit: Here is the same explanation but from MSDN :)http://blogs.msdn.com/b/a... Been playing around with MVC, Scaffolding and Razor a couple of weeks now on my spare time. Think I should write som stuff down here to share with others!I started out here, thanks to Steve Sanderson!http://blog.steve... ...
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 had a user come up and state that when they would make a new announcement the time would be off by 2 hours. They said they had checked the servers and time settings were fine and could there be anything else that might be off? Well, yes there could and most likely is. There is a regional setting option setting that you can get to by going to:1. Problem page2. Site Actions > Site settings3. Regional settings (under Site Administration)4. Time Zone settingsNow, this might work well for ...
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 ...
This post is in continuation with my earlier post, so you may want to read that first before continuing. Once I removed all the TasksController files and the TodoItem, I chose the Models folder, right click and “Add New Item” and searched for “ADO.NET Entity Model” and added it to the folder. It allowed me to connect to the Northwind database through “Generate from database” and I selected just three tables “Products”, “Categories” and “Suppliers” table for simplicity. At the end of the wizard, we ...
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 ...
In the development of line-of-business (LOB) applications, there has long been a certain tug-of-war between tools that automate development, or frameworks that accelerate it, on the one hand; and the notion of coding from scratch, perhaps with the aid of code libraries developed in-house (or by the sole developer), on the other. This is typically put under the rubric of a zero-sum game before the debate even starts. Downstream project managers, analysts and users don’t want to pay the tax of having ...
What is Model? A model can be considered as a container that facilitates presentation view, behavior and/or persisting data to/from data source (i.e. database etc). Besides the data container elements, a model may or may not contain behavior (i.e. logic), depending on design context of corresponding architecture. While the term “Model” is frequently discussed and used in Model-View-Controller pattern context, it is one of most important consideration in current world of software architecture. Download ...
Let me start off by stating that I am in no way an expert on MSBuild, writing build scripts, MSDeploy, Web Deploy, etc. I learned a lot in this process about those things which helped me find a workable solution. I'm sure there are better ways to accomplish what I'm trying to do, but this is what I came up with. My goal in writing this is that someone will hopefully avoid wasting their time as I did trying to get app_offline.htm to work.For those of you who don't know what app_offline.htm is, it's ...
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 ...
While working with a customer, we had this interesting requirement related to SP 2010 content migration. The migration process would take its own sweet time, but we wanted to migrate people search first. In 2010, when you search for a person it would search against its profile database and show you the relevant results, this is what you would expect. But what if you want the search result to show you a result from MOSS 2007 profile database and when you click on my site of an individual, it takes ...
We’re only in February, but the rest of the 10 months left in 2012 look to be very interesting in the Microsoft space with products that Developers and IT Pros will find intriguing. Redmond Channel Partner posted a great article outlining what products we can expect to make an appearance this year and when. Some highlights: Windows 8/Windows Server 8 Well we all know this is coming, and that it will be a huge focus of Microsoft’s marketing (once their people are actually allowed to talk about it). ...
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." ...
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. ...
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Normal 0 false false false false EN-GB X-NONE 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:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; ...
Normal 0 false false false EN-GB X-NONE 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:0cm 5.4pt 0cm 5.4pt; mso-para-margin-top:0cm; mso-para-margin-right:0cm; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0cm; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans... mso-ascii-font-family:Calibri; ...
While working with database we often require to use Cursor. Cursors force the database engine to repeatedly fetch rows. This may slow down your database and locking may occur. As a result cursor are not suggested to use if not extremely necessary. If there is a primary key on a table, you can usually write a WHILE loop to do the same work without incurring the overhead of a cursor. The following example demonstrate the idea: Declare @ItemId bigint Declare @OldItemCode varchar(50) SELECT Top 1 @ItemId= ...
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, ...
Sometimes we want to make a changes to the database or create a backup, but the users must be disconnected for this time. The easiest way is to set the database to the offline state:
ALTER DATABASE dbname SET OffLine WITH ROLLBACK IMMEDIATE
and back
ALTER DATABASE dbname SET OnLine WITH ROLLBACK IMMEDIATE

The alternative is to set the Restrict Access to the Restricted User in the database Properties/Options.
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 ...
Arrggghhhh TFS and builds! Such a love-hate relationship! So we have our TFS builds setup to both compile our C# projects as well as compile and deploy our Team Foundation (TF) Database (DB) projects. One day I started getting the following file path too long error message on our build server: $/RQ4TeamProject/Prototypes... - 1 error(s), 69 warning(s), View Log File C:\Program Files (x86)\MSBuild\Microsoft\Vis... ...
When you first create a new table, there is no index created by default. In technical terms, a table without an index is called a “heap”. We can confirm the fact that this new table doesn’t have an index by taking a look at the sysindexes system table, which contains one for this table with an of indid = 0. The sysindexes table, which exists in every database, tracks table and index information. “Indid” refers to Index ID, and is used to identify indexes. An indid of 0 means that a table does not ...
Pros and Cons of NOLOCKI have seen some developers use WITH (NOLOCK) when querying in SQL Server and wonder why they use. Now i explored it and found that its useful to improve the performance in executing the query. However there is a disadvantage in using it. The disadvantage is that one may not be sure that they are getting the data which is currently being updated in the Table ie Without lock protection, you cannot be guaranteed that the data isn’t changing during the time that the query is running.With ...
The landscape of SQL Azure backups is changing rapidly. A few tools are becoming available at no charge and Microsoft is adding capabilities over time. Here a quick update.Microsoft ToolsMicrosoft offers two primary backup mechanisms so far:Export/Import feature available on the Azure Management portalThe COPY operation as part of its T-SQL CREATE DATABASE statementThese mechanisms do not offer a scheduling component and do not work together. To obtain a transactionally consistent backup, you first ...