{"id":2582,"date":"2012-01-23T10:44:51","date_gmt":"2012-01-23T18:44:51","guid":{"rendered":"http:\/\/www.technosolutions.com\/kb\/2582\/how-to-attach-a-database-in-sql-server\/"},"modified":"2018-05-24T05:20:43","modified_gmt":"2018-05-24T12:20:43","slug":"how-to-attach-a-database-in-sql-server","status":"publish","type":"post","link":"http:\/\/www.technosolutions.com\/kb\/2582\/how-to-attach-a-database-in-sql-server\/","title":{"rendered":"How to attach a database in SQL Server"},"content":{"rendered":"<p><!-- Start ScreenSteps Content --><\/p>\n<div class=\"LessonContent\">\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\" style=\"font-size:20px;\">Overview<\/h3>\n<div class=\"StepInstructions\">\n<p>Migration of <i>TopTeam Application Server<\/i> from one one computer to another computer is possible. When <i>TopTeam SQL Application Server<\/i> is moved from one computer to another along with its database attached to a <i>SQL Server<\/i>, <i>TopTeam Application Database<\/i> needs to be detached. After detaching <i>TopTeam Application Server Database<\/i>, it should again be attached to <i>Microsoft SQL Server<\/i>.<br \/>\nThis activity gives you flexibility and mobility to move from one machine to another.<\/p>\n<p>This article describes how to attach a database in <i>SQL Server<\/i>.<\/p>\n<\/div><\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\" style=\"font-size:20px;\">Who should read this? <\/h3>\n<div class=\"StepInstructions\">\n<ul>\n<li>TopTeam Administrators<\/li>\n<li>Database Administrators<\/li>\n<li>IT Support<\/li>\n<\/ul>\n<\/div><\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\" style=\"font-size:20px;\">Preparations<\/h3>\n<div class=\"StepInstructions\">\n<ol>\n<li>Connect to <i>Microsoft SQL Server<\/i> using <i>Management Studio<\/i> having administrative access.<\/li>\n<li>Locate the name of <i>TopTeam Database<\/i> from<i> TopTeam Application for SQL Server<\/i>.<\/li>\n<\/ol>\n<\/div><\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\" style=\"font-size:20px;\">Step 1. Connect to Microsoft SQL Server<\/h3>\n<div class=\"StepImage\" style=\"margin:10px 0px;\">\n<img loading=\"lazy\" decoding=\"async\" style=\"padding:3px; border: 1px solid #ccc;\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-layzr=\"http:\/\/www.technosolutions.com\/kb\/wp-content\/uploads\/2018\/05\/wpid32123-media_1261664429708.png\" width=\"391\" height=\"299\" alt=\"wpid32123-media_1261664429708.png\" \/>\n<\/div>\n<div class=\"StepInstructions\">\n<p>Connect to<i> Microsoft SQL Server<\/i> having administrative rights.<br \/>\nDefault Username for Microsoft SQL Server: <strong>sa<\/strong><br \/>\nDefault Password for Microsoft SQL Server: <strong>manager<\/strong><\/p>\n<p>Once you are logged into <i>Microsoft SQL Server<\/i>, locate the database header in the Object Explorer window.<br \/>\nRight-click the <i><strong>Database<\/strong><\/i><strong> <\/strong>header. From the context menu, select the <i><strong>Attach<\/strong><\/i><strong> <\/strong>option.<\/p>\n<\/div><\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\" style=\"font-size:20px;\">Step 2. Locate TopTeam Database<\/h3>\n<div class=\"StepImage\" style=\"margin:10px 0px;\">\n<img loading=\"lazy\" decoding=\"async\" style=\"padding:3px; border: 1px solid #ccc;\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-layzr=\"http:\/\/www.technosolutions.com\/kb\/wp-content\/uploads\/2018\/05\/wpid32125-media_1261668452441.png\" width=\"433\" height=\"304\" alt=\"wpid32125-media_1261668452441.png\" \/>\n<\/div>\n<div class=\"StepInstructions\">\n<p>The Attach option displays the <i><strong>Locate Database Files<\/strong><\/i><strong> &#8211; <\/strong>window. It allows selection of the desired database.<br \/>\nDefault extension of the database is <strong>.MDF<\/strong>.<br \/>\nSelect desired database <strong>.MDF file.<\/strong><\/p>\n<p>The<strong> <i>Databases to attach<\/i>: <\/strong>window displays that lets you rename the database which is being attached to <i>Microsoft SQL Server<\/i>.<\/p>\n<\/div><\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\" style=\"font-size:20px;\">Step 3. Rename the database<\/h3>\n<div class=\"StepImage\" style=\"margin:10px 0px;\">\n<img loading=\"lazy\" decoding=\"async\" style=\"padding:3px; border: 1px solid #ccc;\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" data-layzr=\"http:\/\/www.technosolutions.com\/kb\/wp-content\/uploads\/2018\/05\/wpid32124-media_1261666628125.png\" width=\"601\" height=\"430\" alt=\"wpid32124-media_1261666628125.png\" \/>\n<\/div>\n<div class=\"StepInstructions\">\n<p>By default, the database is attached as &lt;&lt;database file name&gt;&gt;. In case of existence of the same database name, the database can be renamed and attached.<br \/>\nIt is mandatory to attach the database files (.MDF and .LDF) in order to access them using <i>SQL Server.<\/i><\/p>\n<p>For attaching additional databases, repeat the steps above.<\/p>\n<\/div><\/div>\n<div class=\"LessonStep top\">\n<h3 class=\"StepTitle\" style=\"font-size:20px;\">See Also<\/h3>\n<div class=\"StepInstructions\">\n<p><a href=\"http:\/\/www.technosolutions.com\/kb\/2343\/backup-topteam-sql-server-database-schema\/\" target=\"_blank\">Backup TopTeam SQL Server Database Schema<\/a><\/p>\n<\/div><\/div>\n<div class=\"LessonStep top\">\n<div class=\"StepInstructions\">\n<p>Revised: May 24th, 2018<\/p>\n<\/div><\/div>\n<\/p><\/div>\n<p><!-- End ScreenSteps Content --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview Migration of TopTeam Application Server from one one computer to another computer is possible. When TopTeam SQL Application Server is moved from one computer to another along with its database attached to a SQL Server, TopTeam Application Database needs to be detached. After detaching TopTeam Application Server Database, it should again be attached to Microsoft SQL Server. This activity gives you flexibility and mobility to move from one machine to another. This article describes how to attach a database in SQL Server. Who should read this? TopTeam Administrators Database Administrators IT Support Preparations Connect to Microsoft SQL Server using <\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[281,9],"class_list":["post-2582","post","type-post","status-publish","format-standard","hentry","category-database","tag-database","tag-sql-server"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/paoaNA-FE","_links":{"self":[{"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/posts\/2582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/comments?post=2582"}],"version-history":[{"count":5,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/posts\/2582\/revisions"}],"predecessor-version":[{"id":41926,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/posts\/2582\/revisions\/41926"}],"wp:attachment":[{"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/media?parent=2582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/categories?post=2582"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.technosolutions.com\/kb\/wp-json\/wp\/v2\/tags?post=2582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}