restore all mysql database from a –all-database sql.gz file

Yes. Generally, to restore compressed backup files you can do the following: gunzip < alldb.sql.gz | mysql -u [uname] -p[pass] [dbname] Please consult How to Back Up and Restore a MySQL Database Note that the –all-databases option is applicable to backup only. The backup file itself will contain all the relevant CREATE DATABASE quux; commands … Read more

Fully automated SQL Server Restore

Here’s the fully automated restore T-SQL stored proc. Accepts three(3) parameters. Target Database Source Database Fully Qualified backup file name location (\\yourserver\yourshare\backupfile.bak or simply c:\backup.bak) CREATE PROC [dbo].[restoreDB] @p_strDBNameTo SYSNAME, @p_strDBNameFrom SYSNAME, @p_strFQNRestoreFileName VARCHAR(255) AS DECLARE @v_strDBFilename VARCHAR(100), @v_strDBLogFilename VARCHAR(100), @v_strDBDataFile VARCHAR(100), @v_strDBLogFile VARCHAR(100), @v_strExecSQL NVARCHAR(1000), @v_strExecSQL1 NVARCHAR(1000), @v_strMoveSQL NVARCHAR(4000), @v_strREPLACE NVARCHAR(50), @v_strTEMP NVARCHAR(1000), @v_strListSQL … Read more

How to restore PostgreSQL dump file into Postgres databases?

You didn’t mention how your backup was made, so the generic answer is: Usually with the psql tool. Depending on what pg_dump was instructed to dump, the SQL file can have different sets of SQL commands. For example, if you instruct pg_dump to dump a database using –clean and –schema-only, you can’t expect to be … Read more

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

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 Attach Databases dialog box Click the “Add” button to open and Locate Database Files From C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\folder … Read more

How to import a bak file into SQL Server Express

There is a step by step explanation (with pictures) available @ Restore DataBase Click Start, select All Programs, click Microsoft SQL Server 2008 and select SQL Server Management Studio. This will bring up the Connect to Server dialog box. Ensure that the Server name YourServerName and that Authentication is set to Windows Authentication. Click Connect. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)