Microsoft office access linux

how to use an MS-Access file from Linux?

I’m studying an introductory course in databases and one of the exercises is to work with MS-Access. However I’m using Linux at home and although I can use the computer classes at the university it is far from convenient (limited open time — my studying time is mostly nights). So how can I use an Access file ( *.mdb ) in Linux? By use I mean changing tables, writing queries and so on. Are there tools to convert it to another database format (mysql, postgresql or even gadfly)? Also what problems may I encounter?

Thanks for all the answers. I forgot about OpenOffice Base. I hope to try the various suggestions during the weekend and see what works out best for me.

For more information on using [Open | Libre]Office Base with Access databases under Linux, see this answer on Ask Ubuntu.

7 Answers 7

Although a bit dated, I’ve had good success with mdbtools which is a set of command line tools for accessing and converting Access databases to other formats. I’ve used it for importing databases into PostgreSQL.

If you’re running an Ubuntu variant you can install it with:

sudo apt-get install mdbtools 

or you can download it from here.

I will second that — but be warned that different versions of mdbtools will result in a slightly different output. Types and schema can vary.

To easily export full MS Access database using mdbtools tools from this answer, check out gist.github.com/turicas/2592877 script. To export to mysql (or postgresql) two lines should be fixed (described in comments from same link)

You’re out of luck. Access has no real equivalent on Linux and while Kexi is an interesting alternative that can import Access files and aims to provide similar functionality, it doesn’t actually uses Access files once the data is imported.

If your assignment is to develop an Access application with forms etc as opposed to just using and mdb database as a store, then you can try a recent release of Wine with a compatible Access version (see compatibility list) or, even better, find a Windows machine where you’re sure it’s going to work.

Not to be forgotten, the use of a Virtual Machine loaded with Windows would help you achieve the same thing on your Linux box.

I am currently trying Access with Wine on Ubuntu and I seem to be getting there. I have found that I need to copy various dlls manually, but that could easily be lack of reading up on the subject.

From the documentation: Connecting To Microsoft Access. However, this seems to indicate that you need access running in a windows host and connect via ODBC. See also Known Problems.

Читайте также:  Линукс сервер что это

MS Jet does not run on anything but Windows. It’s record locking is very tightly tied to Windows file systems, and I won’t even allow my clients to store their MDBs on file servers that aren’t running native Windows file systems (that means no Novell and no Linux/Samba).

I recently discover https://dbeaver.io/ which is a software (in java) to manage different database types (MySQL, PostGreSQL…), a bit like phpmyadmin (but as a host based soft, no server require) and it can manage MS Access excep if version is too old (it is probably my case)

You can work with Access through a connection (ODBC or OLEDB), as long as you only need to manage the «database» dimension of the file (tables and views, which are called «queries» in Access).

Once the connection is open (see here for connection strings), you can send SQL commands to your mdb database, such as (where cn is here a connection object):

cn.execute "CREATE TABLE myTableName (myTable_id autoNumber, myTable_code Text, . )" 

Please note that MsAccess uses a specific DDL that looks like the standard T-SQL but is not really it. Check the syntax in MsAccess help.

Depending on your database (and its constraints, default values, primary keys used, relations, data validation rules, aso), transfering Access can be easy and straight or might not even be possible. You will encounter a problem each time your database implement an access-specific/non-standard SQL rule.

If you really need to convert your access data to something else, I’d adise you to (1) export it under MS-SQL (the free version will be ok, an upsizing wizard is available in Access or on this site), (2)use an additional tool like this one to generate a «CREATE DATABASE» SQL Script, including or not data inserts, (3) use this script to try to create the database and its data on another database server.

Источник

Access в Astra Linux

Следуя моде, направленной на импортозамещение, моя организация начала активный переход на использование отечественной операционной системы Astra Linux Special Edition.

К сведению, данная система базируется на Debian x64.
Все бы было хорошо, если бы не наличие большого количества баз данных под управлением СУБД Access.

Вопрос, кто-нибудь уже имел опыт использования Microsoft Access под какой-либо версией систем на ядре Linux?

Linux Astra
Добрый день, такой вопрос, хочу поставить linux astra, компьютер без видеокарты, только процессор.

Не выключается Astra Linux
Добрый день! Подскажите, пожалуйста, установил Astra Linux 1.6 SE. При выключении компьютера.

Логирование в astra linux
Всем привет. Не могу настроить логирование входа/выхода пользователя в астре, в /var/log/auth.log.

Запуск приложений в astra linux
Разрабатываю приложение на ubuntu в qt. Почему оно не запускается в astra linux?

Про Astra Linux ничего не знаю. Какая-то новая система. Но, вообще говоря, есть продукты специально заточенные для работ под многими системами. Обычно для пользования MS Office под линуксом ставят Wine или CrossOver. Вам надо узнать у ваших системщиков, что предполагается ставить для поддержки офисных документов. Не может быть, что все ранее наработанные вордовские, екселевские, поверпойнотовские, акцесные наработки разом были выкинуты. Так не делают.

Читайте также:  Astra linux криптопро личный сертификат

Разработчик CodeWeavers[d]
Wine (/waɪn/ — «уа́йн» рус. Вино) — свободное программное обеспечение, позволяющее пользователям UNIX-подобных операционных систем, например, GNU/Linux, Apple macOS и других UNIX-подобных с поддержкой архитектур CPU x86, AMD64 (и других архитектур CPU, при наличии совместимости с ними запускаемых приложений) исполнять 16-, 32- и 64- битные приложения, в том числе игры, созданные эксклюзивно для Microsoft Windows, без наличия при этом установленной Microsoft Windows. Кроме того, существует версия Wine для Microsoft Windows, позволяющая запускать на современных версиях Microsoft Windows устаревшие приложения/игры, которые были созданы для предыдущих, устаревших версий Microsoft Windows и уже стали несовместимы с современными версиями Microsoft Windows. Wine также предоставляет программистам библиотеку программ Winelib, при помощи которой они могут компилировать Windows-приложения для портирования их в UNIX-подобные операционные системы. Название W.I.N.E. является рекурсивным акронимом и расшифровывается «Wine Is Not an Emulator» — «W.I.N.E. — это не эмулятор». Имеется в виду, что Wine не является эмулятором компьютера или виртуальной машиной, как, например, qemu, VirtualBox и другие подобные им. Вместо этого, Wine — это альтернативная, свободная реализация Win32 API.

CrossOver (ранее CrossOver Office) — программа, позволяющая запускать многие приложения, написанные для ОС Microsoft Windows в ОС Linux и macOS, при этом наличие установленной Windows не требуется[2].

Содержание
1 Описание
2 Примечания
3 См. также
4 Ссылки
Описание
CrossOver создаётся компанией CodeWeavers на основе исходных кодов свободного аналога — Wine[3]. При этом сам он является коммерческим продуктом. Разработчики CodeWeavers добавляют собственные заплатки, а также графические утилиты конфигурации. Кроме того компания нанимает нескольких разработчиков Wine, а также возвращает многие свои наработки в свободный проект.

CrossOver отличается от Wine более узкой направленностью: он нацелен на поддержку наиболее востребованных офисных и иных приложений Windows, таких как Microsoft Office разных версий, Microsoft Internet Explorer, Lotus Notes, Adobe Photoshop и другие. Но зато совместимость с этими приложениями тщательно тестируется и отлаживается, так что их работа обычно бывает стабильнее, чем в Wine.

Существует также версия CrossOver Games, созданная для запуска популярных игр для ОС Windows. В октябре 2015 года была показана версия CrossOver для Android[4], а в июле 2016 года — для Chrome OS[5].

Источник

How to use an ms-access file from linux?

Microsoft Access is a database management system (DBMS) from Microsoft that combines the relational Microsoft Jet Database Engine with a graphical user interface and software-development tools. Although it is primarily designed for use on Windows, it can also be used on other platforms such as Linux, with some limitations. If you want to use an MS-Access file on a Linux system, there are a few options available to you.

Method 1: Wine

To use an MS-Access file from Linux, we can use Wine. Wine is a compatibility layer capable of running Windows applications on Linux. Here are the steps to use an MS-Access file from Linux with Wine:

Step 1: Install Wine

First, we need to install Wine on our Linux system. Here is the command to install Wine on Ubuntu:

Читайте также:  Format usb drive with linux

Step 2: Install MS-Access

Next, we need to install MS-Access on Wine. We can install it by following these steps:

  1. Download the MS-Access installer from Microsoft website.
  2. Open the terminal and navigate to the directory where the installer is downloaded.
  3. Run the following command to start the installation:

Step 3: Open MS-Access file

Once MS-Access is installed, we can open the MS-Access file by following these steps:

  1. Open the terminal and navigate to the directory where the MS-Access file is located.
  2. Run the following command to open the MS-Access file:
wine msaccess.exe /path/to/access/file.accdb

This will open the MS-Access file in Wine, and we can use it just like we would on a Windows system.

Method 2: Virtual Machine

  1. Install VirtualBox on your Linux machine.
  2. Download the Windows ISO file and create a new virtual machine on VirtualBox with Windows as the guest OS.
  3. Install Microsoft Access on the Windows virtual machine.
  4. Share the MS-Access file from the Windows virtual machine to the Linux host machine by adding a shared folder in VirtualBox.
  5. Mount the shared folder on the Linux machine by running the following command:
sudo mount -t vboxsf shared_folder_name /mnt/mount_point
  1. Access the MS-Access file from the mounted folder using ODBC connection. Install ODBC drivers for MS-Access on the Linux machine and configure the connection string in your code.
import pyodbc conn_str = ( r'DRIVER=;' r'DBQ=/mnt/mount_point/path/to/access_file.accdb;' ) conn = pyodbc.connect(conn_str) cursor = conn.cursor() cursor.execute('SELECT * FROM table_name') rows = cursor.fetchall() for row in rows: print(row)

That’s it! You can now use the MS-Access file from your Linux machine using VirtualBox.

Method 3: Remote Desktop Connection

sudo apt-get update sudo apt-get install xrdp
rdesktop windows_machine_ip>
cd "C:\Program Files\Microsoft Office\OfficeXX" msaccess.exe "C:\path\to\your\file.accdb"
  1. You can now use your MS-Access file from your Linux machine through the Remote Desktop Connection.

Note: Make sure that your Windows machine has Remote Desktop enabled and that your Linux machine can connect to it. Also, make sure that you have the necessary permissions to access the MS-Access file.

Method 4: Converting to Other Database Format

sudo apt-get install mdbtools
mdb-schema file.mdb | sqlite3 file.sqlite for i in $(mdb-tables file.mdb); do mdb-export -I sqlite file.mdb $i > $i.sql; done for i in $(ls *.sql); do sqlite3 file.sqlite  $i; done
mdb-schema file.mdb mysql | mysql -u username -p -h localhost dbname for i in $(mdb-tables file.mdb); do mdb-export -I mysql file.mdb $i | mysql -u username -p -h localhost dbname; done
mdb-schema file.mdb postgres | psql -h localhost -U username dbname for i in $(mdb-tables file.mdb); do mdb-export -I postgresql file.mdb $i | psql -h localhost -U username dbname; done

Note: Replace «file.mdb» with the name of your MS-Access file, and replace «username», «dbname», and «localhost» with your own MySQL/PostgreSQL settings.

This method allows you to use an MS-Access file from Linux by converting it to another database format. You can then access the converted data using the appropriate database tools and libraries.

Источник

Оцените статью
Adblock
detector