database-restore

postgresql- restoring .dump file

Hi, I am new for psql. i got from my server data.dump file. I need to restore it in my local. i tried these commands. i) psql -U postgres dbname -f servicedb.dump Error: psql: warning: extra command-line argument "-f" ignored psql: warning: extra command-line argument "servicedb.dump" ignored ii) psql -U postgres dbname ...

SMO restore and Windows 7

I have an application that uses SMO to manage databases. It works great on XP and Server 2003. However, when I try to run it on Windows 7, I get the following exception: Restore failed for Server 'localhost'. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=9.0.242.0, Cultu...

What's a Backup and Recovery Process for Team Foundation Server 2010?

We have a new installation of TFS 2010 (on SQL Server 2008), and I'm planning the backup and recovery process. It seems the configuration information and data is stored in the Tfs_Configuration and Tfs_DefaultCollection databases (and additional Tfs_[CollectionName] dbs if you have more than one collection). In a test setup, I tried ba...

Backup and Restore from SQL Server 2005 to 2008 express edition?

Hello there, I'm having a huge problem with a client. Their infrastructure blows, and most of the development done end up with mysterious errors(which only happen in their environment). What I'm trying to do is create a separate environment (a VPS) and push the application server and the database into this new environment, so they can...

Restore Database backup from code?

I have an application extension which I need to test. Part of the extension applies some updates to the application database schema (via the applications API). i want to test that given version 1 of the application when my class is run the schema becomes v1.1 and that certain queries for items which should exist in 1.1 return correctly...

Restoring two databases from a single backup file (SQL Server 2005)

I have a .bak file which contains backup sets of two different databases. It was made by sql server maintenance plan. Now I have to restore both databases. The problem is, that while the first database is restored ok (db_companies) the other database (db_data) gives an error: Restore failed for Server 'SBSERVER'. (Microsoft.SqlSer...

Reliable backups for huge mysql databases?

I have 200GB / 400Mrows mysql/innodb database - far beyond what's reasonable as I found out. One surprising problem is restoring backups. mysqldump generates huge sql files, and they take about a week to import back into a fresh database (attempts at making it faster like bigger/smaller transactions, turning off keys during import etc.,...

Remove (merge) SQL Servers' database secondary data file

I have a database backup for which SQL Server Management Studio says that it has three files in it: an .mdf file, an .ndf file and one .ldf file. This secondary data file (the .ndf one) was created for no obvious reason, so I want to remove it altogether (without losing data, of course), preferably during while the database is being rest...

Screwed up table in oracle

I have to admit that I just, well, screwed the pooch on a production database. When running an update query in SQL Developer, I did not realize that only a portion of the query was highlighted. If you have any experience with SQL Developer, this means that SQL Developer will only execute that sub-section of a query -- in this case, app...

Restore mysql lost table

I accidentally deleted a table in my mysql database. After that I've restored this table from backup which is scheduled daily at 00:01. But there are lost data from 00:01 to 12:34. Is there a way to restore these records? Table engine is myisam. ...

Restore firebird database just from fdb file

Had a webserver crash yesterday and had to reinstall system (Ubuntu)..99% of the data/application restores were just fine as I use mysql and have proper backups, however also have 2 firebird databases which were unfortunatelly not backuped using gbak and I have only the fdb files available. Is there any way to restore Firebird database...

Wisdom of merging 100s of Oracle instances into one instance

Our application runs on the web, is mostly an inquiry tool, does some transactions. We host the Oracle database. The app has always had a different instance of Oracle for each customer. A customer is a company which pays us to provide our service to the company's employees, typically 10,000-25,000 employees per customer. We intend to hav...

Finding the restore progress of SQL server from inside c#

I know this is most-likely a simple question but when you restore a database from inside SQL management studio you can set the update interval with stats RESTORE DATABASE [test] FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\test.bak' WITH FILE = 1, NOUNLOAD, STATS = 10 If I wanted to execute that line of...

What is the fastest method to create a new database from a template ?

We are creating databases on demand and the databases can be created from different templates. All templates have the same structure but different data. The data contained by the templates is small. What is the fastest way to create a copy of the database: Backup/Restore Using T-SQL ? Using SMO ? Create a new database from a scripte...

Fully automated SQL Server Restore

I'm not very fluent with SQL Server commands. I need a script to restore a database from a .bak file and move the logical_data and logical_log files to a specific path. I can do: restore filelistonly from disk='D:\backups\my_backup.bak' This will give me a result set with a column LogicalName, next I need to use the logical names fr...

SQL Server "RESTORE FILELISTONLY" Resultset

I'm trying to write an automated backup and restore T-SQL scripts. I've done BACKUP part but I'm struggling on RESTORE. When I run following statement on SS Management Studio; EXEC('RESTORE FILELISTONLY FROM DISK = ''C:\backup.bak''') I get a result set in a grid and also I can use INSERT INTO <temp_table> EXEC('RESTORE FILELISTO...

how to restore deleted records in MDB

is it possible to restore deleted records in MDB? ...

how to restore very large .bak file (180 GB) in SQL Server 2008

Hello! I have a verly large .bak file (180 GB) which was stored in Microsoft SQL Server 2008 and I have to restore it. I first installed Microsoft SQL Server 2008 Express and tried to restore it in MS SQL management studio express but it didn't work because there is a size limit. Does anybody know a method how i can restore the file? It...

mysql restore file.sql syntax error using command line

when I input mysql -u root -p XXXX dbname < c:/filename.sql alway get this error "error 1064 <42000>:" you have an error in your SQL suntax; check the manual that corresponds to your MySql server version for the right syntax to use near ..... what is wrong with this statement? ...

Higher speed options for executing very large (20 GB) .sql file in MySQL

My firm was delivered a 20+ GB .sql file in reponse to a request for data from the gov't. I don't have many options for getting the data in a different format, so I need options for how to import it in a reasonable amount of time. I'm running it on a high end server (Win 2008 64bit, MySQL 5.1) using Navicat's batch execution tool. It's b...