Tuesday, November 16, 2010
Where does a SharePoint server keep note of it's config database?
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
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
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
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
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.
- Go to IIS and right click the server, select properties, and check the box "Allow changes to MetaBase configuration while IIS is running"
- 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
- Check whether the same variable shows up in other places in the file.
- do issreset
- At a command prompt, type the following command, and then press ENTER:
- cd drive:\inetpub\adminscripts
- Note In this command to change folders, drive is a placeholder for the hard disk where IIS is installed.
- At a command prompt, type the following command, and then press ENTER:
- cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed size
- 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:
- iisreset
Follow these steps in IIS 7
- Open IIS Manager (inetmgr)
- Open "ASP"
- Go to Limit properties
- Edit maximum equesting Entity Body Limit - (say for eq 1073741824)
- do issreset
Or from the command prompt
Tuesday, July 27, 2010
How to Determine What Domain Controller Authenticated the User
Saturday, March 27, 2010
NET USE command
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
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.