Tuesday, November 16, 2010

Where does a SharePoint server keep note of it's config database?

The config database holds all the information that a SharePoint installation needs, e.g., "Where are the SharePoint databases stored?", "Does the installation have a separate index/job server, and if so, what is the name of this server?", etc. However, before a SharePoint server can connect to it’s databases, it needs to know where the config database is held.

The dsn definition for the config database is stored in the registry:

WSS 3.0 and MOSS 2007: HKLM\Software\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDb

Thursday, September 9, 2010

Installing SQL Server 2008 – reboot required check fails

When installing SQL Server 2008 or rebuilding it, one can run into “‘Reboot required check failed” situation.

Try to reboot first and if that wouldn’t help try out the following

1. Start regedit.exe
2. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager
3. Locate PendingFileRenameOperations
4. Remove any data associated with the value ( copy the values as you may want to export the value for later review)
5. Reboot the machine.
6. Make sure that after you reboot entry in the registry does not reappear
7. If it does, remove it again, but do not reboot, just go ahead with installation process

Changing the default collation for a SQL instance in SQL 2008

Before Rebuilding the Databases:

Perform the following tasks before you rebuild the system databases to ensure that you can restore the system databases to their current settings.

1. Record all server-wide configuration values.

SELECT * FROM sys.configurations;

2. Record all service packs and hotfixes applied to the instance of SQL Server and the current collation. You must reapply these updates after rebuilding the system databases.

SELECT
SERVERPROPERTY('ProductVersion ') AS ProductVersion,
SERVERPROPERTY('ProductLevel') AS ProductLevel,
SERVERPROPERTY('ResourceVersion') AS ResourceVersion,
SERVERPROPERTY('ResourceLastUpdateDateTime') AS ResourceLastUpdateDateTime,
SERVERPROPERTY('Collation') AS Collation;

3. Record the current location of all data and log files for the system databases. Rebuilding the system databases installs all system databases to their original location. If you have moved system database data or log files to a different location, you must move the files again.

SELECT name, physical_name AS current_file_location
FROM sys.master_files
WHERE database_id IN (DB_ID('master'), DB_ID('model'), DB_ID('msdb'), DB_ID('tempdb'));

4. Take a backup of all the databases including the system databases

5. If the instance of SQL Server is configured as a replication Distributor, locate the current backup of the distribution database.
6. Ensure you have appropriate permissions to rebuild the system databases. To perform this operation, you must be a member of thesysadmin fixed server role. For more information, see Server-Level Roles.
7. Verify that copies of the master, model, msdb data and log template files exist on the local server. The default location for the template files is C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Binn\Templates. These files are used during the rebuild process and must be present for Setup to succeed. If they are missing, run the Repair feature of Setup, or manually copy the files from your installation media. To locate the files on the installation media, navigate to the appropriate platform directory (x86, x64, or ia64) and then navigate to setup\sql_engine_core_inst_msi\Pfiles\SqlServr\MSSQL.X\MSSQL\Binn\Templates.

To rebuild system databases for an instance of SQL Server:

1. If it is a cluster, Put off line SQL Server resource by using Failover Cluster Management

2. Go on the node where this clustered instance is owned

3. Insert the SQL Server 2008 R2 installation media into the disk drive, or, from a command prompt, change directories to the location of the setup.exe file on the local server. The default location on the server is C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release.

4. From a command prompt window, enter the following command. Square brackets are used to indicate optional parameters. Do not enter the brackets. When using the Windows Vista operating system with User Account Control (UAC) enabled, running Setup requires elevated privileges. The command prompt must be run as Administrator.

Setup /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=InstanceName /SQLSYSADMINACCOUNTS=accounts [ /SAPWD= StrongPassword ] [ /SQLCOLLATION=CollationName]

Note: [ /SAPWD= StrongPassword ] is only required if you are using mixed mode authentication

Example:
setup.exe /QUIET /ACTION=RebuildDatabase /INSTANCENAME=INST1 /SQLSYSADMINACCOUNTS="testdomain\sqladmin" /SAPWD="PaSSw0rd124##$" /SqlCollation=SQL_Latin1_General_CP1_CI_AS

Note: It is always better to use the installation media as some of the users reported errors when using the setup.exe from the local server

5. When Setup has completed rebuilding the system databases, it returns to the command prompt with no messages. Examine the Summary.txt log file to verify that the process completed successfully. This file is located at C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Logs.

6. Restore the databases (Do not restore the system databases if you have changed the collation)

7. Check the product versions and apply patches if required

Tuesday, August 17, 2010

Event ID: 6398, 6482, and 6641 for Share Point with error Access is denied

You may get this error after installing MOSS 2007 in windows 2008. For the similar error in window server 2003, a hot fix is available from Microsoft for iis6

The hot fix can be downloaded from http://support.microsoft.com/Default.aspx?id=946517

For 2008 change the set the default impersonation level to identify

To do this, go to

1 Start
2 Administrative Tools
3 Component Services
>>Component Services>> Computers >>My Computer
4 Right Click on My computer > Default Properties
5 Change the default impersonation level to identify

Wednesday, August 11, 2010

Moving the default Mail store location in POP3

Using the Windows interface

1.Open POP3 service.
2.In the console tree, right-click the computer_name node, and then click Properties.

POP3 Service/computer_name

3.In Root Mail Directory, type the path to the mail store; for example, C:\mailstore. The maximum value is 260 characters.
4.restart pop3 and iis

Note: After doing this I found the users are not able to login to the mailboxes hence I did it from the command line


Also move (don’t copy) the existing mailboxes from the default location (normally system_drive:\Inetpub\mailroot\Mailbox) to the new directory


Using the Commandline interface

1.Open Command Prompt.

2.Type:

winpop set mailroot path_to_mail_store

3.restart pop3 and iis

Thursday, August 5, 2010

403 error when you use an ASP request to upload a large (>200kb) file in IIS

Make sure the IIS web server is not restricting the size of ASP uploads. IIS 6 /IIS 7 have a limit of 200 KB for ASP requests in general and file uploads in particular.

Follow these steps in IIS 6

To remove this limitation in IIS 6 you need to edit the Metabase file, which can be found at c:\Windows\System32\Inetsrv\MetaBase.xml.

  1. Go to IIS and right click the server, select properties, and check the box "Allow changes to MetaBase configuration while IIS is running"

  1. if after this step the metabase file is still locked, try turning off IIS or even restarting the machine in safe mode; open the file in an editor; the variable AspMaxRequestEntityAllowed limits the number of bytes in the page request (by default 200KB); change the value to 1073741824 (unlimited) or to a limit of your choice

  1. Check whether the same variable shows up in other places in the file.
  2. do issreset

Or from the command prompt

  1. At a command prompt, type the following command, and then press ENTER:
  2. cd drive:\inetpub\adminscripts
  3. Note In this command to change folders, drive is a placeholder for the hard disk where IIS is installed.
  4. At a command prompt, type the following command, and then press ENTER:
  5. cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed size
  6. Note In this command, size is a placeholder for the largest file size upload that you want to allow. The maximum value is 1,073,741,824 bytes. At a command prompt, type the following command, and then press ENTER:
  7. iisreset

Follow these steps in IIS 7

  1. Open IIS Manager (inetmgr)
  2. Open "ASP"
  3. Go to Limit properties
  4. Edit maximum equesting Entity Body Limit - (say for eq 1073741824)
  5. do issreset

Or from the command prompt

C:\Windows\System32\inetsrv> appcmd set config /section:asp /maxRequestEntityAllowed:1073741824

Tuesday, July 27, 2010

How to Determine What Domain Controller Authenticated the User

How to Determine What Domain Controller Authenticated the User

Just type the following command in the command prompt , which will tell you the DC with which the machine has authenticated

> echo %logonserver%

Saturday, March 27, 2010

NET USE command

The NET USE command is used to associate a local drive letter or device name with a shared network drive or device. Most often, the NET USE command is used for network drive mapping.
The NET USE command can be used also to disconnect a computer from a shared resource, or to display information about computer network connections.

1.How do I display a list of network connections on my computer

Go to yoStart menu--> Run, type cmd and hit enter. Then, type NET USE and you will see
a list of connected network devices

2.How do I disconnect from a share using NET USE?

NET USE [driveletter: or share] /DELETE
Eg : net use z: /delete
net use \\share1\softwares /delete

In some case you want to map the share with another user credentials, and in such situations use the netuse / delete command as explained above to terminate the sessions properly

Managing Terminal Services Sessions Remotely

Normally windows has a limitation of maximum 2 user session in terminal service administration mode

Many times you might have faced problem in connecting to Terminal Services because both sessions are used up. I can use another server to check the status of the first one. As long as the logged in user has administrative rights on the non-accessible machine I would run this:

qwinsta /server:10.196.10.2

Where, 10.196.10.2 is the IP address or name of the non-accessible machine.

This will display something like this:

qwinsta /server:10.196.10.2

SESSIONNAME USERNAME ID STATE TYPE DEVICE

console 0 conn wdconn

rdp-tcp 65536 Listen rdpwd

rdp-tcp#470 Steve 1 Active rdpwd

rdp-tcp#471 Rajesh 3 Active rdpwd

Now I know that Steve and Rajesh are the two that are logged in. Since I know that Rajesh has left the office sometimes ago and might have forgotten to log off, I have decided to terminate his session.

To disconnect Rajesh's session I would type this:

rwinsta /server:10.196.10.2 3

Notice the 3 which is the session ID I found from using qwinsta above.

There is another command, “query “which can serve the same purpose , but i prefer using qwinsta (Query Windows Station) and rwinsta (Reset Windows Station) as they are fully compatible with W2K ,WinXP , W2K3 and win2k8