SQL copy a database

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



SQL copy a database



I have 2 servers A and B.



I have a database in Server A and i want to copy to Server B.



Including schema and all database attributes.



I have tried Coping the using the copy wizard, it wouldnt work.



I also tried using import data, wish imports the data in the table but without the attributes.



If there is anyone that could help me of the best possible way to do this i would greatly appreciate it.



Thank you





Ever heard of a backup? backup, restore on second server. Done. This is EXTREMELY fundamental - everoyne having a server should first learn how to make a backup. Otherwise you WILL at one point be asked to work in another field because you just lost a lot of stuff because - backups are critical. And also useful for transporting data.
– TomTom
Aug 6 at 15:56






You have tagged two completely different databases here. mysql and sql-server are not the same thing. Please edit the tags so we can know how to help.
– JNevill
Aug 6 at 15:56



mysql


sql-server




1 Answer
1



use the import export utility in sql server you can find ere all the details : https://docs.microsoft.com/en-us/sql/integration-services/import-export-data/start-the-sql-server-import-and-export-wizard?view=sql-server-2017



you will export your database then you will import it under another database



or use the backup method : https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server?view=sql-server-2017





This is a terrible way to do what they are asking, and it isn't complete. This would miss all kind of objects like stored procedures, functions, triggers, keys, etc....a backup and restore is not only faster it is far more complete.
– Sean Lange
Aug 6 at 15:59





thats why i did put both methods the first is only used for data the second one is a full database exp
– DevTest28
Aug 6 at 16:00





I didn't even see that link. But they clearly want more than just data. Most of your response is about copying data which isn't good enough for what they want. Your answer would be a lot better if you only discuss the backup and restore process. Just my 2¢
– Sean Lange
Aug 6 at 16:02






When using the backup method, be sure to make it as a "copy-only" backup, to avoid messing with incremental and log chains.
– Alejandro
Aug 6 at 16:03






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard