Can't connect MS SQL 7
| User, date | Message |
|---|---|
|
Written by dodfr
8 months ago Category: General 29 posts since Mon, 24 Sep 12 |
Hi, Using HeidiSQL 7.0.0.4197 I tried to connect MS SQL for the first time but can't on MSSQL 7, "sys.databases" don't exists on MSSQL 7 and HeidiSQL can't process connection. HeidiSQL connect successfully to MSSQL 8 : /* Entering session "IPCC" */ /* Connecting to 10.0.0.8 via Microsoft SQL Server (TCP/IP, experimental), username sa, using password: Yes ... */ SELECT @@SPID; /* Connected. Thread-ID: 54 */ SELECT DATEDIFF(SECOND, "login_time", CURRENT_TIMESTAMP) FROM "master"."dbo"."sysprocesses" WHERE "spid"=1; SELECT @@VERSION; SELECT "name" FROM "master".."sysdatabases" ORDER BY "name"; but not MSSQL 7 : /* Connecting to 10.0.0.7 via Microsoft SQL Server (TCP/IP, experimental), username sa, using password: Yes ... */ SELECT @@SPID; /* Connected. Thread-ID: 23 */ SELECT DATEDIFF(SECOND, "login_time", CURRENT_TIMESTAMP) FROM "master"."dbo"."sysprocesses" WHERE "spid"=1; SELECT @@VERSION; SELECT "name" FROM "sys"."databases" ORDER BY "name"; /* SQL Error (208): Invalid object name 'sys.databases'. */ regards. |
|
Written by jfalch
8 months ago 224 posts since Sat, 17 Oct 09 |
SELECT "name" FROM "sys"."databases" ORDER BY "name"; will fetch the names of the databases defined within the server on MSSQL 8+. Do you know what SQL statement produces a similar list of database names in MSSQL 7 ? |
|
Written by dodfr
8 months ago 29 posts since Mon, 24 Sep 12 |
SELECT name FROM master..sysdatabases double dot ".." is important. |
|
Written by jfalch
8 months ago 224 posts since Sat, 17 Oct 09 |
and what does SELECT @@VERSION return with that server ? |
|
Written by dodfr
8 months ago 29 posts since Mon, 24 Sep 12 |
Microsoft SQL Server 7.00 - 7.00.1094 (Intel X86) May 29 2003 15:21:25 Copyright (c) 1988-2002 Microsoft Corporation MSDE on Windows NT 5.0 (Build 2195: Service Pack 4) |
|
Written by ansgar
8 months ago 3973 posts since Fri, 07 Apr 06 |
Oh, thanks to jfalch for asking exactly the questions as I would have done if I hadn't been so lazy :) Ah, is that right - each and every version of MS SQL seems to bring its own approach of fetching database names? Well... dodfr, can you confirm that HeidiSQL reports "MS SQL 1094" in the status bar? The current logic expects and searches for a 4 digit string in the result of SELECT @@VERSION. I guess I need to fix that first before I can add another exception for MS SQL 7 when reading database names. |
|
Written by jfalch
8 months ago 224 posts since Sat, 17 Oct 09 |
MS major release policy: "A foolish consistency is the hobgoblin of little minds" (RWE) ... |
|
Written by dodfr
8 months ago 29 posts since Mon, 24 Sep 12 |
I confirm MSSQL 1094 |
|
Written by ansgar
8 months ago 3973 posts since Fri, 07 Apr 06 |
Fixed in Heidi r4200. HeidiSQL should report now "MS SQL 7.0" in your status bar. Also, v2000 is now displayed as "MS SQL 8.0", and so on. See also http://support.microsoft.com/kb/321185 for shedding some light on year => version numbers. |
|
Written by dodfr
8 months ago 29 posts since Mon, 24 Sep 12 |
Tested ... OK ! Tnx. |
|
Please login to leave a reply, or register at first. |