Wednesday, March 28, 2012

How to connect to SQL Server 2K without the machine name ?

With SQL Server 7, I could connect to a "local" server

driver={SQL Server};server={Local};uid=sa;pwd=password;

with SQL Server 2K it seems to need the computer name

driver={SQL Server};server=MachineName\InstanceName;uid=sa;pwd =password;

How can I replace "MachineName\InstanceName" by "{Local}"Originally posted by Karolyn
With SQL Server 7, I could connect to a "local" server

driver={SQL Server};server={Local};uid=sa;pwd=password;

with SQL Server 2K it seems to need the computer name

driver={SQL Server};server=MachineName\InstanceName;uid=sa;pwd =password;

How can I replace "MachineName\InstanceName" by "{Local}"

Is the machine you connecting to your local machine?|||yeap !|||if its the default instance of sql server 2000

Provider=SQLOLEDB.1;Persist Security Info=False;Connect Timeout=0;User ID=user;Initial Catalog=dbname;Data Source=local;PASSWORD=password;

else

Provider=SQLOLEDB.1;Persist Security Info=False;Connect Timeout=0;User ID=user;Initial Catalog=dbname;Data Source=local\instancename;PASSWORD=password;|||Originally posted by Karolyn
yeap !

did you try editing your sql server properties?? are you using the right password? cause when you connect to your local machine you normally use use windows and not sql and windows to connect ...try connecting with windows authentication...hope this helps..it should work ..that is what i did...providing other users dont connect to your local machine|||Data Source=local\mercure

The connection does'nt find the server|||Originally posted by Karolyn
Data Source=local\mercure

The connection does'nt find the server

Edit your sql server properties|||where do I get them edited ?|||1
ProductName NULL Microsoft SQL Server 2
ProductVersion 524288 8.00.760 3
Language 1036 Franais (France) 4
Platform NULL NT INTEL X86 5
Comments NULL NT INTEL X86 6
CompanyName NULL Microsoft Corporation 7
FileDescription NULL SQL Server Windows NT 8
FileVersion NULL 2000.080.0760.00 9
InternalName NULL SQLSERVR 10
LegalCopyright NULL 1988-2003 Microsoft Corp. All rights reserved. 11
LegalTrademarks NULL Microsoft is a registered trademark of Microsoft Corporation. Windows(TM) is a trademark of Microsoft Corporation 12
OriginalFilename NULL SQLSERVR.EXE 13
PrivateBuild NULL NULL 14
SpecialBuild 49807360 NULL 15
WindowsVersion 170393861 5.1 (2600) 16
ProcessorCount 1 1 17
ProcessorActiveMask 1 00000001 18
ProcessorType 586 PROCESSOR_INTEL_PENTIUM 19
PhysicalMemory 503 503 (527941632) 20
Product ID NULL NULL|||Originally posted by Karolyn
where do I get them edited ?

right click on (local)windows nt then go to edit sql server properties and change it theresql

No comments:

Post a Comment