01-II-2011.

Will I ever have better reasons to write rants, than this daily suffering over m$'s bullshit? The blogue suffers from bad inspiration.

Why will Microsoft never have a good search

For years I used the freebie versions of SQL server. The price of full license being too steep for me, this did the job. And SQL is nice in that it connects to pretty much anything, or should I say anything can connect to it (but then, probably anything but Access can connect to MySQL, Progress et al).

There was some trouble with developer tools, because earlier freebies didn't come with Query Analyzer, Profiler and Management Studio. Well, the latest I got (SQL Express 2008 R2) also doesn't, because it's all been renamed and bundled into Server Management Studio, which does the job, well, almost fine.

But I fire it up rarely on my machine. I use Toad. Toad is a dog :), and a hog :), because it's written in dot net, and its screen refreshes take about three forevers*, there are visual glitches all over the place, it loses the horizontal scrollbar on a result grid every now and then, and ignores extra horizontal pixels if I make it wider than about 1200px, all in all it has a hundred weak spots... and yet I love it.

Just this weekend I was populating a big database from an outside datasource, using a process which filled the tables inserting one record at a time, after some checking (which is a must, because SQL server would complain on several issues which may happen in there... the whole process takes hours). And I did it remotely, so I had to click around every few minutes, so I wouldn't get kicked offline, and risk that my hours of work be flushed if my process gets killed (didn't happen, whew). So I monitored it for hours, in what I had on the remote machine - the MSSMS (the first M is to avoid any confusion with anyone else's SQL server management studio :facepalm:). Monitored... kids may imagine that as just taking a look at the screen every now and that, but no, this is MSSMS. For each number of records in a table, I had to

rightclick its name in the treeview on the left (dubbed "object explorer")

scroll down the 15 bars and 7 separators in the rightclick menu to get to properties

on the table properties dialog, click on the Storage on the list on the left (dubbed "select a page")

read the row count in the property sheet on the right

optionally close the dialog (but when I went to the next table, the previous table's dialog would stay open, although behind the MSSMS, which went up when it got the focus; I don't know whether to be happy or PO'd that this dialog isn't modal; feeling optimistic today, happy it is)

repeat all of this when you want a fresh number or to pick next table; the dialog doesn't have any option to refresh, because it's also a designer dialog, i.e. a full five page property sheet, and it generates the scripts for whatever you changed

Now how does this work in Toad?

doubleclick on a table on the left (if there are no tables open; later a single click opens the table in the current tab)

look at the properties page on the current tab in your main window.

for a refresh, press F5 (or, if you're a bored, rightclick, refresh)

for any other table, just click it

There's a number of other things where the GUI is just suited for a developer much better in the Toad than in the MSSMS. But that's not the actual reason I started writing this. One tool being better than Microsofts isn't much of a reason to sharpen the keyboard and write a blog.

It's my years of frustration over how Microsoft's help is searched. There I count any of MSKB, MSDN, help for Office, and now help for MSSMS. It works, but... you'll have a hard time finding what you want.

Problem at hand - I tried to repeat the import using the OleDb provider instead, so I'd do a bulk insert instead of one record at a time. The expected speed increase is at least tenfold, if not more. But, there is a number of obstacles to jump over. First, the provider needs to be installed; then it needs to run in both threading models, then the SQL server needs a startup option (called -T7300, and no, I didn't find that on any MS site, googled it out of some forum), but still my provider won't load. Now the latest I got was that I need to set it to run in-process. OK, there's a simple call to sp_MSset_oledb_prop, but it doesn't do anything but say "Command(s) completed successfully."... completion and having an effect aren't the same thing in Redmond. I wonder what the MS in the name of the sp means... probably necessary to distinguish from sp_BMW_oledb_prop, sp_VWset_oledb_prop, sp_IBMset_oledb_prop and sp_HPset_oledb_prop. But I digress.

It seems sp_MSset_oledb_prop works only on providers already registered on the SQL, which are listed by sp_enum_oledb_providers. Well, how to add one to the list? Pressing F1 while "sp_enum_oledb_providers" is selected brings the very helpful page about editor window. So context-sensitive is out of the window (brought to you from the same M$ who wouldn't give you a time of day, and surely not a certification if your app didn't have a context sensitive help... oh, sorry, editor is my context, not what I highlighted in it).

At least I got the help open. The search is not on the top left, where years of use of previous six or seven help GUIs from Redmond made it intuitive (it's not, it's a habit). There's only a treeview about "help on help" - which is an open confession that their help system is too complicated - and a combo for "filtered by", where my only option is "(unfiltered)".

The search box actually opens a new tab, with a proper long searchbox on top, plus two dropdown-like things (just a button with a down arrow and a label to it - but combos are not passé, there's the one on left), where I can choose where to search the help. Technology - there I unchecked everything else and left only Transact-SQL, and another one with vague descriptions like "programming topics", "language reference topics", "samples" etc. I included all of that, and searched for "how to add oledb provider".

Disaster. Here's what it found:

"The Microsoft OLE DB Provider for SQL Server provides an OLE DB interface to Microsoft® SQL Server™ 2000 databases.". Wow. Does it? And, actually, does it do the same for later versions? Not sure, the article mentions versions 7 and 2000... why is an 11 year old article on top of the search?

"The System.Data.OleDb namespace is the.NET Framework Data Provider for OLE DB." Good for you. How does this answer my question? Good that I included only Transact-SQL.

"This document describes the Microsoft OLE DB Provider for ODBC" - the only consolation is that I'm 100% sure that it doesn't decribe the McDonalds OleDb provider.

OleDbConnectionStringBuilder Class - new in dot net 2.0, good, dot net is at 4.0 at the moment, thanks for the breaking news... and how does one add a provider to SQL server using this class?

"sp_addlinkedserver (Transact-SQL)" - now here we are, it seems to add a... linked server, not the provider. It won't work anyway, before a provider is registered.

"Adding Connections Programmatically" has an example in C# and VB on how to create a connection... assuming the provider is already registered. And that's to connect to anything from these languages, not from (guess whose) SQL server.

"Identifying a Data Source Using a Linked Server Name" - nice, except I can't have a linked server before the provider is available

"OLE DB Provider for Jet" - wow, this is great news, the article is obviously so fresh, it even knows about Access 97.

"System.Data.SqlServerCe provides programmatic access to databases in Microsoft® SQL Server™ 2000 Windows® CE Edition (SQL Server CE)"... ahem, year is 2011.

".NET Framework Data Providers" - even has a language filter, for some six or seven dot net languages.

All in all, just one of the top ten finds was related to my question, and this is the fucking help for SMSSM! Which I can only conclude doesn't exist. There's a general forest of about fifteen years of various text bits bobbing in a moat around Redmond Castle, nothing more. The monsters in the moat are all the help you may ever need.

p.s. Still haven't solved it.

----

* „forever“ as a unit of measure came to be on ppp, lasts about nine and a half days. That's the average time between „I'm leaving the forum forever“ and „I'm back“.


Mentions: blogue, Majkrosoft (m$), ppp, in serbian

31-III-2026 - 8-IV-2026