Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Importing ms access databse

Author  Topic 

kulfi
Starting Member

33 Posts

Posted - 2011-02-01 : 04:10:00
hi,
when i import a MS Access Data base from remote area like \\10.0.0.155\V-Schedule\CAD_Data_Base.mdf to mdb file why the destination place of the file is changed i want the file to stay in the same place.
thanks


Ehsan

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-02-01 : 04:33:46
Because SQL Server has no artificial intelligence to guess where you want to save your files.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

kulfi
Starting Member

33 Posts

Posted - 2011-02-01 : 06:11:11
OK than if i go to C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\*.mdf the saved file
can i copy or move the file to the remote area where i want this file to be, i tried several times the file can not be copied due to a permission denied please can u tell me how can i solve this problem and put the files the required folder.
thanks

Ehsan
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-02-01 : 07:01:12
Give your user access/permissions to create files in "C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\".


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

kulfi
Starting Member

33 Posts

Posted - 2011-02-01 : 07:08:26
Hi, Please try to understand there is no usetname and password for the file, windows authenification is used and what i want to know is that why the file is saved on this address i did not provided this address.
thanks

Ehsan
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-02-01 : 07:31:09
Please try to understand this is not a database-related problem. It is an operating system problem where all users are denied access to create files on the system partition.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

kulfi
Starting Member

33 Posts

Posted - 2011-02-01 : 23:34:09
No i have full access on that remote Area i can copy, edit atc what i want to know is that why the file when transfered is automatically transfered to the local path sql server path while i am accessing the file from the remote area and want to save on the same remote area after importing.
thanks

Ehsan
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2011-02-02 : 02:06:23
Can you please post the full error message? I am guessing it includes error number 5.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Ifor
Aged Yak Warrior

700 Posts

Posted - 2011-02-02 : 07:53:56
quote:
Originally posted by kulfi

No i have full access on that remote Area i can copy, edit atc what i want to know is that why the file when transfered is automatically transfered to the local path sql server path while i am accessing the file from the remote area and want to save on the same remote area after importing.
thanks

Ehsan



If you are connected to a local version of SQL and import remote data, the data will be placed in the local database.

If you connect to a remote version of SQL and import remote data, the data will be placed in the remote database.

ie. The data is imported into the database you are connected to.

If you want to move a SQL database, do not copy the mdf files etc, run the BACKUP command, copy the resulting .BAK file and then RESTORE the .BAK file.

Go to Top of Page

kulfi
Starting Member

33 Posts

Posted - 2011-02-02 : 11:04:39
OK LET ME TELL YOU THAT THE SQL SERVER WAS RUNNING WHERE THE FILE IS BUT THE FILE IS COPIED TO LOCAL COMPUTER AFTER IMPORTING.
PLEASE LET ME KNOW WHY?

Ehsan
Go to Top of Page

Ifor
Aged Yak Warrior

700 Posts

Posted - 2011-02-02 : 11:25:49
You must be attached to a version of SQL on the Local computer.
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2011-02-03 : 05:14:35
quote:
Originally posted by kulfi

OK LET ME TELL YOU THAT THE SQL SERVER WAS RUNNING WHERE THE FILE IS BUT THE FILE IS COPIED TO LOCAL COMPUTER AFTER IMPORTING.
PLEASE LET ME KNOW WHY?

Ehsan




Please read up on SQL Server and how to access the database, also read up on why you can't move the physical files while the database is attached to a SQL Server instance.
Go to Top of Page
   

- Advertisement -