if you refer to stored procedures, the "input" for the tool is then the procedure name, and the sql actually encapsulated into that stored procedure
you may want to move the access to a central web-service platform, which returns the data as needed, and "hiding" the sql there.

SQL Server database is a disk file as any other file on your PC, so everything you need is to know the file structure and then some tool which will read data from this structure. You may write such program yourself.

I am not offering any code because this is not the way how we should use SQL Server data... If you do a regular database backup then the time to restore it is much lower than the time necessary to write a utility which will read the physical database file.

Remember the database file can be encrypted or placed in a cloud. In such case you have a lot of work to obtain readable data this way (comparing to simple backup/restore).

It's not that it is completely impossible. After all, as pcelba stated, is a disk file as any other file on your PC.

But trying to work directly on the file is a hack that is a pain to do. One has to be crazy or going after a lot of money to want to access SQL Server data without going through the server... thus SQL Statements.

This reminds me of hacks we did in the 80's because systems were slow and reading the disks directly enables us to improve the speed a little bit. You have no ideas how many disks were scrapped because a bit was written in the wrong place. Disks held only 350K of data, so where not too much trouble to recreate. But recreating a 10Gb database from scratch, that would not please your boss or your Customer. And many databases are much larger that that.

And the hack is impossible most of the time anyway, because the typical SQL Server database is on 24/24 and the file itself is thus locked for any process that does not go to the server, when they are not encrypted. I do not have the time to read them, but I suspect that the web pages referenced in the winning question assume that the server is down.

"One of my favorite Real Programmers was a systems programmer for Texas Instruments. One day, he got a long distance call from a user whose system had crashed in the middle of saving some important work. Jim was able to repair the damage over the phone, getting the user to toggle in disk I/O instructions at the front panel, repairing system tables in hex, reading register contents back over the phone. The moral of this story: while a Real Programmer usually includes a keypunch and line printer in his toolkit, he can get along with just a front panel and a telephone in emergencies."

Featured Post

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.