I am trying to automate the tenant DB creation in Azure SQL Server. DB has been created/copied as
CREATE DATABASE {0} AS COPY OF {1} ( SERVICE_OBJECTIVE = 'S2' )
Immediately adding a record to one of the table in the same. Getting error as:
Function completed (Failure, Id=1046eae2-c07a-4eee-9a1d-886e89ab5071) A ScriptHost error has occurred Exception while executing function: Functions.CreateTenant. .Net SqlClient Data Provider: Database 'tenant8' on server 'dbserver' is not currently available. Please retry the connection later. If the problem persists, contact customer support, and provide them the session tracing ID of '8AF58081-8F25-4B7F-83E3-63AFFC13C8CB'. Exception while executing function: Functions.CreateTenant Executed 'Functions.CreateTenant' (Failed, Id=1046eae2-c07a-4eee-9a1d-886e89ab5071) Function had errors. See Azure WebJobs SDK dashboard for details. Instance ID is '1046eae2-c07a-4eee-9a1d-886e89ab5071'