Thursday, June 14, 2012

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

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-SQL Debugger/RPC port 135
netsh firewall set portopening TCP 135 "SQL Debugger/RPC"
@echo ========= Analysis Services Ports ==============
@echo Enabling SSAS Default Instance port 2383
netsh firewall set portopening TCP 2383 "Analysis Services"
@echo Enabling SQL Server Browser Service port 2382
netsh firewall set portopening TCP 2382 "SQL Browser"
@echo ========= Misc Applications ==============
@echo Enabling HTTP port 80
netsh firewall set portopening TCP 80 "HTTP"
@echo Enabling SSL port 443
netsh firewall set portopening TCP 443 "SSL"
@echo Enabling port for SQL Server Browser Service's 'Browse' Button
netsh firewall set portopening UDP 1434 "SQL Browser"
@echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)
netsh firewall set multicastbroadcastresponse

Wednesday, April 18, 2012

Error Connecting to a Database when configuring a farm setting in Sharepoint 2010

Whenever are you creating a new Farm server connection for Sharepoint 2010 and hit up with following error:

Nothing to worry,
1.Login in to your database server and launch your "Microsoft SQL Manangement Studio"
3.Expand Security-->Logins and select the Server role for the user and check-in the following permissions:
  1.DBCREATOR  
  2.SECURITY ADMIN

  these are the permissions that are required for the user to configure the Sharepoint Server 2010 .
   Reference: 

http://www.khamis.net/blog/Lists/Posts/Post.aspx?List=6c8a23d1%2D47ea%2D47e5%2Db56f%2D2bc57cb95b93&ID=48&Web=d64cd8b3%2Da3f4%2D40d8%2D8d93%2D6aa6dc82fcda


If the problem even persists after you have given permission for the user
2.Create a firewall rule in Application Server(where your Central Administration is installed)
   1.Click Firewall advanced configuration
   2.Click "Inbound rule:
   3.Click "New Rule" on the right side
   4.Select Port ,On the port and protocol wizard -select TCP port and enter 1433 in the below .
   .......................Proceed and fill the following wizard(  I think just enter the name it would do)

  It should work .

The reason behind:
 
   Microsoft SQL listens to to port 1433.

Monday, December 5, 2011

Upgrade SQL Express 2008 to SQL 2008 r2

Upgrade SQL 2008 Express to SQL 2008 r2
The article is about upgrading SQL 2008 Express to SQL 2008 r2.IN-Built Sharepoint foundation has SQL Express 2008 ,if you have installed SQL 2008 Express recklessly,then at some stage,when you reach about 4GB or more ,Sharepoint will through you an error .(Will not allow you to add any more items)
Cool,Microsoft gives you solution to upgrade your SQL Expess to SQL full version in simple steps.

1.Insert your boot media and Click setup.exe
Click Installation and click "upgrade fromSQLserver 2000 or SQL server2005 or SQL server 2008.




Tuesday, November 29, 2011

Sharepoint Migration approaches

There are two basic upgrade approaches available in Sharepoint .
1.In-Place approach
2.Database Attach .
1.In Place approach
You can install SharePoint Server 2010 on the same hardware. You can also upgrade the content and settings in the server farm as part of a single process
2.Database attach
You can upgrade the content for the environment on a separate farm. The result is that you do not upgrade any of the services or farm settings. You can upgrade the databases in any order and upgrade several databases at the same time. While each database is being upgraded, the content in that database is not available to users.
Special case consideration
 Database attach is the solution for the following cases.
Upgrading from SharePoint Portal Server 2003
Upgrading from Windows SharePoint Services 3.0
Upgrading Microsoft Office Forms Server 2007 to SharePoint Server 2010


For more information:
http://technet.microsoft.com/en-us/library/cc263447.aspx

Sunday, November 27, 2011

Backup your Farm in Sharepoint 2010

1.Open your Sharepoint 2010 Central Administration.
2.Navigate to Backup and Restore section.
3.Now you will see
   a.Farm Backup and Restore.(This is the Section that we are going to look at)
   b.Granular Backup
4.For the instance,we look only at FARM BACKUP and RESTORE
   Click Perform a Backup

5.   Select all the options if you want to backup all the items in the farm or customize the items that you want.Click Next.

6.Choose the backup type:a.FULL  b.DIFFERENTIAL
7.Specify the backup location.
8.Now your backup should process.


 

SQL Express Database full error in Sharepoint :Exception from HRESULT: 0x80131904

This Post reveals the erro message that you would get once your SQL Express database is full.
For instace,If you try to add any new item in the created webpart then you would end up the
below shown message.
Exception from HRESULT: 0x80131904



Log Message :
SqlError: 'Could not allocate space for object 'dbo.AllDocs'.'AllDocs_ParentId' in database 'WSS_Content' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files,

Solution :
upgrade the SQL Express Edition to full SQL edition. This was coming from the fact that my content database was full.

NOTE:Please refer to article "Upgrade SQLExpress 2008 to SQL 2008 r2"

Monday, November 21, 2011

Expand and Collapse buttons for Web Parts:Sharepoint 2010

Expand and Collapse Webpart



The above said would be the final look .
Phase1:
Please Create  the necessary webpart that you want in the webpage .
For our example :I have created three announcement webpart namely:My opportunities, My Leads,My accounts here.
Please create as you wish.
Phase 2
1.Please copy the code below:
2.Paste the code in your favorite editor(Notepad,Worpad,Office,etc.,)
3.On your Sharepoint site,Click "Site Setting"and choose "View all site Content".
4.Click "Site asstes".
5.Upload your file to site assets and copy the url of the file.(Click the file .A pop-up approaches to
   to edit or read,select read and copy the url in your browser)
6.Click Edit page and insert "Content Editor webpart"
7.click Edit webpart.
8..click "Click here to add a new content"
9.paste your URl in url column of the properties window.
10.Click Apply and Ok

You must be able to see the above said.

The code:
<style type="text/css">
.et-tab{font-size:8pt;font-weight:bold;padding:3px 10px;background:url("/_layouts/images/selbg.png") repeat-x;display:inline-block;cursor:pointer;}
.et-activetab{background-color:#ffe4b5;border:solid 1px #ffe4b5;color:#382500;}
.et-inactivetab{background-color:#ccebff;border:solid 1px #ccebff;color:#4c5b72;}
.et-separator{height:5px;background-color:#ffe4b5;}
.et-tabrow{white-space:nowrap;}
.et-offscreen{position:absolute;max-height:1px;max-width:1px;top:-9999px;}
</style>
<script type="text/javascript">
(function(){
var AP="",sec=0,Header="none",Split="No",Expand="",Print="";
if (document.forms[0].elements["_wikiPageMode.value"]=="true"||document.forms[0].elements["MSOLayout_InDesignMode"].value=="1"){return;}
var el=document.getElementsByTagName("SCRIPT"),p=el[el.length-1],sT,a,sep,tabRow;
do {p=p.parentNode;sT=p.innerHTML.split("MSOZoneCell_WebPart");}while (sT.length<4 && p.parentNode.id!="MSO_ContentTable")
if (p.getAttribute("contenteditable")=="true"){return;}
if (p.nodeName=="DIV"){sep=document.createElement("div");p.insertBefore(sep,p.firstChild);tabRow=document.createElement("div");p.insertBefore(tabRow,p.firstChild);}
else{sep=document.createElement("td");var sepTR=document.createElement("tr");sepTR.appendChild(sep);tabRow=document.createElement("td");var tabTR=document.createElement("tr");tabTR.appendChild(tabRow);if (p.nodeName=="TBODY"){p.insertBefore(sepTR,p.firstChild);p.insertBefore(tabTR,p.firstChild);}else if (p.nodeName=="TR"){p.parentNode.insertBefore(tabTR,p);p.parentNode.insertBefore(sepTR,p);}else {return;}}
sep.className="et-separator";tabRow.className="et-tabrow";var children=p.childNodes;p=p.parentNode;var etRoot=[],etHeader=[],etTab=[],tabsID=[];
for (var j=0;j<children.length;j++){try{var d=children[j].getElementsByTagName("td");for (i=0;i<d.length;i++) {if(d[i].id.indexOf("WebPartTitle")==0){var WPid=d[i].id.replace(/WebPartTitle/,"");if (d[i].innerHTML.indexOf("(Hidden)")==-1) {var up=d[i];while (up!=children[j]){if (up.parentNode.innerHTML.indexOf('id=WebPart'+WPid+' ')>=0||up.parentNode.innerHTML.indexOf('id="WebPart'+WPid+'" ')>=0){WPid="et"+WPid;etHeader[WPid]=up;etRoot[WPid]=children[j];etTab[WPid]=d[i].getElementsByTagName("span")[0].cloneNode(true);etTab[WPid].id=WPid;etTab[WPid].className="et-tab et-inactivetab";etTab[WPid].onclick=function(){activateTab(this);};tabRow.appendChild(etTab[WPid]);tabsID.push(WPid);break;}up=up.parentNode;}}}}}catch(e){}}
var Tabs=tabRow.getElementsByTagName("span"),TabCount=Tabs.length;
if (Split=="Yes") {var sd=document.createElement("div"),index=Math.floor(TabCount*0.5);tabRow.insertBefore(sd,Tabs[index]);}
if(AP.length && sec>0) {sec=sec*1000;interval="";a=document.createElement("span");a.innerHTML="|>";a.className="et-tab et-inactivetab";a.onclick=function(){if(interval==""){this.innerHTML="||";interval=window.setInterval(function(){Autoplay();},sec)}else{this.innerHTML="|>";window.clearInterval(interval);interval=""}};tabRow.appendChild(a);var Autoplay=function(){for(i=0;i<TabCount;i++)if(Tabs[i].className=="et-tab et-activetab"){var j=(i+1)%TabCount;activateTab(Tabs[j]);break}};if (AP=="Play"){a.innerHTML="||";interval=window.setInterval(function(){Autoplay();},sec)};}
if (Expand.length) {a=document.createElement("span");a.innerHTML=Expand;a.className="et-tab et-inactivetab";a.onclick=function(){for(i=0;i<tabsID.length;i++){etTab[tabsID[i]].className="et-tab et-inactivetab";etRoot[tabsID[i]].className=etRoot[tabsID[i]].className.replace(/et-offscreen/g,"");etRoot[tabsID[i]].style.pageBreakAfter="always";etHeader[tabsID[i]].style.display="";}};tabRow.appendChild(a);}
if (Print.length) {a=document.createElement("span");a.innerHTML=Print;a.className="et-tab et-inactivetab";a.onclick=function(){this.style.display="none";var f=document.getElementById("s4-workspace")||document.getElementsByTagName("body")[0],ed=p.parentNode.insertBefore(document.createElement(p.nodeName),p);f.appendChild(p);for (j=0;j<f.childNodes.length-1;j++) {try{f.childNodes[j].className+=" et-offscreen";}catch(e){}}a=document.createElement("span");a.innerHTML="Back to Page";a.className="et-tab et-inactivetab";a.onclick=function(){this.previousSibling.style.display="inline-block";this.parentNode.removeChild(this);ed.parentNode.insertBefore(p,ed);ed.parentNode.removeChild(ed);for (j=0;j<f.childNodes.length;j++) {try{f.childNodes[j].className=f.childNodes[j].className.replace(/\s*et-offscreen/g,"");}catch(e){}}};tabRow.appendChild(a);};tabRow.appendChild(a);}
function activateTab(t){document.cookie=tabsID.join("_")+"="+t.id+";path=/";for(i=0;i<tabsID.length;i++){etHeader[tabsID[i]].style.display=Header;if(t.id==tabsID[i]){etTab[tabsID[i]].className="et-tab et-activetab";etRoot[tabsID[i]].className=etRoot[tabsID[i]].className.replace(/\s*et-offscreen/g,"");}else{etTab[tabsID[i]].className="et-tab et-inactivetab";etRoot[tabsID[i]].className+=" et-offscreen";}}}var m=GetCookie(tabsID.join("_"))?GetCookie(tabsID.join("_")):tabsID[0];activateTab(etTab[m]);})();
</script>