3
Using Sql Server 2012. I made a query with the title above and did not bring anything in the search. I have a BD and need to take it elsewhere. Therefore, the best way is to generate a script of all the existing objects in it and as I have populated tables, I also need to generate a script of insert
. How do I do it, the script of insert
?
I recommend using a migration tool that will do quickly and without error. I’ve used this for Mysql, but it has an option for SQL Server as well. https://www.toadworld.com/products/toad-for-sql-server
– MathOliveira
You need your backup to be one script with instructions from
insert into
? Or it could be a normal backup file?– Gabriel
So I have a client that I was with and I needed data from his comic book so I could test an app that I developed. The guy in a few minutes, using Sql Management generated the DDL and DML scripts. Fast and could not keep track to see how it does. I tried to talk to him now and he is not in the unit, he is traveling and visiting the branches (south of São Paulo). I know it is, but I don’t know how. I’m searching the net, but so far I haven’t found it. I’ll go to Soen and see if I can find it there.
– pnet
Check it out: https://stackoverflow.com/questions/4526461/converting-select-results-into-insert-script
– MathOliveira
Take a look at this question as well: https://answall.com/questions/232312/asposso-insert m%C3%Baltiplos-lines-once-s%C3%B3-using-sql/232320#232320
– Alexandre Cavaloti
You can do this inside Management Studio, the problem is that it gets very slow when the database has a lot of data, the ideal is to generate a normal backup file, is faster and has no error.
– Gabriel
It’s my bank. It only has 10 tables and only 3 are populated. I’m starting now to develop and need to migrate. I might start all over again, but I’d like to learn how to do that.
– pnet
If you want to create only Inserts for an existing table, just use Data Only, and you don’t need to use Schema and Data. So the script gets cleaner. I use to migrate homologation data to production.
– ASPaiva