The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Database Development’ Category

When opening SQL Server Management studio with ssms command (+parameters) I need the Object Explorer to be filled and point to the right location – Stack Overflow

Posted by jpluimers on 2014/03/25

As a SQL Server developer, most of us make extensive use of SQL Server Management Studio.

With lots of production database, I have a directory full of shorcuts that pre-fill server/database/… on the command-line.

One of the drawbacks these shortcuts have is that the Object Explorer stays empty, and does not sync with the currently active Server/Database.

While browsing to solve that, I found that the

Alt+F8 shortcut will focus the SERVER in the Object Explorer.

This was explained by StackOverflow user Andrei Rantsevich who had this great answer on StackOverflow: Read the rest of this entry »

Posted in Database Development, Development, SQL Server, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

Keen IO – The API for Custom Analytics; store lots of events later perform visualizations and transformations

Posted by jpluimers on 2014/03/23

On my research list.

For massive event storage and data analysis: Keen IO – The API for Custom Analytics.

–jeroen

Posted in Database Development, Development, Software Development | Leave a Comment »

Database Workbench v4 – version: 4.4.5. got released (via: News @ Upscene Productions)

Posted by jpluimers on 2014/03/19

Today, Version 4.4.5 of Database Workbench got released.

It mainly is a bugfix release (15 out of 18 issues were bugfixes, of the rest, 2 are feature requests, 1 enhancement): List of items new/enhanced/fixed in Product: Database Workbench v4 – version: 4.4.5.

Download from the trial/lite download page, or from the customer download page.

Enjoy (:

–jeroen

via: News @ Upscene Productions.

Posted in Database Development, Delphi, Development, Firebird, InterBase, MySQL, NexusDB, OracleDB, Software Development, SQL Server, Sybase SQL Anywhere | Leave a Comment »

SQL Server 2014 is done: Hekaton, Azure integration (via: Tim Anderson’s ITWriting)

Posted by jpluimers on 2014/03/19

Interesting: SQL Server 2014 is done: Hekaton, Azure integration « Tim Anderson’s ITWriting.

Most important feature is the in-memory database engine (OLTP).

Because the in-memory OLTP it is so highly optimized there are quite a few T-SQL features missing, but usually it is a magnitude faster than the disk based database engine.

For limitations, see Transact-SQL Constructs Not Supported by In-Memory OLTP.

–jeroen

Posted in Database Development, Development, SQL Server, SQL Server 2014 | Leave a Comment »

SQL Server: learned that you can pass a Style to CAST and CONVERT (Transact-SQL)

Posted by jpluimers on 2014/03/19

Funny way to learn something new:

I hardly use CAST and CONVERT (Transact-SQL), and when I do, it is the standard SQL-92 way.

But a while ago, I came across some code like this:

CONVERT(DATETIME, "31/12/2013", 105);

and wondered what the 105 was.

And it appeared to convert from the Italian date format to DateTime. And that it has been there since at least SQL Server 2000, probably earlier.

Not sure why the passed slashes (/) in stead of dashes (-) as separators though.

There are styles for these groups of conversions:

  • Binary
  • Date/Time
  • Float/Real
  • Money/Smallmoney
  • XML

Never to old to learn something new (:

–jeroen

Posted in Database Development, Development, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

How to setup and use a SQL Server alias

Posted by jpluimers on 2014/03/03

Just in case I need this ever again: How to setup and use a SQL Server alias.

Posted in Database Development, Development, SQL, SQL Server, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

How can you force SQL Server 2008 R2 to accept an ORDER BY on a column that is not part of a table? – Stack Overflow

Posted by jpluimers on 2014/02/04

I’m sure there are many organizations that only upgrade things until they absolutely have to (i.e. long after mainstream support has ended, often even after extended support has ended). This was from last year: upgrading away from SQL Server 2000 just before extended support ended. While migrating a bunch of applications we inherited from SQL Server 2000 to SQL Server 2008 R2, I came across an ORDER BY style that failed. The queries are generated by an kind of SQL generation layer, so not easy to change. the main questions were:

  • is it possible to force SQL Server 2008 R2 to accept this kind of queries and perform the SQL Server 2000 behaviour (so we can fix the SQL generation layer, and perform regression on it)?
  • why would SQL Server 2000 happily accept this kind of queries?

First two possible fixes, then the full stack overflow question I posted about the migration.

Aaron Bertrand very quickly posted two fixes, which I paraphrased and extended. Read the rest of this entry »

Posted in Database Development, Development, SQL Server, SQL Server 2000, SQL Server 2008 R2 | Leave a Comment »

On “Bad Habits to Kick : Using AS instead of = for column aliases” (via: Aaron Bertrand)

Posted by jpluimers on 2014/01/22

A while ago, I came across an interesting post Bad Habits to Kick : Using AS instead of = for column aliases by Aaron Bertrand, a major contributor on SQLblog.com – The SQL Server blog spot on the web.

The last link indicates my problem with this “AS” versus “=”: it is SQL Server specific.

So, if you mainly use SQL Server, then it is OK (or even preferable) to use “=” for aliasing columns in human written SQL as it makes spotting the names used much easier. Read the rest of this entry »

Posted in Access, Database Development, DB2, Development, Firebird, InterBase, MySQL, OracleDB, Paradox, PostgreSQL, SQL, SQL Server, Sybase | Leave a Comment »

SQL Server: strange way of getting query statistics.

Posted by jpluimers on 2014/01/14

Last year, I had a very odd project at a client.

Their monitoring software was quite odd, and there was no time to create/test/implement a module for it doing SQL query performance measurement any better.

The odd software had two ways of looking at queries:

  • in a succeed/fail fashion
  • in a count(*) fashion

Don’t ask why it was that way, the monitor was hysterically grown.

So below is a small query script that does what the odd monitoring software can do: provide a select with rows indicating the query response time.

What is does is insert into the #sma temporary table a number of records depending on the query duration.
The partition here is 1 record per 125 milliseconds, aiming for four partitions (green, yellow, orange, red) in half a second.

Note the maximum accuracy is about 3.3 milliseconds.

The script is based on these SQL server features:

I might add a try/catch to fake a finally in case the #sma insert fails. Read the rest of this entry »

Posted in Database Development, Development, SQL Server, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 | Leave a Comment »

David Rodriguez: a few nice posts on SQL (via: Google+)

Posted by jpluimers on 2014/01/04

David Rodriguez posted a few nice SQL related entries on G+:

–jeroen

via: David Rodriguez – Google+.

Posted in Database Development, Development, SQL, SQL Server | Leave a Comment »