I would like to understand, what are the flaws following scenario:
Supposing I have a database "A" which is used to acquire data from somewhere (let's say CSV file), and then this data continues to some other database "B". All of these (CSV, A, B) are hosted on the same machine, with one drive to be utilized. My drive, theoretically, only has 10GB of space.
Let's assume the CSV has 5GB and the same data uses 5GB in the database "A" (I am not using compression). This means when CSV is on the drive and "A" is loaded, whole 10GB drive is full. When I want to transfer the data from "A" to "B", I will delete CSV, so that 5GB is empty and then I will fill "B", so that again, whole drive is full.
Supposing I have a new CSV file and need to keep data in "B", I would like to reduce size of "A", but keep the whole "A's" structure, as well as rights, etc.. The obvious possibility is to use truncate and then shrink - but then again, I only need "A's" structure and empty tables. Shrink takes long to process, introduces fragmentation and indexes grow over time because of it.
Would it be possible to have an empty (no data, but already with tables, procedures, rights, etc..) backup version of "A" that I would use in a way that I would drop whole "A" and restore it from backup rather than doing truncate of all tables in "A" and shrinking it?
What are the flaws behind this thinking? Can the backup hold all the rights and connections that were associated with the original "A" database?