database-restore

Restoring SQLite DB file

雨燕双飞 提交于 2019-11-27 15:23:01
问题 I'm implementing a backup/restore system in my android app. An automatic backup occures every couple of minutes. I'm trying to restore my db backup file from my sd card, after my app was uninstalled and then installed again. Backup works, but here's the problem: Whenever the user installs my app again, there's a file not found exception, but, if the user closes the app, and then opens it again, the restore is just fine. Somehow, the restoring faces problem when the app is first launched. The

SQL Server database restore error: specified cast is not valid. (SqlManagerUI)

痴心易碎 提交于 2019-11-27 11:50:20
问题 I am using SQL Server 2008 R2 Standard (version 10.50.1600.1) for my production website and SQL Server Express edition with Advanced Services (v10.50.1600.1) for my localhost as a database. Few days back my SQL Server crashed and I had to install a new 2008 R2 Express version on my localhost. It worked fine when I restored some older versions taken from Express edition but when I try to restore database from .bak file which is taken from production server it is causing the following error:

Restoring database from .mdf and .ldf files of SQL Server 2008

非 Y 不嫁゛ 提交于 2019-11-27 11:12:28
For some reason I have to uninstall SQL Server 2008 R2 but before that I copied two files ( .mdf and .ldf ) of my database from C:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQL2008\MSSQL\DATA Now, the question is, is it possible for me to recover the database from these files in my new installed SQL Server 2008 R2. If yes: then how can I do this? sridhar Yes, it is possible. The steps are: First Put the .mdf and .ldf file in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\ folder Then go to sql software , Right-click “Databases” and click the “Attach” option to open the

Enable binary mode while restoring a Database from an SQL dump

非 Y 不嫁゛ 提交于 2019-11-27 00:32:46
问题 I am extremely new to MySQL and am running it on Windows. I am trying to restore a Database from a dumpfile in MySQL, but I get the following error: $ >mysql -u root -p -h localhost -D database -o < dump.sql ERROR: ASCII '\0' appeared in the statement, but this is not allowed unless option --binary-mode is enabled and mysql is run in non-interactive mode. Set --binary-mode to 1 if ASCII '\0' is expected. Query: 'SQLite format 3'. I have tried putting --binary-mode in the ini file but it still

How to restore PostgreSQL dump file into Postgres databases?

给你一囗甜甜゛ 提交于 2019-11-26 22:36:16
问题 I have a dump file with a .SQL extension (in fact it is a plain-text SQL file). I want to restore it into my created databases. I am using pgAdmin III, and when I use its "Restore Wizard" it does not highlight the button "Restore". Instead it is expecting a .backup file extension. I tried using shell the commands for restoring the dump, but it still didn't work. I am a newbie at this. If anybody could help me I would be obliged. Edit I used following command to the Shell SQL Pane of PostGres

Restoring database from .mdf and .ldf files of SQL Server 2008

半世苍凉 提交于 2019-11-26 17:59:28
问题 For some reason I have to uninstall SQL Server 2008 R2 but before that I copied two files ( .mdf and .ldf ) of my database from C:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.MSSQL2008\MSSQL\DATA Now, the question is, is it possible for me to recover the database from these files in my new installed SQL Server 2008 R2. If yes: then how can I do this? 回答1: Yes, it is possible. The steps are: First Put the .mdf and .ldf file in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\

Android backup/restore: how to backup an internal database?

对着背影说爱祢 提交于 2019-11-26 00:57:42
问题 I have implemented a BackupAgentHelper using the provided FileBackupHelper to backup and restore the native database I have. This is the database you typically use along with ContentProviders and which resides in /data/data/yourpackage/databases/ . One would think this is a common case. However the docs aren\'t clear on what to do: http://developer.android.com/guide/topics/data/backup.html. There is no BackupHelper specifically for these typical databases. Hence I used the FileBackupHelper ,