Restoring .mkd file to Pervasive SQL - pervasive-sql

I want to restore or attach .MKD file to Pervasive SQL. I only have the .MKD file and want to restore it to Pervasive SQL.

Unless your application requires DDF files, there is no "restoring" or "attaching" an MKD to a PSQL database.
The MKD file can be opened by the PSQL engine directly.
Simply point your application to the MKD file and it should be fine.

Related

Export .sql dump

I have to make a dump file with the extension .sql, what is the correct way to do this? I am using Oracle database Express Edition 10g. Would this work fine if I enter it in the cmd?
expdp system/system_password full=Y EXCLUDE=SCHEMA:\"LIKE \'APEX_%\'\",SCHEMA:\"LIKE \'FLOWS_%\'\" directory=DUMP_DIR dumpfile=DB1.sql logfile=expdpDB10G.log
expdp creates a dump file, which can only be used by impdp and cannot be run as a SQL script, so it doesn't make sense to name it with the .sql extension.
I prefer to name it with something like .dmp so that it's clearer what it contains.

Importing .sql file into IBM DB2 Express-C

Hello I' new to IBM DB2 Express-C
I have a exported a database to .sql file (Original database stored in SQLite3 - used SQLite SQLite Manager for exporting the the database to a .sql file)
Can anyone please tell a way to import a this .sql file into DB2. Thank you
If you want to execute a set of sentences in a file in DB2, you issue in the command line (db2clp):
db2 -tvf <filename>
For exmpale, for your file
db2 -tvf myfile.sql
However, the content of that file could not be compliant with DB2, and you have to modify it, in order to run correctly in DB2.
Basic Create tables, and DML (insert, delete, update) are SQL 92 standard accross many database. But if you have create bufferpool, tablespaces, and other kind of objects, you have tomodify the file a lot.

How to convert a bunch of .btr and .lck files to a readable SQL?

I have a bunch of .btr and .lck files and I need to import those to a SQL Server Data Base.
How can I do that?
.LCK files are lock files. You can't (and don't need to) read those directly. The .BTR files are the data files. Do you have DDF files (FILE.DDF, FIELD.DDF, INDEX.DDF)? If so, you should be able to download a trial version of Pervasive PSQL v11 from www.pervasivedb.com. Once you've installed the trial version, you can create an ODBC DSN pointing to your data and then use SSIS or DTS or any number of programs to export the data from PSQL and import it to MS SQL.
If you don't have DDFs, you would need to either get them or create them. The DDFs describe record structure of each data file.

SQL Server 2005 backup and restore

I have two backup files
1) is named 'backup.sql' with a bunch of SQL defining TABLES
2) is named 'backup' with a bunch of encoded data, which I believe are the ROWS
I need to restore these TABLES + ROWS, but all I am able to figure out is how to restore the tables.
Any tips on dealing with these files? It's the first time I ever deal with SQL Server.
The backup process would not create a file with actual SQL statements, it would create a binary file. So #1 is not a backup file (it's probably a script someone saved to re-create the schema).
I would try to use SQL Server Management Studio to restore the second file and see what happens. I don't think it will allow you to restore an invalid file, but I would take some basic precautions like backing up the system first.
What is the extension for the 'backup' file? Is the filename backup.bak? If you have a backup file created by sql server then it 'should' contain the logic to create both the tables and restore the data, but it could depend on how the backup was created.
---Edit
It is possible for a .SQL file to contain data values as well as the logic to create the tables/columns for a database. I used to run backups of a MySql database in this way a long time ago...it just is not seen very often with SQL server since it has built in backup/restore funcationality.
Seems unlikely they would export all the rows from all tables into CSV file, and given you said it looks encrypted, it's making me think that's your actual backup file.
try this, save a copy of the "backup" file, rename it to backup.bak and run this from SQL Server Management Studio
restore filelistonly from disk='C:\backup.bak'
(assuming your file is saved on the root of the C: drive)
Any results/errors?

OpenERP, data restore problem

I am trying to restore a database backup through the client interface of open ERP. A message appeared "Could not restore DB". I am using Postgresql 8.4.1
Please help!
You can restore your db direct from pgadmin by making blank db and restore your db into.
and other way is by command prompt postgres given below command.
To create --- createdb db_name
To restore ---- psql created db_name < from which db you want to restore
Which version of openerp and postgresql you are using ? even this message appears, please check in postgresql you will find your database restored.
Are you able to create backups on the same server? I've had similar problems on new installations when I haven't created a .pgpass file. The db_user and db_password configuration parameters are used during regular database access, but can't be used for PostgreSQL backup and restore operations. For backup and restore, you need to set up a .pgpass file.