I have a Windows 2008 x64 server and with SQL Server 2008 x64 installed. osql.exe under SQL Server directory could list instances with -L. I copied osql.exe+osql.rll from another SQL Server 2005 x86 and '.\osql.exe -L' returns error like "[ODBC Driver Manager] Data source name not found and no default driver specified".
After check registry 'HKLM\SOFTWARE\Wow6432Node\ODBC\ODBCINST.INI', the 'SQL Server' and 'SQL Server Native Client 10.0' are ok and related dll files are ok. I also checked MDAC version, it's 6.0.6002.18005. Did i miss anything?
One interesting thing is osql.exe from SQL Server 2000 ran well to list instances on the server. And osql.rll isn't necessary, the osql.exe only needs msvcr71.dll.
What can i do to make osql.exe(from sql 2005) to run on the server? And are there any difference between those 2 osql.exe(sql 2005, sql 2000)?