Skip to main content

Posts

Showing posts from February, 2010

Failed to connect to the database server or the database name does not exist

I was trying to install MOSS 2007 64 bit on a Windows Server 2008 R2 (Virtual Server) and I encountered this error while running Sharepoint Products and Technologies Wizard on my first server in the farm: Failed to connect to the database server or the database name does not exist. Ensure the database server exists, is a Sql server, and that you have the appropriate permissions to access the database server. It seems certain ports needs to be open in the Windows Server where SQL Server 2008 was installed, this batch file solved the problem: @echo ========= SQL Server Ports =================== @echo Enabling SQLServer default instance port 1433 netsh firewall set portopening TCP 1433 "SQLServer" @echo Enabling Dedicated Admin Connection port 1434 netsh firewall set portopening TCP 1434 "SQL Admin Connection" @echo Enabling conventional SQL Server Service Broker port 4022 netsh firewall set portopening TCP 4022 "SQL Service Broker" @echo Enabling Transact

CREATE FILE encountered operating system error 5 (Access is denied)

I was trying to move some content dbs in our MOSS farm to another drive in the same Server. I stopped all website from IIS and stopped all the related services, then ran stsadm deletecontentdb command with all the required parameters. Then I detached the db and it threw an error and I just closed it by clicking Ok. Now I went to the drive to copy and paste the .mdf and .ldf file to the new drive. I tried to copy the .mdf file and I got access denied error but the db was already detached, I was screwed! The downtime was only for a couple of hours and I had many dbs to move to this new drive. I googled for some time and did not get many solutions, some people had encountered this error but none of them posted an answer. I tried to attach the file again from the old location, atleast site will not go down. But when I tried to attach I got this wierd error from SQL Server 2005 Management Studio: TITLE: Microsoft SQL Server Management Studio ------------------------------ Failed to retrieve