Skip to content

.bak file DataProvider task [Chris] #1421

@tznind

Description

@tznind

User Story
I want to load a .bak data file with RDMP dle

Is your feature request related to a problem? Please describe.

  1. File copy
  2. Run attach task SQL

Generating .bak file for testing
For testing to generate a .bak file use something like:

BACKUP DATABASE RDMP_Catalogue
TO DISK = 'd:\temp\RDMP_Catalogue.bak'

Restoring
First user must know the name of the database(s) and log files contained in the .bak archive. Archive can have multiple databases.

RESTORE FILELISTONLY FROM DISK = 'd:\temp\RDMP_Catalogue.bak'

This will output something like:

┌──────────────────┬─────────────────────────────────────┬────┬─────────────┬────────┬──────────────┬──────────────┐
│LogicalName       │PhysicalName                         │Type│FileGroupName│Size    │MaxSize       │FileId        │
├──────────────────┼─────────────────────────────────────┼────┼─────────────┼────────┼──────────────┼──────────────►
│RDMP_Catalogue    │C:\Users\44777\RDMP_Catalogue.mdf    │D   │PRIMARY      │75497472│35184372080640│1             │
│RDMP_Catalogue_log│C:\Users\44777\RDMP_Catalogue_log.ldf│L   │-            │75497472│2199023255552 │2             │

Then to actually restore it run:

RESTORE DATABASE RDMP_Catalogue2

 FROM DISK = 'd:\temp\RDMP_Catalogue.bak' 

 WITH MOVE 'RDMP_Catalogue' TO 'C:\Users\44777\RDMP_Catalogue2.mdf',

MOVE 'RDMP_Catalogue_log' TO 'C:\Users\44777\RDMP_Catalogue2_log.ldf' ,  NOUNLOAD,  REPLACE,  STATS = 5

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions