Lists Windows PowerShell cmdlets that enable you to manage databases in SharePoint 2013
cls
Remove-PSSnapinMicrosoft.SharePoint.PowerShell -ErrorActionSilentlyContinue
if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) {
Add-PSSnapinMicrosoft.SharePoint.PowerShell;
Write-Host "Done use it now...... ";
sleep 8
cls
}
Get-SPContentDatabase
Get-SPContentDatabasecmdlet returns the specified content databases.
Get-SPContentDatabase -webapplication

Set-SPContentDatabase
TheSet-SPContentDatabasecmdlet sets global properties of a SharePoint content database.
Get-SPContentDatabase | Set-SPContentDatabase -MaxSiteCount 1
New-SPContentDatabase:
TheNew-SPContentDatabasecmdlet creates a new content database and attaches it to the specified Web application.
New-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication

$User = "UserName"
$PWord = ConvertTo-SecureString -String "P@sSwOrd" -AsPlainText -Force
New-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication -DatabaseCredentials $Credential
New-SPConfigurationDatabase
cmdlet creates a new configuration database on the specified database server. This is the central database for a new SharePoint farm.

New-SPConfigurationDatabase -DatabaseName "SharePointConfigDB1" -DatabaseServer "SQL-01" -Passphrase (ConvertTo-SecureString "MyPassword" -AsPlainText -force) -FarmCredentials (Get-Credential)

Backup-SPConfigurationDatabase
TheBackup-SPConfigurationDatabasecmdlet performs a configuration-only backup of the current farm or a configuration-only backup of a separate configuration database which is not attached to the current farm
Backup-SPConfigurationDatabase -DatabaseNameSharePoint_Config -DatabaseServer SqlServer1 -Directory \\server\share\Backup -ShowTree

Test-SPContentDatabase :
Use theTest-SPContentDatabasecmdlet to test a content database against a Web application to verify all customizations referenced within the content database are also installed in the web application.
EXAMPLE
Test-SPContentDatabase -nameWSS_Content_DB -webapplication

Mount-SPContentDatabase:

TheMount-SPContentDatabasecmdlet attaches an existing content database to the farm.

Thiscmdlet causes an upgrade of the schema of the database and initiates upgraded builds for all site collections within the specified content database

Mount-SPContentDatabase "MyDatabase" -DatabaseServer "MyServer" -WebApplication

Cmdlet name / Description
Connect-SPConfigurationDatabase / Connects the local server computer to a farm.
Disconnect-SPConfigurationDatabase / Disconnects the local server computer from the farm.
Move-SPBlobStorageLocation / Copies a content database by using Remote BLOB Storage (RBS).
New-SPConfigurationDatabase / Creates a new configuration database.
Remove-SPConfigurationDatabase / Permanently removes a configuration database.
Dismount-SPContentDatabase / Detaches a content database from the web application it is currently associated with.
Get-SPContentDatabase / Returns one or more content databases.
Mount-SPContentDatabase / Attaches an existing content database to the farm.
New-SPContentDatabase / Creates a new content database and attaches it to the specified web application.
Remove-SPContentDatabase / Deletes a content database.
Set-SPContentDatabase / Sets global properties of a SharePoint content database.
Test-SPContentDatabase / Tests a content database.
Get-SPDatabase / Retrieves all properties of a database.
Split-SPScaleOutDatabase / Moves a specified percentage of partitions from one scale-out database to another.
Set-SPScaleOutDatabaseDataRange / Extends the range of a specified scale-out database.
Set-SPScaleOutDatabaseDataSubRange / Creates a subrange for a specified scale-out database.
Remove-SPScaleOutDatabase / Removes a specific scale-out database.
Import-SPScaleOutDatabaseTenantData / Imports data from the specified subscription id.
Get-SPScaleOutDatabaseLogEntry / Queries a scale-out database for scale-out logs.
Get-SPScaleOutDatabaseInconsistency / Displays all inconsistencies related to scale-out databases' ranges.
Get-SPScaleOutDatabaseDataState / Returns the state information about the specified scale-out database.
Get-SPScaleOutDatabase / Returns all scale-out database objects.
Export-SPScaleOutDatabaseTenantData / Exports the data of the specified subscription.
Clear-SPScaleOutDatabaseTenantData / Removes all data related to the specified site subscription.
Clear-SPScaleOutDatabaseLog / Clears all scale-out logs.
Clear-SPScaleOutDatabaseDeletedDataSubRange / Clears all partitions inside the specified deleted subrange.
Add-SPScaleOutDatabase / Adds an existing scale-out database to the specified service application.
Add-SPServerScaleOutDatabase / Adds an existing scale-out database to the specified service application.
Clear-SPServerScaleOutDatabaseDeletedDataSubRange / Clears all partitions inside the specified deleted subrange.
Clear-SPServerScaleOutDatabaseLog / Clears all scale-out logs.
Clear-SPServerScaleOutDatabaseTenantData / Removes all data related to the specified site subscription.
Export-SPServerScaleOutDatabaseTenantData / Exports the data of the specified subscription.
Get-SPServerScaleOutDatabase / Returns all scale-out database objects.
Get-SPServerScaleOutDatabaseDataState / Returns the state information about the specified scale-out database.
Get-SPServerScaleOutDatabaseInconsistency / Displays all inconsistencies related to scale-out databases' ranges.
Get-SPServerScaleOutDatabaseLogEntry / Queries a scale-out database for scale-out logs.
Import-SPServerScaleOutDatabaseTenantData / Imports data from the specified subscription id.
Remove-SPServerScaleOutDatabase / Removes a specific scale-out database.
Set-SPServerScaleOutDatabaseDataRange / Extends the range of a specified scale-out database.
Set-SPServerScaleOutDatabaseDataSubRange / Creates a subrange for a specified scale-out database.
Split-SPServerScaleOutDatabase / Moves a specified percentage of partitions from one scale-out database to another.