Can I retrieve data without .bak file - sql-server

Due to some reason I have lost .bak backup file of my project from a SQL Server database.
Can I restore database of the project with .MDF & .LDF files?

Related

how to take backup of existing database in sql server and save as a script in TFS

How to take a backup of existing Database in Sql server and Save it as script in local or TFS?
I have 3 DB's under Production server to take backup
The following Query generates BackUp .bak file of database.
BACKUP DATABASE 'DatabaseName'
TO DISK = 'D:\FileName.bak'

SQL Server "BAK" bloated file size

I created a backup file of my SQL Server 2012 (not Express edition) database on PC1. The file size of the resulting .BAK file was 531 MB.
Then I copied that .BAK file to PC2 that had SQL Server 2012 Express edition.
I restored the database from that .BAK file.
Then immediately created .BAK from that newly created DB on PC2.
Surprisingly, the new .BAK file's size was 3 GB.
Can someone please educate me why the newly created .BAK file is way too big?
Ozair

Is it possible to create a .bak file via SQL Server Management Studio on Azure cloud hosting?

I need to create a .bak backup file of my SQL Server database on Azure hosting, because that's the only method which my new hosting supports for restoring a database.
Is this even possible to do? In SQL Server Management Studio, there is no "Backup" option under "Tasks" when I right-click on my database. The SQL Server edition is Standard, not Express.
You can't create .bak files in Azure DB. You will need to perform below steps at a high level to get a .BAK file
Create a .bacpac file for database in Azure
Import that .bacpac file to Local SQL Server and restore it
Now you can create a .Bak file on local SQL Server

How to move database and attach it to SQL Server 2008

I am not able to attach a database to a SQL Server 2008 on different machine. I moved the .mdf and .ldf files after detaching the database from one computer to another. When I try to attach the database on new machine the database does not show up on the file location.
If I browse manually I can see the files (.mdf and .ldf). There are no hidden files under the MSSQL > DATA folder which contains all the other database files.
Also is there a way to backup the database, move it to new machine and add under SQL Server? If yes then how can I do so? Please advise.
If you see the MDF and LDF files via file explorer, but not in SQL Server Management Studio, your SQL Server Management Studio login might have insufficient permissions
If the SQL Server version is the same for both original and destination instance, there should be no problems to attach the MDF and LDF files
Right-click the Databases node in Object Explorer
Select Attach...
3.Click Add
4.Navigate to the folder the MDF and LDF files are stored. make sure the SSMS login has enough privileges for the files/folders
5.Select the MDF file and click OK
The patch for the LDF file will be automatically added if it's in the same folder. If not, add it manually, the same way you added the MDF file
To backup and restore the backup into a new database, see these articles:
Create a Full Database Backup (SQL Server)
Restore a Database Backup (SQL Server Management Studio)

Convert .sdf to .bak

I'm trying to publish a webproject MVC3 .NET with binero.se. The problem is that my database file is .sdf. And binero wants a .bak file.
Does anyone know how to solve this problem?
.sdf is the file format for SQL Server Compact Edition and that's quite a different beast from "real" SQL Server. .bak is the database backup format for a full-blown SQL Server.
The way to get from .sdf to .bak would be:
create a temporary database in a "full" SQL Server (Express, Standard, Enterprise) with the name of the .sdf file
using a tool like SQL Server Compacst data and schema scripting, export your table structure and data from the SQL Server CE file into "full" SQL Server
once you've created all tables and other DB objects and inserted all your data into the "full" SQL Server database, create a backup of that database to get your .bak file

Resources