最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

如何:复制数据库(用于D365FO测试) / How to: copy databases (for D365FO tests)

网络文摘 William 683浏览 0评论
First post in year 2020, I am surprised by myself that I haven't managed to make a single post this year - given that I am, like most of you, working from home for the majority of the year.  Anyways, here comes a small tip about Copying Databases. With Dynamics 365 for Finance and operations (now a.k.a Dynamics 365 for Finance, Dynamics 365 for Supply Chain Management and also Dynamics 365 for Commerce) - you might be in need to perform several database operations during the Project implementation phases. Also you might want to take a back up of the existing database for recovery perspective.  Below is something which I use to support with Copy actions on databases. How to make a quick copy of AXDB hosted in Azure SQL (Tier 2 and above)
  1. To begin connect to the Azure SQL database from within the primary AOS server (AOS 01 - because this is where you would great maximum permissions to perform actions on SQL database)
  2. You should use the credentials from LCS to connect to Azure SQL database from SSMS in AOS 01
  3. Open the SQL Query window
  4. And use the below command to perform copy actionCREATE DATABASE [Name-for-New-Copy] AS COPY OF [Database-name-of-the-Source-DB(AXDB)];
  5. Once you execute this commend, you would get a message stating that action is finished and usually SSMS is quick to give you this message
  6. However, important to understand is that this is only the trigger, the copy continues in the background
  7. You could confirm by looking at the database size of the [New copy]
  8. I usually leave it overnight
How to make a quick copy of AXDB hosted in SQL Server (Tier 1 and/or Cloud hosted environments)
  1. The easiest way is always to use the functions available in SSMS UI
  2. Connect to SQL database using SSMS in the server
  3. Usually credentials are auto-populated with the User details
  4. Right click on the [Source] database > Tasks > Copy Database
  5. Just follow the wizard 
  6. However, Important to understand that SQL Server Agent needs to be Active for this to work
  7. Another tip, if you are working with Microsoft Managed Tier-1 environment, easiest way to get around SQL Server Agent is to go to Services.msc and start the service from in there
  8. Once you are all set, Click on Finish on the Wizard and you should have copy of your database soon enough
Hope this helps. Happy DAXing.
 
发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址