{"id":18065,"date":"2022-11-10T10:06:39","date_gmt":"2022-11-10T03:06:39","guid":{"rendered":"https:\/\/www.hostify.vn\/blog\/?p=18065"},"modified":"2022-11-10T10:06:39","modified_gmt":"2022-11-10T03:06:39","slug":"database-migration-sql-server","status":"publish","type":"post","link":"https:\/\/www.hostify.vn\/blog\/database-migration-sql-server\/","title":{"rendered":"H\u01b0\u1edbng D\u1eabn Database Migration T\u1eeb Phi\u00ean B\u1ea3n SQL Server Cao Xu\u1ed1ng Phi\u00ean B\u1ea3n Th\u1ea5p H\u01a1n"},"content":{"rendered":"<div id=\"urvanov-syntax-highlighter-636378e1e353f875717491-5\" class=\"crayon-line\">\n<p>T\u00ecnh hu\u1ed1ng gi\u1ea3 \u0111\u1ecbnh: m\u1ed9t ng\u01b0\u1eddi d\u00f9ng c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server n\u00e2ng c\u1ea5p SQL Server t\u1eeb phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n l\u00ean phi\u00ean b\u1ea3n cao h\u01a1n, r\u1ed3i nh\u1eadn ra r\u1eb1ng \u1ee9ng d\u1ee5ng c\u1ee7a h\u1ecd kh\u00f4ng ho\u1ea1t \u0111\u1ed9ng nh\u01b0 mong mu\u1ed1n sau khi n\u00e2ng c\u1ea5p. Do \u0111\u00f3, h\u1ecd mu\u1ed1n \u201cs\u1eeda sai\u201d b\u1eb1ng c\u00e1ch Database Migration c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server xu\u1ed1ng phi\u00ean b\u1ea3n tr\u01b0\u1edbc \u0111\u00f3. Tuy nhi\u00ean, h\u1ecd l\u1ea1i kh\u00f4ng th\u1ec3 g\u1eafn c\u01a1 s\u1edf d\u1eef li\u1ec7u ho\u1eb7c kh\u00f4i ph\u1ee5c b\u1ea3n sao l\u01b0u c\u01a1 s\u1edf d\u1eef li\u1ec7u k\u1ec3 c\u1ea3 khi \u0111\u00e3 thi\u1ebft l\u1eadp m\u1ee9c t\u01b0\u01a1ng th\u00edch xu\u1ed1ng phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n.<\/p>\n<p><div id=\"attachment_18845\" style=\"width: 1290px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-18845\" src=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/migrate-database-1.png\" alt=\"H\u01b0\u1edbng D\u1eabn Database Migration T\u1eeb Phi\u00ean B\u1ea3n SQL Server Cao Xu\u1ed1ng Phi\u00ean B\u1ea3n Th\u1ea5p H\u01a1n\" width=\"1280\" height=\"720\" class=\"size-full wp-image-18845\" srcset=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/migrate-database-1.png 1280w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/migrate-database-1-300x169.png 300w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/migrate-database-1-1024x576.png 1024w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/migrate-database-1-768x432.png 768w\" sizes=\"auto, (max-width: 1280px) 100vw, 1280px\" \/><p id=\"caption-attachment-18845\" class=\"wp-caption-text\">H\u01b0\u1edbng D\u1eabn Database Migration T\u1eeb Phi\u00ean B\u1ea3n SQL Server Cao Xu\u1ed1ng Phi\u00ean B\u1ea3n Th\u1ea5p H\u01a1n<\/p><\/div>\n<\/div>\n<div id=\"urvanov-syntax-highlighter-636378e1e353f875717491-5\" class=\"crayon-line\">\n<h2><strong>L\u1ed7i trong qu\u00e1 tr\u00ecnh kh\u00f4i ph\u1ee5c c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server<\/strong><\/h2>\n<p>L\u1ed7i d\u01b0\u1edbi \u0111\u00e2y s\u1ebd xu\u1ea5t hi\u1ec7n khi ng\u01b0\u1eddi d\u00f9ng c\u1ed1 kh\u00f4i ph\u1ee5c ho\u1eb7c g\u1eafn c\u01a1 s\u1edf d\u1eef li\u1ec7u. N\u00f3 x\u1ea3y ra b\u1edfi SQL Server \u0111\u00e3 \u0111\u01b0\u1ee3c t\u1ef1 \u0111\u1ed9ng n\u00e2ng c\u1ea5p l\u00ean phi\u00ean b\u1ea3n cao h\u01a1n v\u00e0 kh\u00f4ng cho ph\u00e9p ng\u01b0\u1eddi d\u00f9ng kh\u00f4i ph\u1ee5c c\u01a1 s\u1edf d\u1eef li\u1ec7u t\u1eeb phi\u00ean b\u1ea3n cao h\u01a1n xu\u1ed1ng phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"135\" src=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-2.png\" class=\"wp-image-18837 aligncenter\" srcset=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-2.png 593w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-2-300x68.png 300w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/p>\n<h2><strong>Database Migration SQL Server b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng ph\u1ea7n m\u1ec1m SysTools<\/strong><\/h2>\n<p>X\u1eed l\u00fd SQL l\u00e0 m\u1ed9t vi\u1ec7c kh\u00e1 kh\u00f3 nh\u1eb1n b\u1edfi n\u00f3 bao g\u1ed3m nhi\u1ec1u th\u1ee7 t\u1ee5c ph\u1ee9c t\u1ea1p. Ngo\u00e0i ra, kh\u00f4ng ai mu\u1ed1n l\u00e0m h\u1ecfng d\u1eef li\u1ec7u hi\u1ec7n c\u00f3 c\u1ea3. Do \u0111\u00f3, b\u1ea1n c\u1ea7n m\u1ed9t ph\u1ea7n m\u1ec1m chuy\u00ean nghi\u1ec7p gi\u00fap bi\u1ebfn nh\u1eefng t\u00e1c v\u1ee5 n\u1eb7ng nh\u1ecdc v\u00e0 \u0111\u00e1ng lo ng\u1ea1i tr\u1edf n\u00ean d\u1ec5 d\u00e0ng h\u01a1n.<\/p>\n<p>SysTools SQL Server Migrator l\u00e0 ph\u1ea7n m\u1ec1m c\u00f3 kh\u1ea3 n\u0103ng chuy\u1ec3n ho\u1eb7c sao ch\u00e9p c\u00e1c b\u1ea3ng d\u1eef li\u1ec7u SQL v\u1edbi scheme, functions, views, stored procedures, triggers\u2026 Ch\u01b0a h\u1ebft, n\u1ebfu c\u00f3 b\u1ea5t k\u1ef3 d\u1eef li\u1ec7u n\u00e0o b\u1ecb x\u00f3a trong qu\u00e1 tr\u00ecnh di chuy\u1ec3n, ph\u1ea7n m\u1ec1m n\u00e0y c\u00f3 th\u1ec3 gi\u00fap b\u1ea1n kh\u00f4i ph\u1ee5c l\u1ea1i d\u1ec5 d\u00e0ng.<\/p>\n<p>H\u00e3y l\u00e0m theo c\u00e1c b\u01b0\u1edbc d\u01b0\u1edbi \u0111\u00e2y \u0111\u1ec3 chuy\u1ec3n c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server xu\u1ed1ng phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n:<\/p>\n<h3><strong>Kh\u1edfi \u0111\u1ed9ng ph\u1ea7n m\u1ec1m v\u00e0 b\u1ea5m v\u00e0o n\u00fat Open<\/strong><\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"447\" src=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-3.png\" class=\"wp-image-18838 aligncenter\" srcset=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-3.png 800w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-3-300x168.png 300w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-3-768x429.png 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/strong><\/p>\n<h3><strong>Ch\u1ecdn Online ho\u1eb7c Offline Mode<\/strong><\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"1689\" height=\"944\" src=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-4.png\" class=\"wp-image-18839 aligncenter\" srcset=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-4.png 1689w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-4-300x168.png 300w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-4-1024x572.png 1024w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-4-768x429.png 768w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-4-1536x858.png 1536w\" sizes=\"auto, (max-width: 1689px) 100vw, 1689px\" \/><\/strong><\/p>\n<h3><strong>Xem tr\u01b0\u1edbc Database Objects tr\u01b0\u1edbc khi sang b\u01b0\u1edbc ti\u1ebfp theo<\/strong><\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"1689\" height=\"944\" src=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-5.png\" class=\"wp-image-18840 aligncenter\" srcset=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-5.png 1689w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-5-300x168.png 300w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-5-1024x572.png 1024w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-5-768x429.png 768w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-5-1536x858.png 1536w\" sizes=\"auto, (max-width: 1689px) 100vw, 1689px\" \/><\/strong><\/p>\n<h3><strong>Tinh ch\u1ec9nh c\u00e1c t\u00f9y ch\u1ecdn xu\u1ea5t c\u01a1 s\u1edf d\u1eef li\u1ec7u theo \u00fd mu\u1ed1n<\/strong><\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"1027\" height=\"878\" src=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-6.png\" class=\"wp-image-18841 aligncenter\" srcset=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-6.png 1027w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-6-300x256.png 300w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-6-1024x875.png 1024w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-6-768x657.png 768w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/strong><\/p>\n<h3><strong>B\u1ea5m v\u00e0o n\u00fat Export v\u00e0 ho\u00e0n t\u1ea5t t\u00e1c v\u1ee5 chuy\u1ec3n c\u01a1 s\u1edf d\u1eef li\u1ec7u<\/strong><\/h3>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"1027\" height=\"878\" src=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-7.png\" class=\"wp-image-18842 aligncenter\" srcset=\"https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-7.png 1027w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-7-300x256.png 300w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-7-1024x875.png 1024w, https:\/\/www.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/word-image-18065-7-768x657.png 768w\" sizes=\"auto, (max-width: 1027px) 100vw, 1027px\" \/><\/strong><\/p>\n<h2><strong>C\u00e1ch 2: S\u1eed d\u1ee5ng tr\u00ecnh t\u1ea1o m\u00e3 c\u1ee7a SQL Server Management Studio tr\u00ean phi\u00ean b\u1ea3n cao h\u01a1n<\/strong><\/h2>\n<p>L\u1ed7i x\u1ea3y ra khi c\u00e1c t\u1eadp tin sao l\u01b0u c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server kh\u00f4ng t\u01b0\u01a1ng th\u00edch ng\u01b0\u1ee3c s\u1ebd khi\u1ebfn b\u1ea1n kh\u00f4ng th\u1ec3 kh\u00f4i ph\u1ee5c c\u01a1 s\u1edf d\u1eef li\u1ec7u \u0111\u00e3 t\u1ea1o t\u1eeb phi\u00ean b\u1ea3n SQL Server cao h\u01a1n xu\u1ed1ng th\u1ea5p h\u01a1n. D\u01b0\u1edbi \u0111\u00e2y l\u00e0 m\u1ed9t c\u00e1ch kh\u00e1c \u0111\u1ec3 chuy\u1ec3n c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server t\u1eeb phi\u00ean b\u1ea3n cao h\u01a1n xu\u1ed1ng phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n<\/p>\n<p>Trong b\u01b0\u1edbc n\u00e0y, ch\u00fang ta c\u1ea7n t\u1ea1o schema c\u1ee7a c\u01a1 s\u1edf d\u1eef li\u1ec7u mong mu\u1ed1n, v\u00ed d\u1ee5 l\u00e0 tr\u00ean SQL Server 2012, \u0111\u1ec3 chuy\u1ec3n n\u00f3 xu\u1ed1ng SQL Server 2008 R2 b\u1eb1ng tr\u00ecnh t\u1ea1o m\u00e3 Generate Scripts c\u1ee7a SQL Server Management Studio.<\/p>\n<ul>\n<li>Kh\u1edfi ch\u1ea1y <strong>Microsoft SQL Server Management Studio (SSMS) <\/strong>v\u00e0 v\u00e0o <strong>Object Explorer.<\/strong><\/li>\n<li>Ch\u1ecdn c\u01a1 s\u1edf d\u1eef li\u1ec7u mong mu\u1ed1n v\u00e0 b\u1ea5m chu\u1ed9t ph\u1ea3i v\u00e0o n\u00f3.<\/li>\n<li>B\u1ea5m <strong>Tasks <\/strong>v\u00e0 ch\u1ecdn <strong>Generate Scripts<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap\" \/><\/p>\n<ul>\n<li>Tr\u00ecnh <strong>Generate and Publish Scripts <\/strong>s\u1ebd hi\u1ec7n ra<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap-2.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap 2\" \/><\/p>\n<ul>\n<li>B\u1ea5m <strong>Next <\/strong>v\u00e0 b\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c \u0111\u01b0a \u0111\u1ebfn trang <strong>Choose Objects<\/strong><\/li>\n<li>Tr\u00ean trang n\u00e0y, ch\u1ecdn <strong>Script entire database and all database objects <\/strong>v\u00e0 b\u1ea5m <strong>Next <\/strong>\u0111\u1ec3 sang tab ti\u1ebfp theo, <strong>Set Scripting Options<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap-3.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap 3\" \/><\/p>\n<ul>\n<li>X\u00e1c \u0111\u1ecbnh v\u1ecb tr\u00ed \u0111\u1ec3 l\u01b0u t\u1eadp tin m\u00e3 trong tab <strong>Set Scripting Options<\/strong><\/li>\n<li>B\u1ea5m n\u00fat <strong>Advanced <\/strong>\u0111\u1ec3 tinh ch\u1ec9nh c\u00e1c t\u00f9y ch\u1ecdn t\u1ea1o m\u00e3 c\u1ee5 th\u1ec3<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap-4.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap 4\" \/><\/p>\n<p>T\u1ea1i \u0111\u00e2y, ch\u00fang ta s\u1ebd thay \u0111\u1ed5i m\u1ed9t s\u1ed1 t\u00f9y ch\u1ecdn:<\/p>\n<ul>\n<li>Script for Server Version<strong> \u2192 SQL Server 2008 R2<\/strong><\/li>\n<li>Types of data to script<strong> \u2192 Schema and Data<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap-5.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap 5\" \/><\/p>\n<ul>\n<li>Thi\u1ebft l\u1eadp primary key, triggers v\u00e0 indexes cho script<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap-6.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap 6\" \/><\/p>\n<ul>\n<li>B\u1ea5m <strong>OK <\/strong>sau khi thay \u0111\u1ed5i trong <strong>Advanced Scripting Options <\/strong>v\u00e0 quay l\u1ea1i trang <strong>Set Scripting Options. <\/strong>B\u1ea5m <strong>Next <\/strong>\u0111\u1ec3 sang tab <strong>Summary<\/strong><\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap-7.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap 7\" \/><\/p>\n<ul>\n<li>B\u1ea5m <strong>Next <\/strong>tr\u00ean trang Summary sau khi \u0111\u00e3 ki\u1ec3m tra l\u1ea1i c\u00e1c thay \u0111\u1ed5i.<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap-8.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap 8\" \/><\/p>\n<ul>\n<li>Cu\u1ed1i c\u00f9ng, b\u1ea5m n\u00fat <strong>Finnish <\/strong>\u0111\u1ec3 \u0111\u00f3ng tr\u00ecnh Generate and Publish Scripts. \u0110\u00e2y l\u00e0 b\u01b0\u1edbc r\u1ea5t quan tr\u1ecdng sau khi ho\u00e0n th\u00e0nh qu\u00e1 tr\u00ecnh t\u1ea1o m\u00e3.<\/li>\n<\/ul>\n<p style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/cloud-cdn.hostify.vn\/blog\/wp-content\/uploads\/2022\/11\/Huong-dan-back-up-database-tu-phien-ban-sql-server-cao-xuong-phien-ban-thap-9.jpg\" alt=\"Huong dan back up database tu phien ban sql server cao xuong phien ban thap 9\" \/><\/p>\n<h2><strong>C\u00e1ch 3: K\u1ebft n\u1ed1i \u0111\u1ebfn phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n, ch\u1ea1y m\u00e3 SQL \u0111\u1ec3 t\u1ea1o schema c\u01a1 s\u1edf d\u1eef li\u1ec7u v\u00e0 sao ch\u00e9p d\u1eef li\u1ec7u<\/strong><\/h2>\n<p>Trong ph\u1ea7n th\u1ee9 hai c\u1ee7a Migrate Database, ch\u00fang ta s\u1ebd k\u1ebft n\u1ed1i \u0111\u1ebfn phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n, SQL Server 2008 R2, v\u00e0 ch\u1ea1y m\u00e3 \u0111\u00e3 t\u1ea1o ra \u1edf ph\u1ea7n \u0111\u1ea7u ti\u00ean \u0111\u1ec3 c\u00f3 \u0111\u01b0\u1ee3c schema c\u01a1 s\u1edf d\u1eef li\u1ec7u v\u00e0 sao ch\u00e9p to\u00e0n b\u1ed9 d\u1eef li\u1ec7u b\u00ean trong.<\/p>\n<ul>\n<li>V\u00e0o <strong>Object Explorer <\/strong>v\u00e0 k\u1ebft n\u1ed1i \u0111\u1ebfn <strong>SQL Server 2008<\/strong><\/li>\n<li>M\u1edf m\u00e3 \u0111\u00e3 t\u1ea1o b\u1eb1ng c\u00e1ch v\u00e0o <strong>File <\/strong>trong SQL Server Management Studio \u2192 <strong>Open <\/strong>\u2192 <strong>File<\/strong><\/li>\n<li><strong>Ch\u1ecdn t\u1eadp tin script <\/strong>\u0111\u00e3 t\u1ea1o v\u00e0 b\u1ea5m <strong>Open <\/strong>\u0111\u1ec3 d\u00f9ng n\u00f3 trong SSMS<\/li>\n<li><strong>Ch\u1ec9nh s\u1eeda script <\/strong>\u0111\u1ec3 ch\u00e8n v\u00e0o v\u1ecb tr\u00ed c\u00e1c t\u1eadp tin d\u1eef li\u1ec7u v\u00e0 log c\u1ee7a c\u01a1 s\u1edf d\u1eef li\u1ec7u<\/li>\n<li><strong>Th\u1ef1c thi <\/strong>m\u00e3 \u0111\u1ec3 t\u1ea1o c\u01a1 s\u1edf d\u1eef li\u1ec7u trong SQL Server 2008<\/li>\n<li>Sau khi script \u0111\u00e3 ch\u1ea1y th\u00e0nh c\u00f4ng, l\u00e0m m\u1edbi th\u01b0 m\u1ee5c c\u01a1 s\u1edf d\u1eef li\u1ec7u trong Object Explorer c\u1ee7a SSMS.<\/li>\n<li>B\u1ea5m v\u00e0o c\u01a1 s\u1edf d\u1eef li\u1ec7u \u0111\u1ec3 ki\u1ec3m tra xem m\u1ecdi d\u1eef li\u1ec7u \u0111\u00e3 \u0111\u01b0\u1ee3c h\u1ea1 c\u1ea5p th\u00e0nh c\u00f4ng t\u1eeb SQL Server 2012 xu\u1ed1ng SQL Server 2008 R2 hay ch\u01b0a.<\/li>\n<\/ul>\n<h2><strong>K\u1ebft lu\u1eadn<\/strong><\/h2>\n<p>Nh\u01b0 v\u1eady, ch\u00fang ta \u0111\u00e3 th\u1ea3o lu\u1eadn v\u1ec1 l\u1ed7i khi ng\u01b0\u1eddi d\u00f9ng c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server n\u00e2ng c\u1ea5p t\u1eeb phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n l\u00ean cao h\u01a1n. Ngo\u00e0i ra, b\u1ea1n c\u0169ng \u0111\u01b0\u1ee3c bi\u1ebft t\u00ecnh hu\u1ed1ng m\u00e0 \u1ee9ng d\u1ee5ng ho\u1ea1t \u0111\u1ed9ng kh\u00f4ng nh\u01b0 \u00fd mu\u1ed1n. Trong nh\u1eefng tr\u01b0\u1eddng h\u1ee3p \u0111\u00f3, ch\u00fang ta c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng script t\u1ea1o ra t\u1eeb Generate Scripts Wizard \u1edf phi\u00ean b\u1ea3n cao h\u01a1n v\u00e0 th\u1ef1c thi ch\u00fang \u1edf phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n. C\u00e1c b\u01b0\u1edbc \u0111\u00e3 n\u00eau ch\u00ednh l\u00e0 to\u00e0n b\u1ed9 quy tr\u00ecnh chuy\u1ec3n c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server xu\u1ed1ng phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n.<\/p>\n<p>Ng\u01b0\u1eddi d\u00f9ng n\u00ean sao l\u01b0u c\u01a1 s\u1edf d\u1eef li\u1ec7u tr\u01b0\u1edbc khi n\u00e2ng c\u1ea5p phi\u00ean b\u1ea3n SQL Server c\u1ee7a h\u1ecd. B\u1edfi quy tr\u00ecnh chuy\u1ec3n c\u01a1 s\u1edf d\u1eef li\u1ec7u t\u1ed1n r\u1ea5t nhi\u1ec1u th\u1eddi gian v\u00e0 dung l\u01b0\u1ee3ng, h\u1ea1 c\u1ea5p c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server c\u1ea7n \u0111\u1ebfn ph\u1ea7n m\u1ec1m chuy\u00ean nghi\u1ec7p \u0111\u1ec3 h\u1ed7 tr\u1ee3 chuy\u1ec3n SQL Server t\u1eeb phi\u00ean b\u1ea3n cao h\u01a1n xu\u1ed1ng th\u1ea5p h\u01a1n.<\/p>\n<\/div>\n<h2>C\u00e1c t\u00ecm ki\u1ebfm li\u00ean quan \u0111\u1ebfn ch\u1ee7 \u0111\u1ec1 \u201cDatabase migration\u201d<\/h2>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 50%;\">What is database migration<\/td>\n<td style=\"width: 50%;\">Migration database C#<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">Update-database migration<\/td>\n<td style=\"width: 50%;\">Create database migration Entity Framework<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">Database migration Laravel<\/td>\n<td style=\"width: 50%;\">Schema migration<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 50%;\">Data migration tool<\/td>\n<td style=\"width: 50%;\">Data migration strategy<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>B\u00e0i vi\u1ebft li\u00ean quan<\/h3>\n<p><a href=\"https:\/\/www.hostify.vn\/blog\/co-so-du-lieu-la-gi\/\">C\u01a1 s\u1edf d\u1eef li\u1ec7u l\u00e0 g\u00ec? Vai tr\u00f2 v\u00e0 t\u1ea7m quan tr\u1ecdng c\u1ee7a c\u01a1 s\u1edf d\u1eef li\u1ec7u?<\/a><\/p>\n<p><a href=\"https:\/\/www.hostify.vn\/blog\/cac-he-quan-tri-co-so-du-lieu\/\">Top 10 c\u00e1c h\u1ec7 qu\u1ea3n tr\u1ecb c\u01a1 s\u1edf d\u1eef li\u1ec7u ph\u1ed5 bi\u1ebfn nh\u1ea5t hi\u1ec7n nay<\/a><\/p>\n<p><a href=\"https:\/\/www.hostify.vn\/blog\/cai-dat-microsoft-sql-server-management-studio\/\">C\u00e1ch t\u1ea3i v\u00e0 c\u00e0i \u0111\u1eb7t Microsoft SQL Server Management Studio<\/a><\/p>\n<p><a href=\"https:\/\/www.hostify.vn\/blog\/mysql-la-gi-kien-thuc-cho-nguoi-moi-bat-dau\/\">MySQL l\u00e0 g\u00ec? Chi ti\u1ebft ki\u1ebfn th\u1ee9c MySQL cho ng\u01b0\u1eddi m\u1edbi b\u1eaft \u0111\u1ea7u 2022<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>T\u00ecnh hu\u1ed1ng gi\u1ea3 \u0111\u1ecbnh: m\u1ed9t ng\u01b0\u1eddi d\u00f9ng c\u01a1 s\u1edf d\u1eef li\u1ec7u SQL Server n\u00e2ng c\u1ea5p SQL Server t\u1eeb phi\u00ean b\u1ea3n th\u1ea5p h\u01a1n l\u00ean phi\u00ean b\u1ea3n cao h\u01a1n, r\u1ed3i nh\u1eadn ra r\u1eb1ng \u1ee9ng d\u1ee5ng c\u1ee7a h\u1ecd kh\u00f4ng ho\u1ea1t \u0111\u1ed9ng nh\u01b0 mong mu\u1ed1n sau khi n\u00e2ng c\u1ea5p. Do \u0111\u00f3, h\u1ecd mu\u1ed1n \u201cs\u1eeda sai\u201d b\u1eb1ng c\u00e1ch Database Migration&#8230;<\/p>\n","protected":false},"author":1,"featured_media":18845,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37,156],"tags":[],"class_list":["post-18065","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-backup","category-hostingserver"],"_links":{"self":[{"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/posts\/18065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/comments?post=18065"}],"version-history":[{"count":0,"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/posts\/18065\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/media\/18845"}],"wp:attachment":[{"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/media?parent=18065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/categories?post=18065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostify.vn\/blog\/wp-json\/wp\/v2\/tags?post=18065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}