• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Generating fresh database from existing

Junior Spellweaver
Joined
Mar 27, 2018
Messages
110
Reaction score
14
I know lots of you know this, but let me share it :D

First go to your database,
Login then

Right click your Database, e.g. (RanGame1)
Choose task, under Task, Choose Generate Script
then Next until it finish generating script.
Then one of the step asking for the path of the output script.
Change it if you like to change the output path and name..

After Generating the script go to the path where you put the output file.
Open it, then delete the existing database(in this Example delete RanGame1)(do it on your on risk), after deleting execute the generated script..

then you have your fresh database.
 

Attachments

You must be registered for see attachments list
Chinese Developer
Banned
Joined
Apr 6, 2019
Messages
358
Reaction score
53
double check about procedures in db.
if i not wrong , generate scripts is exclude of procedures.
 
Junior Spellweaver
Joined
Mar 27, 2018
Messages
110
Reaction score
14
I think all procedures are checked in default
if not just check the "Script entire database and all database objects" in Choose Objects tab
 
Chinese Developer
Banned
Joined
Apr 6, 2019
Messages
358
Reaction score
53
I think all procedures are checked in default
if not just check the "Script entire database and all database objects" in Choose Objects tab

oops , i just tested and it can choose table views and procedure.
so this method is suitable for them who want to take the fresh db without truncate it by themself.

thanks for sharing.
learn something in here.
 
Junior Spellweaver
Joined
Mar 27, 2018
Messages
110
Reaction score
14
oops , i just tested and it can choose table views and procedure.
so this method is suitable for them who want to take the fresh db without truncate it by themself.

thanks for sharing.
learn something in here.

yes that's the purpose of that, but just to be safe check all the procedures.
to avoid conflict or bugs ingame :)
 
Chinese Developer
Banned
Joined
Apr 6, 2019
Messages
358
Reaction score
53
yes that's the purpose of that, but just to be safe check all the procedures.
to avoid conflict or bugs ingame :)

yes , i try this method before , but maybe is long time ago fuzzy memory about this.
thanks for pointing me.
 
Computers are fast; programmers keep it slow.
[VIP] Member
Joined
Feb 15, 2016
Messages
511
Reaction score
351
Instead of creating a new one, you can just use the current one.

Click

--Either way, good job TS for sharing. :dancemental:
 
Chinese Developer
Banned
Joined
Apr 6, 2019
Messages
358
Reaction score
53
have many method that can done it.

for me , i using query to list out the table name. and choose which table that i want to truncate.
because my rancp read my itemtable from db.

btw , for who needs can use too .

Code:
use [DBNAME] /* RanGame1/RanLog/RanShop/RanUser */

select 'Truncate Table ['+name+']' from sys.tables
 
Back
Top