importing filemaker pro database to postgreSQL via ODBC driver - database

I want to import an existing FilemakerPro (local, no server version) database into PostgreSQL. I have configured my two ODBC drivers for FMP and PostgreSQL. The two appear in the ODBC Manager and they are connected properly. Now my problem: I don't find any comprehensible explanation how to import the database in Postgre! I imagine that I need to write a bit of SQL-code but I didn't find any commented one.
I have seen a lot of inormation like this: "I suggest looking at FileMaker ODBC to extract data, or using Postgres ODBC driver and insert data from FileMaker with "Execute SQL" script step into PostgreSQL tables." But nothing that explained more precisely.
Could anybody help me by telling what to do inside PostgreSQL to import the database?
Thanks a lot for your help!

Related

PostgreSQL database not available through Navicat

I'm new to Postgres, not to SQL. I generally use Navicat to connect to my databases, so I've set up a connection to a remote Postgres DB the same way I normally would. I'm able to:
Connect successfully
List databases
When I click on the database with my tables, however, it expands the database but doesn't show anything. No tables.
I saw the other question here, where a user was trying to get into 'template0' and 'template1': Some PostgreSQL databases not visible through clients like Navicat or pgAdmin
I'm not trying to get into these, but into a custom DB full of tables. I've verified that both my web app, and phpPgAdmin can both access all the tables and data, so the issue seems to lie with Navicat.
I read some instructions about how these tables might be 'system items', and went into the Navicat preferences and checked the box that says 'Show system items (PostgreSQL, SQL Server)' to no avail.
One thing I also tried, as I'm using Navicat Premium, is to install the Navicat PostgreSQL version instead. This also yields exactly the same results, I can see my database but none of the tables.
What's going on here?
EDIT
With some great help from Vao Tsun, we determined that this is PostgreSQL 7.2.4 and that it is not supported by Navicat.
https://www.navicat.com/products/navicat-for-postgresql:
Navicat for PostgreSQL connects you to any local/remote PostgreSQL
database servers from version 7.3 or above.
It does not work with PostgreSQL 7.2.4

Where does Oracle DBCA come in?

I'm planning to play around with Oracle Business Intelligence (for fun). I have access to a number of Oracle products, and may have gone overboard installing them all (quite possibly more than I need).
Problem is I'm not too sure how all the different Oracle components fit together, but I think I am still missing something, a crucial part - DBCA.
All the online help material I can find says use DBCA to create a database - but I don't seem to have DBCA anywhere.
What I do have installed is:
Oracle - OraClient11g_home1
Oracle - OraDb11g_home1
Oracle Business Intelligence
Oracle Weblogic
Does Oracle have a separate Database Server that is not included in the above? (Like MS SQL Server)
I'll note that I am completely new to Oracle and may be missing something very simple, so any help would be appreciated.
I'm looking for an answer that can lead me to how I can install DBCA and create my database but extra kudos for any additional brief information on how these Oracle building blocks work independently and together.
DBCA is the database configuration assistant. It is a wizard used to create a database and should be instaled during the server install. If you are testing you just want to create a database as part of the server insall and ignore dbca.
Oracle - OraDb11g_home1 is the database (most probably at least - given then Oracle naming conventions). DBCA was called as part of the installation process.
Note that a "database" in Oracle terms is something completely different than a "database" in MS SQL Server. A SQL Server "database" is closer to an Oracle schema.

migrate data from MS SQL to PostgreSQL?

I've looked around and can't seem to find anything that answers this specific question.
What is the simplest way to move data from an MS SQL Server 2005 DB to a Postgres install (8.x)?
I've looked into several utilities like "Full Convert Enterprise", etc, and they all fail for one reason or another, ranging from strange errors that make it blow up to inserting nulls rather than actual data (wth?).
I'm looking at a DB with all table except for a single view, no stored procs, functions, etc.
At this point I'm about to write a small utility to do it for me, I just can't believe that's necessary. Surely there's something somewhere that can do this? I'm not even too worried about cost, although free is preferable :)
I don't know why nobody has mentioned the simplest and easiest way using robust MS SQL Server Management Studio.
Simply you just need to use the built-in SSIS Import/export feature. You can follow these steps:
Firstly, you need to install the PostgreSQL ODBC Driver for Windows. It's very important to install the correct version in terms of CPU arch (x86/x64).
Inside Management Studio, Right click on your database: Tasks -> Export Data
Choose SQL Server Native Client as the data source.
Choose .Net Framework Data Provider for ODBC as the destination driver.
Set the Connection String to your database in the following form:
Driver={PostgreSQL ODBC Driver(UNICODE)};Server=;Port=;Database=;UID=;PWD=
In the next page, you just need to select which tables you want to export. SQL Server will generate a default mapping and you are free to edit it. Probably you`ll encounter some Type Mismatch problems which take some time to solve. For example, if you have a boolean column in SQL Server you should export it as int4.
Microsoft Docs hosts a detailed description of connecting to PostgreSQL through ODBC.
PS: if you want to see your installed ODBC Driver, you need to check it via ODBC Data Source Administrator.
Take a look at the Software Catalogue. Under Administration/development tools I see DBConvert for MS SQL & PostgreSQL. Probably there are other similar tools listed.
You can use the MS DTS functionality (renamed to SSIS in the latest version I think). One issue with the DTS is that I've been unable to make it do a commit after each row when loading the data into pg. Which is fine if you only have a couple of 100k rows or so, but it's really very slow.
I usually end up writing a small script that dumps the data out of SQLServer in CSV format, and then use COPY WITH CSV on the PostgreSQL side.
Both those only take care of the data though. Taking care of the schema is a bit harder, since datatypes don't necessarily map straight over. But it can easily be scripted together with a static load of the schema. If the schema is simple (just varchar/int datatypes for example), that part can also easily be scripted off the data in INFORMATION_SCHEMA.
Well there are .NET bindings for MS SQL Server 2005 (obviously) and also for PostgreSQL. So it would only take a few lines of code to code up a program that could transfer data safely from one to the other. The view would probably have to be done manually as Postgres doesn't use the same language for views as SQL Server.
This answer is to help summarize current connection string because someone may overlooked the comment.
Current version of ODBC connection string is:
For 32-bit system
Driver={PostgreSQL UNICODE};Server=192.168.1.xxx;Port=5432;Database=yourDBname;Uid=postgres;Pwd=admin;
For 64-bit system
Driver={PostgreSQL UNICODE(x64)};Server=192.168.1.xxx;Port=5432;Database=yourDBname;Uid=postgres;Pwd=admin;
You can check the driver name by typing ODBC in windows search.
And open ODBC Data Source Administrator

What is a good automated data import method for SQL Server?

I'm in the process of porting some SQL Server 2005 databases to SQL Server 2008. One of these databases has an associated import application (Windows task) which uses SSIS with a DTS package to import a large dataset from an MS Access database nightly.
In upgrading to SQL Server 2008, I discovered that I can't run the same console application which has been performing the imports due to the missing manageddts DLL in SQL Server 2008. It's several years old and in need of a rewrite for various reason, plus, I've been fairly unhappy with DTS in general. The original reason DTS was chosen was for speed (5 min import time compared to 30+ for ADO.NET).
The format of the data to import is out of my control (the client likes Access). I would also like to be able to run the import from a machine completely separate from the server hosting SQL Server and preferably with minimal SQL features installed.
Options I've considered:
Creating an Access application to connect to both databases (SQL Server and Access) and perform the import (Ugh!)
Revisiting ADO.NET to see if the original implementation was poorly written.
Updated SSIS packages.
What other technologies should I be considering for this job?
I received a suggestion that I use ADO.NET to convert the .mdb file to a bunch of flat files, then use tsql's bulk insert statement to import the flat files. If it works, I'll mark this as the answer.
EDIT:
This worked really well. Far speedier than the old DTS. One down side is that the import user must have bulkadmin rights, and the schema of the flat files must precisely match the tables, but a little coding solved the latter, and a secure, dedicated user account answers the former.
I'm fairly happy with the result.
I guess you should try SSIS. If you don't know enough of it, you will learn a new thing.

How to convert legacy Interbase DB to SQL Server?

I have an Interbase DB. How can I convert it to SQL Server?
You could use SQL Server built in Data Transformation Services (DTS) in SQL Server 2000 or SQL Server Integration Services (SSIS) in SQL Server 2005.
Try setting up an ODBC DSN for Interbase. Then in DTS / SSIS use the Other (ODBC Data Source) and the DSN.
If that does not work then see if Interbase has a utility to export to text files and then use DTS / SSIS to import the text files.
If you want to spend some money, this will do it:
http://www.spectralcore.com/fullconvert/tutorials/convert-interbase-firebird-to-mssql-sql-server.php
The Interbase DB Wikipedia page says that it supports OBDC and ADO.NET, so I would think that SQL Server can probably import this database on its own. I don't have access to an Interbase DB installation to try, but you might find these pages helpful.
MSDN on import data wizard
MSDN on bulk import command (if Interbase DB can dump a text file)
Article on bulk importing from an ADO.NET supporting source
Hopefully somebody will have direct experience with this database and can help. Good luck!
If you only need to convert tables and data, that's rather simple. Just use ODBC driver for InterBase, connect to it and pump the data.
However, if you need business logic as well, you cannot covert it just like that. You can convert regular tables and views without too much problems. Domain info would be lost but you don't need it in MSSQL anyway. The only problem with tables can be array fields, which you need to convert to separate tables, but that isn't too hard either.
The problem is the conversion of triggers and stored procedures, since InterBase uses its own, custom PSQL language. It has some concepts that are different from MSSQL. For example, you have procedures that can return resultsets, and you would need to convert those to MSSQL functions.
In any case, it shouldn't be too hard, since you're going from low to high complexity, but there are no tools to do it automatically.

Resources