I am trying to create a site collection with its dedicated content database in SharePoint 2010. To that end, I am trying to use powershell with New-SPContentDatabase command. Here is the command I run:
PS C:\> New-SPContentDatabase -Name "WSS_Content_DB_Custom" -DatabaseServer "DBServer_" -WebApplication "https://SPWebApplicationUrl.com" | out-null
When I run this command, this is the error I get:
New-SPContentDatabase : Directory lookup for the file "E:\Databases\WSS_Content_DB_Custom.mdf" failed with the operating system error 3(The system cannot find the path specified.).
CREATE DATABASE failed. Some file names listed could not be created. Check rela ted errors.
At line:1 char:22
+New-SPContentDatabase <<<< -Name "WSS_Content_DB_Custom" -DatabaseServer "DBServer_" -WebApplication "https://SPWebApplicationUrl.com" | out-null
+CategoryInfo : InvalidData: (Microsoft.Share...ContentDatabase: SPCmdletNewContentDatabase) [New-SPContentDatabase], SqlException
+FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletNewConte ntDatabase
I have checked online for any possible resolution, but no hint avail. I just dont understand why the command is looking on the E: for the mdf file.
Edit: Additional details:
My db server is responding to ping request and my other mdf files in the db server is stored in F:/