MS SQL Servers 1.3 - FS plugin for Total Commander ==================================================== This software is provided "as-is". No warranty is provided. You use this program at your own risk. The author is not responsible for any data loss, damages, etc. This plugin is freeware. ==================================================== This plugin gives you access to local and remote Microsoft SQL Servers. Plugin features: ================ - Plugin can use different server lists: - Export from registry a list of all local or remote servers registered with SQL Server Enterprise Manager (nested structure of server groups is supported either). - Export server aliases of the computers to which the client is connecting with SQL Server Client Network Utility. - You can create your own list of servers you have access to (or think that you do have :-). - Current server list can be changed in configuration dialog. - Named instances of servers are supported. - Hierarchy "Server - Database - Table" is displayed for current server list. - Objects with irregular names are supported (containing spaces, non-Latin letters, some special characters or coincident with SQL Server reserved keywords). - Displayed columns: For servers - server name (Name). For databases (DB) - DB name (Name), total size of DB files in bytes (Size), creation date (Date). For tables - table name (Name), number of records (Size), creation date (Date). (WARNING: queries to system tables are made without synchronization of space-usage counters (dbcc updateusage), so data in Size column can be inaccurate both for databases and tables). - Additional information for databases is displayed as file attributes: read-only - for read-only databases; hidden - if only database owner can use this database (dbo use only). - Connection to server requires user authentication (user ID and password for servers with SQL Server authentication). - Connection information can be kept: - permanently in INI-file, data encrypting is available, - for current Total Commander session; or can be used only for current login to given server (next login to the server will require ID and password again). - You can clear all connection information in configuration dialog (page "Login Dialog", buton "Clear"). - Plugin allows viewing and editing tables using internal Query Viewer. - For fastest table access dataset is initially limited using TOP clause. - Configuration dialog is available via [Properties] menu item for plugin or server, or within the internal Query Viewer. Internal Query Viewer features: =============================== - Allows to execute any SQL-queries, including queries that don't return dataset result (such as INSERT, UPDATE, DELETE). - Allows to edit rows in updateable SELECT queries. - Some operations are available just with one mouse click: - Left click on column header executes query ordered by that column. Serial clicks toggle modes: ASC sorting/DESC sorting/no sorting. Sorted column is marked with column background (as in Windows Explorer), or with header color (selected in configuration dialog). Shift + left click allows to use several columns for sorting. Ctrl + left click returns unsorted dataset. - Alt + right click on grid cell executes query with filter like "WHERE = ". Alt + Shift + right click allows setting multiple filters (combined with logical AND). Alt + Ctrl + right click clears all above filters. - Original query filter (WHEN clause in the query) can be kept and combined (using logical AND) with one-click filters. - If you select part of the query text, only selected part will execute as in SQL Query Analyzer. WARNING: One-click mouse operations DO NOT WORK in this mode! - If the query returns several datasets, you can navigate through them. WARNING: One-click mouse operations DO NOT WORK in this mode! - You can set connection and command timeouts for query. - Maximum column width can be limited with appropriate button. - Allows to view and edit BLOB fields (TEXT, IMAGE, BYNARY) in the separate window. Different operations are supported: save to file, load from file, clipboard operations. Text/image/hex modes are available (hex mode is read-only). System requirements: ===================== Plugin was tested in next configurations: Windows - 98, XP SQL Server - 7.0, 2000 Please, write me regarding any problems. Installation: ============= 1. Unpack the archive with plugin to an empty directory. 2. Install FS plugin "MS_SQL.wfx" (see help for Total Commander). You can now access the plugin in "Network Neighborhood" as "MS SQL Servers". 3. Encryption library installation: Library crsqlwfx.dll should be in the plugin folder to encrypt connection information. ATTENTION: all your connection data will keep "as-is" without that library. Take care of your sensitive information! Included library crsqlwfx.dll implements a simple encryption algorithm using components from DCPcrypt Cryptographic Component Library (http://www.cityinthesky.co.uk). You can write your own encryption library instead of original crsqlwfx.dll. It must export two functions with interfaces: // for PASCAL function Encode(Source, KeyString: PChar): PChar; stdcall; function Decode(Source, KeyString: PChar): PChar; stdcall; // for C char* __stdcall Encode(char* Source, char* KeyString); char* __stdcall Decode(char* Source, char* KeyString); The first function is used for encryption and the second - for decryption of string Source using key KeyString. 4. Check registry key values written in file MS_SQL.ini in the plugin folder. They are responsible for correct server list export from registry. Key EMRegServerKey in section [General] is path to servers registered with SQL Server Enterprise Manager. Key CNUAliasesKey in section [General] is path to server aliases of the computers to which the client is connecting with Client Network Utility. Default ini values: EMRegServerKey=HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server\ 80\Tools\SQLEW\Registered Servers X CNUAliasesKey=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\Client\ConnectTo may not work on your computer because their real values depend on Windows and SQL Server versions. Future plans... =============== I try to consider in this list most of user suggestions. - View table structure (as CREATE TABLE ..., for using with F3, F5). - Show list of views and stored procedures with their properties. - Export of results from the Query Viewer. - Keep query history. - Search by F7 (for TC 5.51 and above). - ... and what else do you want to see in the next versions? Write me down, please. Version history: ================ [!] - Fixed [+] - Added [-] - Removed [*] - Some minor changes --------------------- v. 1.3 - 20.01.2004 [+] Work with different server lists: - servers registered in Enterprise Manager; - aliases from Client Network Utility; - user-defined list. [!] Display servers in nested server groups in Enterprise Manager. [!] Work with irregular (delimited) identifiers for object names. [!] Release allocated memory when Query Viewer closes. [!] Disconnect open connection when Query Viewer closes. [*] Interface changes in Configuration dialog. [+] Added identification property in connection string Application Name=MS SQL Server Plugin for TC. [+] Database attributes are displayed. [+] [Query Viewer] Separate window for BLOB fields (TEXT, IMAGE, BINARY): - save to file/load from file; - clipboard operations; - text/image/hex view modes. [+] [Query Viewer] Execute selected part of command (as in Query Analyzer). [+] [Query Viewer] Queries returned several datasets are supported. [+] [Query Viewer] Limitation of maximal column width. [+] [Query Viewer] Connection and command timeouts for query. [*] [Query Viewer] New style in mouse one-click ordering. [*] [Query Viewer] Execute query with F5 (as in Query Analyzer). --------------------- v. 1.2 - 01/05/2004 First public release Acknowledgements to: ==================== For helpful advices and discussions: Gleb Sazonov, Vitaly Nevzorov. Total Commander author: Christian Ghisler, www.ghisler.com. Authors of the freeware components: Markus Stephany, merkes@mirkes.de - component Hex Editor, David Barton, www.cityinthesky.co.uk - DCPcrypt Cryptographic Component Library. Companies: Borland, Microsoft. Author: ======= Oleg Yuvashev, Chicago (USA) Email: sqlplugin@comcast.net PS. Author will read all emails. My answer is not guaranteed, but I'll try to consider all your suggestions.