Sql database modification
-
Hello all, I made a database on the deployment server and i made some changes in the development server on the database struction releation data types etc... the database on the deployment server filled with data. how can i apply the changes from the develpement server on the deployment server without wast the data. Regards, Hay
-
Hello all, I made a database on the deployment server and i made some changes in the development server on the database struction releation data types etc... the database on the deployment server filled with data. how can i apply the changes from the develpement server on the deployment server without wast the data. Regards, Hay
Create deployment scripts. Take a copy of the production database (what you are calling the deployment server). Back up the production database and restore it to a test environment. e.g. a second SQL server instance on your development machine. Write scripts that change the data model and run it on the copy. You may have to do this several times to get the scripts right so they don't fail. Once you have written and debugged the change scripts you can run them on the production system. As a general note, you should think about how to deploy changes to a database before making the changes. The first thing I do is to create the change scripts and repeatedly test them as development progresses so that I don't have any nasty surprises at the end. Also, because the restore process can be lengthy it means that will your test environment is restoring in the background you can do other development. Does this help?
My: Blog | Photos WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
-
Create deployment scripts. Take a copy of the production database (what you are calling the deployment server). Back up the production database and restore it to a test environment. e.g. a second SQL server instance on your development machine. Write scripts that change the data model and run it on the copy. You may have to do this several times to get the scripts right so they don't fail. Once you have written and debugged the change scripts you can run them on the production system. As a general note, you should think about how to deploy changes to a database before making the changes. The first thing I do is to create the change scripts and repeatedly test them as development progresses so that I don't have any nasty surprises at the end. Also, because the restore process can be lengthy it means that will your test environment is restoring in the background you can do other development. Does this help?
My: Blog | Photos WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
-
Thanks so much , yes it is very helpful but i did the changes in the database how can i make script from the changes only. Regards Hay
When you make changes in "the database" (by that I'm assuming you actually mean you used the Enterprise Manager") all that is happening is that the application is creating SQL scripts and running them. All you need to do is to write scripts based on that. Enterprise manager can help by creating scripts for you. This will be a good starting point if you've created new tables, but you can take these scripts and modify them for just the changes.
My: Blog | Photos WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
-
When you make changes in "the database" (by that I'm assuming you actually mean you used the Enterprise Manager") all that is happening is that the application is creating SQL scripts and running them. All you need to do is to write scripts based on that. Enterprise manager can help by creating scripts for you. This will be a good starting point if you've created new tables, but you can take these scripts and modify them for just the changes.
My: Blog | Photos WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
Thanks Colin i aprictiat your replyes . I am useing Enterprise Manager but the script from the it for all database not for my chages only. and modifyed the hole script or take parties from it so hard if the database is large do you know any way we can do that. I thinking about make new database with the new chages and make a database maping to transfer the data from the old database to the new database.What do you think? Regares, Hay
-
Thanks Colin i aprictiat your replyes . I am useing Enterprise Manager but the script from the it for all database not for my chages only. and modifyed the hole script or take parties from it so hard if the database is large do you know any way we can do that. I thinking about make new database with the new chages and make a database maping to transfer the data from the old database to the new database.What do you think? Regares, Hay
In Enterprise manager, 1)Right click on the table you wish to alter. 2)Right click and choose Design Table. 3)As soon as you make a change, a "Save Change script" Icon on the toolbar becomes active. This will allow you to save your changes to a text file. hth Gregg