SQL Server Versions List

Bill Graziano at SQLTeam.com has a listing of all the SQL Server versions that come in very handy:

http://www.sqlteam.com/article/sql-server-versions

SharePoint 2010 Administration Toolkit Released

The SharePoint 2010 Administration Toolkit has been released.

More info: Microsoft SharePoint Team Blog
Download: Microsoft
Documentation

How To Delete An SSP (Shared Services Provider) In Sharepoint

Sharepoint Shared Services Providers (SSPs) can be forced to delete using the following stsadm command:

stsadm -o deletessp -title "SSPNAME" -force

 

If you also want to delete the SSP database also use the following stsadm command:

stsadm -o deletessp -title "SSPNAME" -deletedatabases –force

Sharepoint WSS Search Server Stuck On “Pausing”

I ran across an issue this morning that had the Sharepoint WSS Search Server in a “Pausing” state.  I had to restart the Office SharePoint Server Search service in order to resolve the issue.

Now to see if it will complete successfully.

Host Header On SSL Sites

This is an update to our previous post (Enable Host Headers On An SSL/HTTPS Site).  Which used the following command to enable host headers on SSL sites:

cscript.exe adsutil.vbs set /w3svc/<site identifier>/SecureBindings ":443:<host header>"

I ran into some issues with using SecureBindings with the Sharepoint Central Administration sites so I thought I would post some of the other commands that I used:

To find out what bindings are on a site use the following command:

cscript.exe adsutil.vbs get w3svc/<site-identifier>/securebindings

To remove the host header from an SSL site use the following command:

cscript.exe adsutil.vbs set /w3svc/<site identifier>/SecureBindings ":443:"

Shrink All Log Files Within A MS SQL 2008 Instance

This is an update to a previous post (Shrink All Log Files Within A MS SQL Instance) that has been edited to work in SQL Server 2008.

declare @ssql nvarchar(4000)
set @ssql= '
    if ''?'' not in (''tempdb'',''master'',''model'',''msdb'')
        begin
            use [?]
            declare @tsql nvarchar(4000) set @tsql = ''''
            declare @recmodel nvarchar(10)
            declare @iLogFile int
            declare LogFiles cursor for
            select fileid from sysfiles where  status & 0x40 = 0x40
            open LogFiles
            fetch next from LogFiles into @iLogFile
            while @@fetch_status = 0
                begin
                    select @recmodel = (SELECT recovery_model_desc FROM sys.databases WHERE name = ''?'' )
                    if @recmodel = ''FULL''
                        begin
                            set @tsql = @tsql + ''use [?] ''
                            set @tsql = @tsql + ''ALTER DATABASE [?] SET RECOVERY SIMPLE ''
                            set @tsql = @tsql + ''DBCC SHRINKFILE(''+cast(@iLogFile as varchar(5))+'', 1) ''
                            set @tsql = @tsql + ''ALTER DATABASE [?] SET RECOVERY FULL ''
                        end
                    else
                        set @tsql = @tsql + ''DBCC SHRINKFILE(''+cast(@iLogFile as varchar(5))+'', 1) ''
                    fetch next from LogFiles into @iLogFile
            end
            --set @tsql = @tsql + '' BACKUP LOG [?] WITH TRUNCATE_ONLY '' + @tsql
            --print @tsql
            exec(@tsql)
            close LogFiles
            DEALLOCATE LogFiles
        end'
exec sp_msforeachdb @ssql

Delete An Extended Web Application

Extended web applications are not listed in the web application list and cannot be deleted using the Delete Web Application link in Central Administration.

Use the following steps to delete extended web applications:

  1. Start Central Administration
  2. Go to Application Management
  3. Click Remove SharePoint from IIS Web Site to get a page with a form similar to the following.
    image
  4. Select the web application that the extended web app was extended from
  5. Select which extention/zone to delete
  6. Select whether to keep or delete the IIS Web site
  7. Finally click OK

IIS Admin Error: Handle Is Invalid – Permissions SSL Certificate MachineKeys

Well, I’ve been trying to setup the External Collaboration Toolkit.  All of the instructions tell how to do it as a standalone SharePoint install, but I am trying to get it setup in a SharePoint farm.  One of the steps in the instructions is to setup ADAM to act as the authentication for external users.  The communications with ADAM need to be SSL encrypted.  So, I set it up the way the instructions say and went through the portion that ensures that the UserID that runs the ADAM service has access to the SSL Certificates. 

That’s when I must have went wrong.  Somehow, I removed access to the SSL Certificates from the service that runs the IIS Admin service.  So, when I rebooted, IIS would not start.  The only thing that was in the event log was:

Handle is invalid

Real helpful, huh?

Luckily, I was able to find Microsoft KB Article #278381.  The basic thing is that I needed to reset the security on the SSL Certificates.  Below is an explaination:

The MachineKeys are at the following location:
All Users Profile\Application Data\Microsoft\Crypto\RSA

The following settings are the default permissions for the MachineKeys folder:

Administrator (Full Control) This folder only
Everyone (Special) This folder, subfolders, and files
SYSTEM (Full Control) This folder, subfolders, and files
 

To view the special permissions for the Everyone group, right-click the MachineKeys folder, click Advanced on the Security tab, and then click View/Edit. The permissions consist of the following permissions:

  1. List Folder/Read Data
  2. Read Attributes
  3. Read Extended Attributes
  4. Create Files/Write Data
  5. Create Folders/Append Data
  6. Write Attributes
  7. Write Extended Attributes
  8. Read Permissions

 

Select the Reset Permissions on all Child objects and enable propagation of inheritable permissions check box.

Shrink All Log Files Within A MS SQL Instance

This little SQL script is used to to shrink all the log files in a Microsoft SQL server instance.  It uses the following function to get the job done: DBCC SHRINKFILE.

declare @ssql nvarchar(4000)
set @ssql= '
        if ''?'' not in (''tempdb'',''master'',''model'',''msdb'') begin
        use [?]
        declare @tsql nvarchar(4000) set @tsql = ''''
        declare @iLogFile int
        declare LogFiles cursor for
        select fileid from sysfiles where  status & 0x40 = 0x40
        open LogFiles
        fetch next from LogFiles into @iLogFile
        while @@fetch_status = 0
        begin
          set @tsql = @tsql + ''DBCC SHRINKFILE(''+cast(@iLogFile as varchar(5))+'', 1) ''
          fetch next from LogFiles into @iLogFile
        end
        set @tsql = @tsql + '' BACKUP LOG [?] WITH TRUNCATE_ONLY '' + @tsql
        --print @tsql
        exec(@tsql)
        close LogFiles
        DEALLOCATE LogFiles
        end'
 

exec sp_msforeachdb @ssql

via CodeSnippets

Create A Windows Service / Delete A Windows Service (sc create / sc delete)

Today, I came across a Windows Service on a server that I inherited. By the name of the service I could tell that it was built in-house and I even found enough information to determine who the developed it.  However, since it was not in the Add / Remove Programs list of the Control Panel, I wasn’t sure how to remove it.  So, I found the following on Geeks With Blogs – Shahed’s Blog:


Recently, I was trying to delete a windows service. Normally it should not be necessary to manually delete a service. Uninstalling an application should remove its associated service (if any).

However, I installed some beta products and a service created by one of the applications was not removed automatically. Its very easy to remove a service from registry if you know the right path. Here is how I did that:

1. Run Regedit or Regedt32

2. Find the registry entry "HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services"

3. Look for the service there and delete it. You can look at the keys to know what files the service was using and delete them as well (if necessary).

alternatively, you can also use command prompt and delete a service using following command:

sc delete < SERVICE name>
or to create, simply type
sc create <SERVICE name>

Update:
If you have space in the file path you need to use quotation marks ("). For example: 
sc create "MySQL" binpath= "C:\Archivos de programa\MySQL\MySQL Server 5.1\bin\mysqld.exe"

I used the “sc delete” method to remove the service.

Thanks, Shahed!

Related Posts with Thumbnails