I have foxpro data table files ".dbf",".fpt",".cdx" .
I want to read data in the files and import it to SQL server 2008
I have windows 8 OS installed on my machine. I could not find compatible visual foxpro version for windows 8.
Also I have used dbfviewer tool to view data in .dbf file but I cannot check data in .fpt file
Any help is appreciated.
I don't know why people want to close an legit question... My guess they have no clue.
I am running windows 8.1 and use VFP 9 regularly. It may not claim to be directly compatible because M$ has discontinued support on the product, so why even test on platforms they have no concern with. Have you tried VFP9?
Another approach some people use is downloading the VFP OleDb Provider and use it via .net, or even through SQL-Server to use a connection, query the raw data into SQL Server, then run through conversion techniques while everything IS in SQL server.
VFP 9 also has from its top-level menu
Tools --> Wizards --> Upsizing
and guides you through how to pick either a directory of free tables, or pick a database and identify which server to connect to, etc, etc.
Hopefully some good starting points for you to run with and check back if you get stuck somewhere else down stream...
You only need to worry about the DBF file.
As noted in Microsoft's online documentation, Visual FoxPro's DBF, FPT, and CDX files are "Table", "Table Memo", and "Compound Index", respectively.
The DBF is the "core" file, containing the description of the fields as well as the information about each record and the actual data for most data types. For FoxPro's memo-style data types, the information for each record is written onto the equivalent FPT file instead of the DBF itself.
The CDX is a record of the FoxPro indexes, and rather that containing data just contains compiled and ordered pointers to which records match which indexed expressions.
You could purhcase a copy of Visual FoxPro 9, as it seems to work on Windows 8 albeit with some quirks. However, if you only want the data and do not have an exist VFP license, you are better off using the free OLE provider DRapp mentioned in his answer, and sending your data to a more modern format.
You can also use DBF Commander Pro to export DBF files to SQL Server.
To carry out this operation, you'll only need DBF and FPT files - they contain data of Memo field(s). CDX files are not needed since VFPOLEDB provider doesn't support indexes at all.
Install the app, open a DBF file, click File -> Export to DBMS. Then provide the connection string (or Build it). For MS SQL Server 2008 it will look as follows:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=userid;Initial Catalog=databasename;Data Source=servername
Click Connect button in order to check the connection, then choose the destination table from the dropdown list:
At the bottom of the window you'll see the command-line that can be used for uploading DBFs to a database in a batch mode. Click Export button to start the process.
DBF Commander Pro has 20-days full featured trial period, so you can do the job for free and you'll economize $300 on Visual FoxPro license :)
In Windows 7, I can create an ODBC connection to a Foxpro data source. I don't know if that capability still exists in Windows 8, but I don't see why it wouldn't.
Once that connection exists, the data becomes available for any other tool that can utilize ODBC. At that point, you could import the data into Excel, massage it, then load it into SQL Server. Alternatively, you could also access the data directly via VBScript to either dump it to a text file or import it directly into SQL Server.
Related
I have a server on Microsoft Server Management Studio that I need to download in order to work on it locally.
When I right click on the database and go to Tasks -- Export Data I get the SQL Server Import Export Wizard. I am able to pick a source, but I can't find the write destination to allow me to download the file locally.
I don't want to transfer the files to another server, I just want to have to local file to work with.
Is this the right approach? Or is there a better way to handle this task?
I don't want to transfer the files to another server....
A SQL Server database is a complex binary structure. To read it / work with it, you need a copy of SQL Server on the machine you want to work with it on. The Developer edition would be a good option for downloading to a local machine, or you could install the free version and export data to a local database.
If what you are trying to do is to just see the data without any of the SQL Server functionality, then you can export them to different types of files through the import/export functionality. However, unless the amount of data involved is quite small, I would really recommend against this. The organization and cross-referencing of data can be quite extensive depending on how the database was designed.
These are about your only two options. What you end up doing may depend on what you are planning to do with the data.
I have hundreds of .dbf files separated into different folders, basically organized as a bunch of different databases with the same structure. Some extend into the millions of rows. I need that data to end up in a SQL Server database (or multiple databases?), so my team can work with it more easily.
I can't do it manually via Access or the Import/Export Wizard as most tutorials suggest, because there are too many files. I have Access 2016, SSMS 17, Visual Studio 2017, and Windows 10 64 bit. I have been able to open individual tables in Access through the dBase V setting.
I don't know where to start, because I'm pretty new to everything. For example, should I write a console app, configure some SSMS setting, or do something else I'm unaware of?
Could you outline a high level step-by-step process I should use, and maybe point me to some resources? I've looked at a bunch of docs and forums through Google, but none quite seem to make sense to me. The most promising is this post, but I don't have the provider listed, like several others in the comments.
You may consider Integration Services for this kind of import job
https://learn.microsoft.com/en-us/sql/integration-services/connection-manager/integration-services-ssis-connections
And here is how to Connect to a dBASE or Other DBF File
https://learn.microsoft.com/en-us/sql/integration-services/connection-manager/connect-to-a-dbase-or-other-dbf-file
If this is one time operation you can convert dbf file to sql script and import data into sql server . There are some applications on windows store capable of doing so.
https://www.microsoft.com/en-us/store/search/apps?q=dbf+to+sql
I am trying to investigate an old DB file that used to have a custom front-end that dose not work anymore because of corrupted files.
The only clue I got is that it uses an old driver, a DAO Jet 3.5 (I have the driver installation file), and it used to run under windows XP.
The DB file itself doesn't have a known file extension.
What are my options for manually exploring the database?
If the file has no extension, it might not be a Jet database. But assuming it is, there are a few options...
MS Access would be the most obvious thing to try, but it can fail on old enough database files.
An alternative is MDB Viewer Plus which can open and read very old MDB files, with a nice GUI. It is perfect for "manual exploration" of an MDB file.
http://www.alexnolan.net/software/mdb_viewer_plus.htm
MDB Viewer Plus is a freeware viewer plus editor for opening Microsoft
Access MDB and ACCDB database files. It does not need to be installed
to run. It uses Microsoft Data Access Components (MDAC) which is
installed as part of Windows.
MDB Viewer Plus has been written to provide a free, quick and easy way
to open, view, edit, filter, sort, import to, export from, modify and
search MDB and ACCDB files. This is useful for software developers
like myself who use Access databases as a backend database for their
bespoke software. MDB Viewer Plus provides a convenient way to view
and edit these databases.
I got a .db database file which one of my friend created through PowerBuilder 6 in Win98. Later I wanted to test that database file, but was not able to view or open it in any of common db viewer and not able to get any data out of it.
please help..
I am using Win7 and do have xp(virtual).
The problem with your description is that PowerBuilder is database-agnostic, so it could be any type of database if it was being used with a PowerBuilder application. However, if you want to go with probabilities (and I'm not sure this is how PB is used most; at one point the most popular database used by PowerBuilder was Oracle), PowerBuilder shipped with a run time license for SQL Anywhere, a database that was originally Watcom, acquired by Powersoft, which was acquired by Sybase, which was acquired by SAP.
Supposing the database you have in hand is SQL Anywhere, you need to get a SQL Anywhere engine. Probably the first thing I'd try is downloading the Developer version of SQL Anywhere and just try to open up a copy with that, see if the software will migrate it to the current version. (My bet is that it will, or will at least provide you with a means.) Another way to get a current version of SQL Anywhere (I think; I haven't tried this in ages) is to download a trial version of PowerBuilder 12.5, which I think comes with SQL Anywhere (the paid version does). If you get that up and running, then you can use a pipeline object in PowerBuilder to pretty easily move data from one database to another. And, for kicks, you can migrate up your PB6 app to see if it still runs. (My bet is that it will take a few tweaks, but fewer than you're probably imagining.)
Good luck,
Terry.
Your .db file is probably a Sybase SQL-Anywhere database. You need to know which version of the engine was used to create the database and then you need the ODBC driver to access that database.
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