July 26, 2012 at 5:30 am
Hi All,
I created a new database in test server.i moved all tables data from production to UAT by using import/export wizard.The task was completed successfully but the indexes was not created in new database .
So i want to move all the indexes prod database to test database .
any one please let me know how can i achieve this ..........
Thanks
Lavanya
July 26, 2012 at 5:43 am
you can script the indexes on one server(db) and run the script inside the other.
July 26, 2012 at 7:36 am
Lavanyasri (7/26/2012)
Hi All,I created a new database in test server.i moved all tables data from production to UAT by using import/export wizard.
Thanks
Lavanya
is there any reason why you have used import/export instead of DB scripting or DB restore.
Regards
Durai Nagarajan
July 26, 2012 at 8:42 am
Thanks Hadrian .
Could you please provide the script plz
July 26, 2012 at 8:57 am
we don't have enough disk space to take the backup in prod. Every day backup is taking by using third aprty tool . So by using this backup file its not possible to restore in Test server .
So i preferred this option
July 26, 2012 at 9:08 am
Lavanyasri (7/26/2012)
we don't have enough disk space to take the backup in prod. Every day backup is taking by using third aprty tool . So by using this backup file its not possible to restore in Test server .So i preferred this option
In that case, I would prefer to generate complete DB script (DDLs only).
Then, run CREATE TABLE first, export data, run rest of the DDL script(PK,FK,Other objects like SPs,fns,Trgs,....)
--
well still you can generate DB script and then execute everything else without CREATE TABLE script
To generate script: right click DB in SSMS -> Tasks-> Generate Scripts...
July 26, 2012 at 9:26 am
I tried the below scenario but its not creating indexes.
generate script: right click DB in SSMS -> Tasks-> Generate Scripts...
July 26, 2012 at 9:35 am
Lavanyasri (7/26/2012)
I tried the below scenario but its not creating indexes.generate script: right click DB in SSMS -> Tasks-> Generate Scripts...
Did you make sure "Script Indexes" = true, in script wizard?
July 27, 2012 at 3:21 am
Thanks ,
I already created tables in test environment ?Now can i created only indexes in that database ??
July 30, 2012 at 1:40 am
yes create the table script with "Include if not exists" as yes then table wont be created but index will be created.
Regards
Durai Nagarajan
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply