if your have restored the database outside the container the you can just recreate your container pointing to your host SQL with:
new-navcontainer -databaseServer xxxxx
-databaseInstance xxxxx
-databaseName xxxxx
-databaseCredential xxxxx
For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
if your have restored the database outside the container the you can just recreate your container pointing to your host SQL with:
new-navcontainer -databaseServer xxxxx
-databaseInstance xxxxx
-databaseName xxxxx
-databaseCredential xxxxx
Thanks.
I restored inside the container.
For some reason powershell doesn't recognize commands Set-NAVServerConfiguration and restart-NAVServerInstance. But in the same time I can find them in the list of available commands. Strange.
if your have restored the database outside the container the you can just recreate your container pointing to your host SQL with:
new-navcontainer -databaseServer xxxxx
-databaseInstance xxxxx
-databaseName xxxxx
-databaseCredential xxxxx
I have done it, but now I can't enter the web client and I can't download symbols in VS Code.
After that I tried to create new user in shell and I got error "The tenant 'Default' is not mounted or does not exist.":
$credentials = New-Object pscredential 'xxxx', (ConvertTo-SecureString -String 'xxxx' -AsPlainText -Force)
New-BcContainerBcUser -Credential $credentials -assignPremiumPlan -containerName "xxxxxxxx" -PermissionSetId super -tenant xxxxx
Any ideas?
Are your database you are restoring a multi tenant database?
Per. default containers created with new-bccontainer are multitenant.
If the database you have restored is not configured as a multitenant DB the you cannot mix the databases.
On your new-bccontainer you can specify that the container is -multitenant:$false.
Why are you restoring a database inside of a container? It is way faster to use the host SQL instance and your passed parameters to the container to use the DB found in the host?
For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
Answers
If you have restored the database inside the container, you can just change the database name in the service tier with powershell.
Enter-navcontainer -containername xxxxx
Set-NAVServerConfiguration -ServerInstance xxxxx-KeyName DatabaseName -KeyValue xxxxx
restart-NAVServerInstance -ServerInstance xxx
if your have restored the database outside the container the you can just recreate your container pointing to your host SQL with:
new-navcontainer -databaseServer xxxxx
-databaseInstance xxxxx
-databaseName xxxxx
-databaseCredential xxxxx
Thanks.
I restored inside the container.
For some reason powershell doesn't recognize commands Set-NAVServerConfiguration and restart-NAVServerInstance. But in the same time I can find them in the list of available commands. Strange.
I have done it, but now I can't enter the web client and I can't download symbols in VS Code.
After that I tried to create new user in shell and I got error "The tenant 'Default' is not mounted or does not exist.":
$credentials = New-Object pscredential 'xxxx', (ConvertTo-SecureString -String 'xxxx' -AsPlainText -Force)
New-BcContainerBcUser -Credential $credentials -assignPremiumPlan -containerName "xxxxxxxx" -PermissionSetId super -tenant xxxxx
Any ideas?
Per. default containers created with new-bccontainer are multitenant.
If the database you have restored is not configured as a multitenant DB the you cannot mix the databases.
On your new-bccontainer you can specify that the container is -multitenant:$false.
Why are you restoring a database inside of a container? It is way faster to use the host SQL instance and your passed parameters to the container to use the DB found in the host?