Scenario/Problem: You want to use a new database for the secure store service application.
Solution: Use the Set-SPSecureStoreServiceApplication
cmdlet with the DatabaseName
parameter.
When the Secure Store Service Application is created, by default, the database name is Secure_Store_Service_<guid>
. You can easily change this to a new database using the DatabaseName
parameter with the Set-SPSecureStoreServiceApplication
cmdlet, as shown in Listing 16.4.
$sss = Get-SPServiceApplication -Identity bc4399ed-a2e0-4397-bf07-
cd3d207e630e
Set-SPSecureStoreServiceApplication -Identity $sss -DatabaseName
SecureStoreDB
If the database does not exist, a new database is created. Simply drop the old one with the GUID in the name and make your DBAs happy. By default, the database server is assumed to be the SQL Server instance that SharePoint is using. You can specify the database server using the -DatabaseServer
parameter. You need to specify the database credentials only if SQL authentication is being used.
Note
At the time of this writing, a new database is only being created when a new database name is specified from within Central Administration. Although the PowerShell cmdlet changes the name, the new database does not appear in SQL Server. However, reviewing the properties of the Secure Store Service Application and clicking OK does indeed create the new database.
18.188.10.246