Last week, I re-learnt something which, according to me, is a little counter-intuitive. I was studying read-only databases out of academic interest and noticed something interesting: When a database is marked as Read-only, the underlying file/file-groups are not marked Read-only. Here’s a simple test wherein we: Create a test database with multiple file-groups (the test works equally well with a single file-group) Set the database to READ_ONLY Check the file-group properties USE master; GO --Create the test database CREATE DATABASE ReadOnlyDB ON PRIMARY
(Name=ReadOnlyDB_Primary, FileName='C:\Databases\SQL2012\ReadOnlyDB_Primary.mdf' ), FILEGROUP SecondaryFG (Name=ReadOnlyDB_Secondary, FileName='C:\Databases\SQL2012\ReadOnlyDB_Secondary.ndf' ) LOG ON (Name=ReadOnlyDB_Log, FileName='C:\Databases\SQL2012\ReadOnlyDB_Log.ldf' ); GO USE master; GO --Set the database to READ_ONLY ALTER DATABASE ReadOnlyDB SET READ_ONLY; GO USE ReadOnlyDB; GO --Check the File & File-group properties SELECT sfg.is_read_only,sfg.* FROM sys.filegroups AS sfg; GO SELECT sdf.is_read_only,sdf.* FROM sys.database_files AS sdf; GO As can be seen from the output, none of the...(Read whole news on source site)
You just added\inserted data into your db, what PK\ID\counter\integer\whatever did you just add? I can help you with three options.
In my last post my focus was on listing the numerous WinRT apps I use on a regular basis – many of which, if I couldn’t get them on Win8 would drive me to carry an iPad. I’m personally not just a software developer, I’m a user of computing as well. One line, a sensation-maker, in my post was that I think Windows developers who aren’t using WinRT apps are doing their ultimate users a disservice. This doesn’t apply to web developers or other people who aren’t developing actual Windows applications, but it surely applies to people living today in the legacy WPF, SL, and Windows
Forms technologies. The thing is, I made no effort to describe why I believe that to be true, because the focus of that post was to list useful apps. So what did I mean by that comment? Here’s the thing. As someone who does use a lot of WinRT apps I can say that a lot of them suck. I’ve divided the suckage into three categories. Some apps are obviously built by pure mobile developers, who have no comprehension of keyboard/mouse or productivity on anything but a tablet. So their apps are sometimes pretty good on a tablet, but are virtually useless on a laptop or desktop. Because I use...(Read whole news on source site)
You’ve probably heard all the hype about Git and why it’s an awesome version control system. Some of you have learned and embraced it while others have dismissed it. Afterall,...
Originally posted on: http://geekswithblogs.net/darrengosbell/archive/2014/03/03/ssas-ndash-listing-active-queries-with-powershell.aspxRecently one of our production Tabular servers was being hit with a number of extremely large queries that were causing excessive load and impacting the performance for other users. These queries were pretty much attempts at extracting detail level information. Some of these were due to the fact that some of the users had their own alternate hierarchy which we had not been informed of, so we were able to extend the cube design to rectify this. Other users were trying to build 10+ page reports in Excel and were trying to get everything in a
single query and we were able to educate these users to use many smaller pivot tables rather than one massive one. One of the biggest single queries during this time ran for 53 minutes and returned somewhere in the vicinity of 190,000 rows! At the time this was occurring we needed to find some way of stopping these queries from hogging all the resources. I was able to see these queries by running a “SELECT * FROM $SYSTEM.DISCOVER_COMMANDS” query and if they had been running for longer than 10 minutes (that’s right, over 10 minutes for a tabular query)...(Read whole news on source site)
Almost four years ago Udi Dahan introduced an elegant technique that allows you to have your domain model dispatch events without injecting a dispatcher into the model - keeping your model focused on the business at hand.
This works by having a static DomainEvents class which dispatches raised events.
This customer aggregate raises an event when a customer moves to a new address.
public class Customer
private readonly string _id;
private Address _address;
private Name _name;
public Customer(string id, Name name, Address address)
_id = id;
_name = name;
_address = address;
public void Move(Address newAddress)
...(Read whole news on source site)