Query tab missing when linking external file to access database - ms-access-2007

I have an MS Access database (mdb) file on a Windows 2008 server. It's in the "c:\inetpub\wwwroot\files\databases" folder.
I would like to link an external query to this database that is also on my server in the "e:\share\m_maping\files\databases" folder (also an Access .mdb file). The e: drive is a partitioned drive on the server's only hard drive.
When I bring up the dialog to link this query, the tab for queries is not visible. I can see the tables tab but not the query tab.

Related

Need to Open MDF file in MS Office 365 Access

I found links to this topic on this and other sites but have had no luck. I know a lot of code but I am REALLY out of my wheelhouse here so please provide very specific instructions if possible.
I would like to import this SQL Server .MDF database file (200 MB) into Access tables (or link to the external SQL Server tables, so that I can transfer the data within Access).
I installed SQL Server Management Studio (thought I needed to) but cannot figure out how to get it to connect to the DB... then I think I would need to use the external data ODBC option in access to connect from there but I haven't been able to get anything to work...
This is a one-time need so any creative workaround would be acceptable also...
Any help that you can provide would be greatly appreciated. Thanks!!
Install SQL Server Express With Tools (2012 should be fine).
When you install this, include the following features:
Database Engine and Management Tools - Basic.
Once you have this installed, open SQL Server Management Studio (Run > ssms.exe).
As marc_s said, you'll need to attach the .MDF file to your SQL Server.
I usually copy the MDF file to C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA so when I attach the database, it's the first folder that's open.
Next, in Access 2013, use the Data Import wizard to connect to SQL Server. You'll need to enter the SQL Server name and instance, usually "localhost\SQLExpress" works for a default SQL Express install.
Follow the Wizard, and it'll allow you to pick which tables/views you want to use.
You can also do this in Excel first, then save the data as .csv or something similar, then import the CSV into Access.

Unexpectedly deleted SQL File Stream Shared location

I unexpected delete SQL File Stream Shared location, is there a way to restore the Shared location. When i try to open SQL File table from SSMS Explore File Table Directory it works on Server, but it doesn't allow to open from client machine. I already enabled Remote Access for SQL File Shared. Is there a way to restore back.
Also can any one suggest me unable to open File Explorer from SSMS. it shows unauthrised access

Save and access file from shared drive

I am running a file upload process to upload files to a db. The web server and the SQL server are different machines. I am attempting to use an SQL OPENROWSET to upload an excel file, but I cannot determine how to get the file onto the other machine. Is there a way to set up a shared drive that the web server can save a file to and the SQL server can access? We have a local network set up with Active Directory.
For Example:
WebServer - Shared drive on web server under C:/inetpub/webpage/fileImport
SQLServer - Will log in with sql auth using USERID and PASSWD. Needs to access webserver shared drive.
What user do I share the drive on web server with so that the sql auth user will be able to access it when I run the OPENROWSET?
Any help will be much appreciated.
I am also trying the same thing by uploading the file in FTP and trying to access it. But i didn't get any progress from last 2 weeks.
And i had found may other alternatives like coping the files in another server and share the folder with out user name & password. then we can able to access it by giving the
\\folder\filename
If u get any other alternative plz share...
You should setup a new user that has access to the user group iis_users, and then give them security access to the file drive itself.
The same should be done to the DB server, and on the drive folder security the other user will need read/write/Modify permissions.
So it will look like:
(WebHost) ---- (Shared) ---- (DBHost)
*-------*
Well, you would setup the folder on the SQLServer.
Create a secure user on the SQL machine.
Make the folder shared (with modify rights for the secure user)
Map the Network drive on the Windows machine, using the secure user to access it.
Your main user on the SQLServer should then be able to openrowset from the local folder, whilst the IIS Server is remotely accessing it.
Using the OPENROWSET means that SQL qill access files using the service account. This account must be used to access share drive, as stated here Using SQL Credential to Open a file with OpenRowSet.

Why does sql server restrict the locations from which you can attach or restore a database from?

I'm assuming some sort of security constraint, but if I have access to all folders on a PC, why allow some folders and not others.
What is the criteria for a folder being a valid backup / restore / attach folder?
Any advice appreciated!
Is not you who must have access, but the SQL Server service account. The engine must be able to attach the file after a restart when you are not logged in, so it cannot use your credentials, it must use its own credentials.
A valid backup/attach folder is one on which the SQLServerMSSQLUser$ComputerName$InstanceName user has full control. The Setup creates a set of folders that are correctly configured, see Setting Up Windows Service Accounts:
Instid\MSSQL\backup Full control
Instid\MSSQL\binn Read, Execute
Instid\MSSQL\data Full control
Instid\MSSQL\FTData Full control
Instid\MSSQL\Install Read, Execute
Instid\MSSQL\Log Full control
Instid\MSSQL\Repldata Full control
100\shared Read, Execute
Instid\MSSQL\Template Data (SQL Server Express only) Read
It matters less what folders you have access to than what folders SQL Server has (or should have) access to. Folders in private locations on the drive (like in a user's home directory) aren't necessarily accessible by the user that SQL Server runs as.

Error opening .mdf file through SQL Server Management Studio Express

I am doing a project of a web enabled database. I have created the database file in my PC.
Now when I just want to open .mdf i.e. of the database I created, I cannot open it in other PC. I even had copied the .ldf file i.e the log file to that PC.
Since I need to transfer the database to the Server later, I don't know how I will dump the database in that server from my PC so that the company can use it.
The basics of using mdf file is like this:
Create a new database using SQL Server (set the path for the file as you wish)
If you wish to move the file elsewhere,
detach the database from your server
copy/move the file to wherever you wish
attach the file as database in SQL server
You are not supposed to open the file by double-clicking as mime setting or attachment of extensions migh not be there in the target machine.
Why don't you use the decent method to copy/move database?