How do I query a MS Access database directly from SQL Management Studio, without using a linked server?
Ie. something like
SELECT * FROM ["C:\Data\Accessdb.mdb"].[SomeTableInAccessDB]
Obviously this won't work but is there a away to specify the access database details within a sql query?
Yes, you can install Management Studio (or Management Studio Express) on a workstation that doesn't have SQL Server services. Just pick Management Tools - Complete and Management Tools - Basic during setup.
You cannot use SQL Server Management Studio (SSMS) to log into MS Access directly. SSMS is used to log into a SQLServer (such as SQL Server Express). Once logged into a SQL Server you can connect that server to MS Access as a linked server or through open rowset, etc.
Microsoft SQL Server can run on a network, or it can function without a network.
You can use OPENROWSET or OPENQUERY. For example (per Microsoft's Northwind):
SELECT CustomerID, CompanyName
FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'C:\Program Files\Microsoft Office\OFFICE11\SAMPLES\Northwind.mdb';
'admin';'',Customers)
Adding a linked server just allows ease of configuration, so different processes can use the connection without having to specify connection details. I don't believe a Linked Server actually adds any functionality that can't be obtained through one of the two OPEN options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With