leop1212
asked on
SQL 2008 how to backup only store procedures wihtout data or log files
We have 200gb+ SQL 2008 DB with 300+ store procedures and 300+ tables.
what is the best way for me to create backup of this database without saving any transactional data?
Just backup up tables, store procedures and triggers so that I can quickly restore only DB Structure with store procedures without any data?
what is the best way for me to create backup of this database without saving any transactional data?
Just backup up tables, store procedures and triggers so that I can quickly restore only DB Structure with store procedures without any data?
ASKER
well,
I appreciate the comments but than doesn't answer my question.
I appreciate the comments but than doesn't answer my question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ray,
your answer make much more sense.
let us try to start from another end.
say I made a full backup of my DB and restored it to a test DB.
now I have test database with all structure and store procedure which I want to backup + data which I want to purge.
could you give me an example of the script which will delete and purge data from all tables and than pack the database?
your answer make much more sense.
let us try to start from another end.
say I made a full backup of my DB and restored it to a test DB.
now I have test database with all structure and store procedure which I want to backup + data which I want to purge.
could you give me an example of the script which will delete and purge data from all tables and than pack the database?
Are you sure you want to purge everything? For example, does the database contain data about any fields held in the system, or users perhaps?
ASKER
i want to delete data in all table expect system tables.
ASKER
the only cavity is that there are data constrains preventing deletion on many tables. is there a easy way to buy pass it?
There is no "easy" way to do this. You would have to:
Your best bet going forward is to source control your database and use that to recreate a shell if needed.
remove all foreign-key constraints
cycle through and truncate each table
recreate all foreign-key constraints
Your best bet going forward is to source control your database and use that to recreate a shell if needed.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Interesting question though and I hope someone has a better answr than me.