Tuesday, November 23, 2010
Wednesday, November 10, 2010
Add a Domain User to the Machines Local Administrators Group
The command:
Net Localgroup Administrators /add Domain\UserName
The add_user.bat file:
p:
cd P:\Downloads\AD Tools
set pstoolshome=C:\Util\Sysinternals\
set serverlist=%pstoolshome%servers_list.txt
set psexec=%pstoolshome%psexec.exe
set psservice=%pstoolshome%psservice.exe
set psinfo=%pstoolshome%psinfo.exe
set outputfolder=%pstoolshome%output3\
set outputfile=temp.txt
rem echo %date% %time% >> %outputfolder%%outputfile%
echo ********************************** >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
for /f %%i in (%serverlist%) do (
echo %%i >> %outputfolder%%outputfile%
%psexec% \\%%i net localgroup Administrators /add Domain\UserName >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo ******************************************************************** >> %outputfolder%%outputfile%
)
Colw32.exe causes 100% CPU usage
rem @echo off
echo =======================================================================
echo Script To Check for Zen Issue Colw32.exe causes 100% CPU usage
echo =======================================================================
d:
set pstoolshome=D:\Util\Sysinternals\
set serverlist=%pstoolshome%servers_list.txt
set pslist=%pstoolshome%pslist.exe
set outputfolder=%pstoolshome%output\
set outputfile=server_proc_zen.txt
set filtered_file=services_ipconfig.txt
rem echo %date% %time% >> %outputfolder%%outputfile%
echo ********************************** >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
for /f %%i in (%serverlist%) do (
echo %%i >> %outputfolder%%outputfile%
%pslist% \\%%i colw32 >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo ******************************************************************** >> %outputfolder%%outputfile%
)
@echo off
echo completed
Add a Domain User to the Machines Local Administrators Group
The command:
Net Localgroup Administrators /add Domain\UserName
The add_user.bat file:
p:
cd P:\Downloads\AD Tools
set pstoolshome=C:\Util\Sysinternals\
set serverlist=%pstoolshome%servers_list.txt
set psexec=%pstoolshome%psexec.exe
set psservice=%pstoolshome%psservice.exe
set psinfo=%pstoolshome%psinfo.exe
set outputfolder=%pstoolshome%output3\
set outputfile=temp.txt
rem echo %date% %time% >> %outputfolder%%outputfile%
echo ********************************** >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
for /f %%i in (%serverlist%) do (
echo %%i >> %outputfolder%%outputfile%
%psexec% \\%%i net localgroup Administrators /add Domain\UserName >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo. >> %outputfolder%%outputfile%
echo ******************************************************************** >> %outputfolder%%outputfile%
)
Wednesday, August 18, 2010
Remember…
Lao Tzu - "Give a Man a Fish, Feed Him For a Day. Teach a Man to Fish, Feed Him For a Lifetime"
Thursday, August 12, 2010
Wednesday, July 7, 2010
Disable Loopback
I can’t remember if I have this or not:
Follow these steps to Disable the loopback check which is causing the error:
- Click Start, click Run, type regedit, and then click OK.
- In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
- Right-click Lsa, point to New, and then click DWORD Value.
- Type DisableLoopbackCheck, and then press ENTER.
- Right-click DisableLoopbackCheck, and then click Modify.
- In the Value data box, type 1, and then click OK.
- Quit Registry Editor, and then restart your computer.
Wednesday, June 30, 2010
TFS – Deleting a Team Project Collection
Use "TFSConfig.exe Collection" to delete a team project collection
- On your TFS Server open a command window (as TFS Administrator) to [TFS Install Drive]:\Program Files\Microsoft Team Foundation Server 2010\Tools
- Enter "TFSConfig.exe Collection /delete /collectionName:$COLLECTION NAME$"
- Respond to the "Are you sure" prompt
Tuesday, June 22, 2010
Enable Remote Connection on SQL Server 2008 Express
by Linglom
Introduction
Last time, I wrote an article show how to enable remote connection on SQL Server 2005 Express. Now SQL Server 2008 Express is released for a while, it doesn’t allow remote connection on default installation as on SQL Server 2005 Express. So you have to enable it manually.
If you’re trying to connect to SQL Server 2008 Express remotely without enable remote connection first, you may see these error messages:
- “Cannot connect to SQL-Server-Instance-Name
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 28 – Server doesn’t support requested protocol) (Microsoft SQL Server)” - “Cannot connect to SQL-Server-Instance-Name
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified) (Microsoft SQL Server)” - “Cannot connect to SQL-Server-Instance-Name
Login failed for user ‘username‘. (Microsoft SQL Server, Error: 18456)”
To enable remote connection on SQL Server 2008 Express, see the step below:
- Start SQL Server Browser service if it’s not started yet. SQL Server Browser listens for incoming requests for Microsoft SQL Server resources and provides information about SQL Server instances installed on the computer.
- Enable TCP/IP protocol for SQL Server 2008 Express to accept remote connection.
- (Optional) Change Server Authentication to SQL Server and Windows Authentication. By default, SQL Server 2008 Express allows only Windows Authentication mode so you can connect to the SQL Server with current user log-on credential. If you want to specify user for connect to the SQL Server, you have to change Server Authentication to SQL Server and Windows Authentication.
Note: In SQL Server 2008 Express, there isn’t SQL Server Surface Area Configuration so you have to configure from SQL Server Configuration Manager instead.
Step-by-step
- Open SQL Server Configuration Manager. Click Start -> Programs -> Microsoft SQL Server 2008 -> Configuration Tools -> SQL Server Configuration Manager.
- On SQL Server Configuration Manager, select SQL Server Services on the left window. If the state on SQL Server Browser is not running, you have to configure and start the service. Otherwise, you can skip to step 6.
- Double-click on SQL Server Browser, the Properties window will show up. Set the account for start SQL Server Browser Service. In this example, I set to Local Service account.
- On SQL Server Browser Properties, move to Service tab and change Start Mode to Automatic. Therefore, the service will be start automatically when the computer starts. Click OK to apply changes.
- Back to SQL Server Configuration Manager, right-click on SQL Server Bowser on the right window and select Start to start the service.
- On the left window, expand SQL Server Network Configuration -> Protocols for SQLEXPRESS. You see that TCP/IP protocol status is disabled.
- Right-click on TCP/IP and select Enable to enable the protocol.
- There is a pop-up shown up that you have to restart the SQL Service to apply changes.
- On the left window, select SQL Server Services. Select SQL Server (SQLEXPRESS) on the right window -> click Restart. The SQL Server service will be restarted.
- Open Microsoft SQL Server Management Studio and connect to the SQL Server 2008 Express.
- Right-click on the SQL Server Instance and select Properties.
- On Server Properties, select Security on the left window. Then, select SQL Server and Windows Authentication mode.
- Again, there is a pop-up shown up that you have to restart the SQL Service to apply changes.
- Right-click on the SQL Server Instance and select Restart.
- That’s it. Now you should be able to connect to the SQL Server 2008 Express remotely.
Tuesday, June 1, 2010
Synchronization profiles among MOSS and WSS3
Original Article
This is the BING translation:
A problem can be found working with MOSS 2007 is the synchronization between MOSS 2007 (in particular from the shared service) and the WSS content database user profiles. The reason for this problem, and the main cause of confusion is that MOSS 2007 stores user profiles information in multiple locations. In this article, we use to describe the general behavior of the user profiles on MOSS and some profiles of user between database synchronization problems.
The stage description
Let's start with WSS3. While in MOSS 2007, there are no shared services as exist in MOSS, as occurs in MOSS 2007, with WSS3 we can create one or more Web applications, so that each of the Web applications will have one or several databases of data content, on which the site collections are stored. Without deeper into these concepts (site collections, Web applications and content databases), important now is to have clear that each of the content database stores the user profile information.
This is the first point to consider, and it is very important.
We are now talking about MOSS 2007. We must not forget, MOSS 2007 extends to WSS3, on the basis of an infrastructure WSS3, MOSS 2007, incorporates and additional features.
As a result, the first thing we must be clear, is MOSS 2007 will use content WSS3 database and as a result, in the MOSS content data bases will be user profile information.
But of course, with MOSS 2007 we can configure the shared services, to import user profile information from Directory Active. Well, this is normal, but you can also import profiles from LDAP or BDC (Business Data Catalog). In this case, to import users in the shared services profile information from an external data source (Active Directory, LDAP, or BDC) the imported profile information is stored in the shared services data bases. Usually, often set up a weekly full profile import, incremental, and daily.
This second point is very important that we have found that we have two locations in which user profile information is stored in MOSS:
- In the database data content.
- On the bases of data in the shared services, when you import profiles.
To view graphically, if we enter into a MOSS 2007 site collection, we will be able to:
- Use the My Settings option to view the profile information stored in the base data content.
- Use the option to search for persons, and to display one of those included in the search result, the profile information stored in the shared services is displayed.
Now that we are clear that there are two different physical locations in which information is stored in MOSS user profiles, the question arises: <How do you synchronize user profile information between Shared Services and Content Databases ?
To perform such synchronization profiles of MOSS, are two Jobs Moss (well, there really are two Jobs by Web application) with the following name:
- Profile Synchronization. By default runs hourly, synchronizing user profiles on the bases of content data from the corresponding import profile information from the information available in the shared services.
- Quick Profile Synchronization. By default runs every minute. It is similar to the previous job, but is limited to synchronize the new user profile information.
In fact, running the command stsadm - o sync - 0 listolddatabases (eye with the scripts to copy, which sometimes are copied evil and fail commands), we can see what content databases have synchronized with the shared services, and in addition, we can also see the date of the last synchronization. The drawback of this command is instead of displaying the name of the database, sample the GUID used in MOSS to identify them (a churro of letters and numbers), so perhaps not us make very clear at a glance.
Description of problem synchronization profiles Moss
Now that we have clear scenario, it is much easier to describe the problem.
So that the synchronization of user profiles in MOSS 2007 problem (at least in the context of this article) refers to the case we configured and working properly import profiles into the shared services (for example, from Active Directory), but nevertheless not be is synchronizing the user profiles in shared services information for the database data content. As a result, information stored in the database data content, user profiles you will be running more obsolete increasingly as time goes on.
In this case, we can force synchronization of MOSS user profile information, in the following way:
- Run the following commands to force synchronization job profiles Moss (Profile Synchronization), running the following command:
Stsadm - or sync - 0 deleteolddatabases
Stsadm - or sync - IgnoreIsActive 1
Stsadm - or sync - synctiming m:1 - We hope some time, so MOSS Perfiels synchronization job can run. It is sufficient to wait five minutes (at least in the cases I have known).
- We return to configure default profiles Moss (Profile Synchronization), synchronization job running the following command:
Stsadm - or sync - synctiming h:1
This should successfully synchronize information profiles of user of the bases of data content. In fact, if we now run command stsadm - o sync - listolddatabases 0, we will have to be able to view the content data bases to successfully synchronized with the shared services.
I have only been a case that did not work. This has been when a Content database in OffLine State was set up (I mean in MOSS that we will see from the Central Administration, eye, not in SQL Server).
In some cases, when working with multiple bases of data content in a same Web application, often put all the bases of data OffLine, so when it is necessary to create a new collection sites, placed OnLine the base data content on which you want to store the information in the site collection to create (and the rest of database data contained in OffLine State) to ensure that you used the base data content desired during the creation of such a site collection.
This setting affects collateral, since the synchronization of user profiles in MOSS doesn't work with database data content in OffLine State can find us errors such as the following:
Profile synchronization for content DB Aborting 7620abb3 - 9c1a - 9125 in order - 0f19 - 957c30d8284c due to online content database
In this case, will be sufficient to make the database data content in the Online state and rerun the steps previously discussed. And with that, here peace and glory.
Related links
Finally, I wanted to take to include links to related information for those who want to investigate and deeper into this topic:
- Employee Directory using User Information List in SharePoint 2007
- MOSS User Profile Info - How the information flows
- User Account Synchonise - The User Information List and Profile Database syndrome
- User Profiles Out of Sync with AD
- Interesting nuances about SharePoint ' s (SPS-WSS) User Information list & (SPS) Profile Database
- Syncing WSS and MOSS User profile properties with Active Directory
- SharePoint 2007: All you ever wanted to know about User Profiles
[Date item: 10 23, 2009]
[Been article: closed]
[Author: GuilleSQL]
Monday, May 17, 2010
The New Camera I got...
This is the new camera I got for the trip to the Bahamas, it takes really good pictures & is easy to use plus it was a very good price.
Wednesday, May 5, 2010
Tuesday, May 4, 2010
The Script Library
The Script Library gives you Free Scripts.
The purpose of this site is to provide a central location for free scripts of many languages including Powershell, VBScript, Javascript, Perl, Python and others. Feel free…more
Tuesday, March 30, 2010
IIS Programs I have used…
IISIP - http://www.hdgreetings.com/other/Block-IP-IIS/
IISIP is a simple app that makes it easy to block spammy IPs in IIS.
- Can block multiple IPs at once unlike the IIS Admin interface
- Automatically reads in "feeds" of known IPs (for example Chinese IPs or black listed IPs)
- Easy to add your own feeds via a local txt file or URL to text file
- Works on Windows Server 2003 and Vista, both 32-bit and 64-bit
- It's free and source code is available (.NET C# all managed code)
WebKnight - http://www.aqtronix.com/?PageID=99
AQTRONIX WebKnight is an application firewall for IIS and other web servers and is released under the GNU General Public License. More particularly it is an ISAPI filter that secures your web server by blocking certain requests. If an alert is triggered WebKnight will take over and protect the web server. It does this by scanning all requests and processing them based on filter rules, set by the administrator. These rules are not based on a database of attack signatures that require regular updates. Instead WebKnight uses security filters as buffer overflow, SQL injection, directory traversal, character encoding and other attacks. This way WebKnight can protect your server against all known and unknown attacks. Because WebKnight is an ISAPI filter it has the advantage of working closely with the web server, this way it can do more than other firewalls and intrusion detection systems, like scanning encrypted traffic.
Features
Peerguardian - http://phoenixlabs.org/pg2/
PeerGuardian 2 is Phoenix Labs’ premier IP blocker for Windows. PeerGuardian 2 integrates support for multiple lists, list editing, automatic updates, and blocking all of IPv4 (TCP, UDP, ICMP, etc), making it the safest and easiest way to protect your privacy on P2P.
PeerBlock - http://www.peerblock.com/
PeerBlock lets you control who your computer "talks to" on the Internet. By selecting appropriate lists of "known bad" computers, you can block communication with advertising or spyware oriented servers, computers monitoring your p2p activities, computers which have been "hacked", even entire countries! They can't get in to your computer, and your computer won't try to send them anything either.
And best of all, it's free!
and I put them here so I can remember them! :)
Friday, February 19, 2010
Microsoft Log Parser Toolkit Companion Site
About This Companion Site
This site serves as a supplement to Microsoft Log Parser Toolkit. It hosts four free downloadable e-booklets, original working scripts to automate tasks, and an errata page.
Working Scripts
- LogParserScripts (653KB Zip File)
Corrections
- Corrections (25KB Microsoft Word document)
Four Free e-booklets
- google (847KB Adobe Acrobat file)
- snort (822KB Adobe Acrobat file)
- nessus (446KB Adobe Acrobat file)
- isa (1494KB Adobe Acrobat file)
Disclaimer
Information provided in this document is provided "as is" without warranty of any kind, either express or implied. Every effort has been made to ensureaccuracy and conformance to standards accepted at the time of publication. The reader is advised to research other sources of information on these topics.
The user assumes the entire risk as to the accuracy and the use of this document. This document may be copied and distributed subject to the following conditions:
- All text must be copied without modification and all pages must be included;
- All copies must contain the appropriate copyright notice and any other notices provided therein; and
- This document may not be distributed for profit.
How to get a flash movie in SharePoint
Alright I admit I had never displayed flash in a SharePoint site until today. I figured it would be hard and really it isn't too hard. All you need to do is upload the .SWF file to a web location (I used a document library but it could be on a different server) then add a content editor web part to your page. Now go into your content editor web part and click on source editor. Now paste the following code into the web part.
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="550" HEIGHT="400" id="myMovieName">
<PARAM NAME=movie VALUE="myFlashMovie.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="/support/flash/ts/documents/myFlashMovie.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400"
NAME="myMovieName" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
Replace myFlashMovie.swf with the url of your SWF file.
That is it. You now have a flash movie on your site.
I also found that my favorite company Smiling Goat has a web part that handles all of this for you. Go here http://www.smilinggoat.net/stuff.aspx and download the flash movie web part.
Shane
SharePoint Help
Published Wed, Mar 29 2006 22:58 by Shane
Monday, February 15, 2010
SQL Server Performance Optimization
Operating System Performance Optimization
By : Brad McGehee
Jun 15, 2005
Performance Audit Checklist
Operating System Performance Considerations
Your Configuration
Which OS version are you running?
Are the disk partitions formatted using NTFS 5.0?
Is "NTFS data file encryption and compression" turned off?
Does your server have the latest service pack?
Does your server have the most current, Microsoft-certified hardware drivers?
Is the Windows Server configured as a stand-alone server?
Is the "Application Response" setting, set to "Optimize Performance" for "Background Services?"
Has security auditing been turned on?
How large is the server's PAGEFILE.SYS swap file?
Have unnecessary services been turned off?
Have all unnecessary network protocols been turned off?
Is antivirus software being used?
Enter your results in the table above.
Configuring Your Windows Server is Easy, But Critical
The focus of this section of our performance audit is the base operating system, and how to optimize it in order to get the best performance out of SQL Server.
Like SQL Server, Windows Server is mostly self-tuning. But like SQL Server, there are things we can do to help optimize Windows' performance. And every time we help boost the performance of Windows Server, we are at the same time boosting the performance of SQL Server.
Selecting the Best Performing OS?
While SQL Server can run under Windows NT 4.0 Server, Windows 2000 and Windows 2003, the focus here is on Windows 2003, as it is the most current version of the operating system. If you are still using NT 4.0, see this URL for guidance. And if you are still using Windows 2000, see this URL for guidance.
If you want the best performance out of SQL Server, you will want to run it under Windows 2003 server, as it offers many performance improvements over Windows 2000 and NT 4.0. Some of these include:
- The ability to better take advantage of Intel hyper-threading CPUs.
- Up to 32 CPUs and 64GB of RAM are now supported using Intel chips, and up to 64 CPUs and 512GB of RAM are supported using Itanium chips.
- I/O path and disk I/O performance have been substantially boosted, while at the same time reducing the amount of CPU resources needed to service I/O requests.
If you have not upgraded your SQL Servers to Windows 2003 yet, do so as soon as you can. It will provide a quick and easy boost to your SQL Server's performance.
Are the Disk Partitions Formatted Using NTFS 5.0?
If your server is new and Windows 2000 or Windows 2003 has been recently installed, then any drives that have been formatted with it have been formatted using NTFS 5.0. But, if the server is older, and previously ran Windows NT 4.0 Server, and the drives have not been reformatted since upgrading to Windows 2000 or 2003, the disks most likely were formatted using NTFS 4.0.
While there is not a lot of difference between NTFS 4.0 and 5.0, there is enough to make the upgrade worth your while. NTFS 5.0 includes some new performance enhancements, which mean fewer disk accesses to find files, and generally overall faster disk reads. Before Windows 2000 and 2003, some DBAs formatted the drives or disk arrays dedicated to log files as FAT because it had a small performance benefit over NTFS 4.0. This is no longer true under NTFS 5.0, so all disks for all SQL Server should be formatted using NTFS 5.0 for best performance.
If you currently have a production SQL Server that is using NTFS 4.0 formatted partitions under Windows 2000, it may be difficult for you to convert them to NTFS 5.0. If this is the case, I would recommend that you not worry about this, as the performance hit is not huge. But if you are upgrading from Windows NT 4.0 server to Windows 2000, you will definitely want to reformat your drives using NTFS 5.0 to take advantage of every little performance benefit you can eek out of your server.
Is "NTFS Data File Encryption and Compression" Turned Off?
NTFS 5.0 under Windows 2000 supports both file encryption and compression, and by default, these two features are turned off on a newly installed Windows 2000 or 2003 server. While these features do provide some benefits under limited circumstances, they do not provide any benefits for SQL Server. In fact, using one or both of these features can greatly hurt performance.
As you know, SQL Server is very I/O intensive, and anything that increases disk I/O hurts SQL Server's performance. Both file encryption and compressions significantly increase disk I/O as data files have to be manipulated on the fly as they are used. So if either file encryption or compression is used on SQL Server files, performance will greatly suffer.
If you become the DBA of a currently existing SQL Server, and are not familiar with it, check to see if anyone mistakenly have turned on either of these functions. If so, and you turn them off, you will become a performance hero to all of the server's users.
Does Your Server Have the Latest Service Pack?
Every service pack I have ever seen has one or more performance enhancements. These could be because of tuning done by Microsoft, or because some previous bug has been fixed that boosts performance.
While you may not want to rush right out and install a new service pack the day it is released from Microsoft, once it has been tested positively in the real world, you should install the service pack.
Does Your Server Have the Most Current, Microsoft-Certified Hardware Drivers?
On more than one occasion, I have seen older, buggy hardware drivers cause performance problems with Windows 2000 and 2003. Most commonly, these are disk- or network-related drivers.
Periodically, you should check to see that your server has the most recent, Microsoft-certified hardware drivers. You can do this by going to the hardware vendor's website, or by using Microsoft's Update service. In some cases, you may find a new driver that is available from the vendor, but has yet to be certified by Microsoft. I recommend that you be patient and wait (assuming this is practical) for the Microsoft-certified version. While increased performance is important, software stability is even more important.
Is the Windows 2000 Server Configured as a Stand-Alone Server?
A Windows 2000 or 2003 server can be configured as either a stand-alone server or as a domain controller. For best performance, SQL Server should only run on a stand-alone server. This is because a domain controller has a lot of overhead that takes away server resources from SQL Server, hurting performance.
Is the "Application Response" Setting, Set to "Optimize Performance" for "Background Services?"
In Windows 2000, under the "Advanced" tab of the "System" icon in "Control Panel", click on "Performance Options," and you can configure what is called the "Application Response" setting. You can choose to optimize performance for either "Applications" or "Background Services". You should choose "Background services" for best SQL Server performance, as this tells the OS that you want to favor background applications, such as SQL Server, over foreground applications.
In Windows 2003, under the "Advanced" tab of the "System" icon in "Control Panel," click on the "Setting" button under "Performance," the click on the "Advanced" tab. Here, you can change the performance to favor either "Programs" or "Background services." You should choose "Background services" for best SQL Server performance, as this tells the OS that you want to favor background applications, such as SQL Serve, over foreground applications.
Also, here, you can change the memory allocation to favor either "Programs" or the "System cache." For best SQL Server performance, select "Programs." This tells the OS to give more memory to applications, such as SQL Server, rather than the system cache.
After making these changes, you will most likely have to reboot your server.
Has Security Auditing Been Turned On?
Windows 2000 and 2003 has the ability to audit virtually any activity on a server. By default, most security auditing is turned off. For best performance, no additional auditing should be turned on, as this will increase I/O activity, competing with SQL Server for the same I/O. Of course, if you have to have auditing turned on (because some manager says so), try to limit it as much as possible in order to reduce its negative effect on performance.
How Large is the Server's PAGEFILE.SYS Swap File?
Microsoft recommends that the PAGEFILE.SYS file be set to 1.5 times the amount of physical RAM. The exact amount you need depends on what additional SQL Services you may be running. For example, if you are running Full-Text Search service, Microsoft recommends that your PAGEFILE.SYS file be three times physical RAM.
Microsoft's recommendations are a good starting point, but the best way to size the PAGEFILE.SYS is to monitor how much of it is used during production using the Performance Monitor Page File Object: % Usage counter, and then resize the PAGEFILE.SYS with a minimum size just slightly larger than the amount that is actually being used (based on the Performance Monitor counter), and with a maximum size of 50MB larger than the minimum size.
The PAGEFILE.SYS setting can be viewed and changed in Windows 2000 by right clicking on "My Computer", choosing "Properties", clicking on the "Advanced" tab, clicking on "Performance Options", and clicking on the "Change" button under "Virtual Memory". If you change the virtual memory settings, you will have to reboot your server for the new settings to go into affect.
In Windows 2003, the PAGEFILE.SYS setting can be viewed and changed under the "Advanced" tab of the "System" icon in "Control Panel," click on the "Setting" button under "Performance," the click on the "Advanced" tab, and then by clicking on the "Change" button under "Virtual memory."
Have Unnecessary Services Been Turned Off?
For best performance, turn off any Windows 2000 or 2003 system services that aren't needed. This conserves both RAM and CPU cycles, helping to boost the overall performance of SQL Server.
Below are some of the operating system services (not a complete list) that are generally considered non-essential and can be turned off, if they are not used. Some of these services may not be installed on your server, and others will already be set to "Disabled" or "Manual," depending on how the server was installed and configured. Some of the services set to "Manual" are designed to only started when needed, and then to turn themselves off when no longer needed.
-
Alerter
-
Application Management
-
Clipbook
-
Distributed Link Tracking Server
-
Fax Service
-
File Replication
-
FTP Service
-
Indexing Service
-
Internet Connection Sharing
-
Intersite Messaging
-
Kerberos Key Distribution Center
-
License Logging Service
-
Logical Disk Manager Administrative Service
-
Messenger
-
Microsoft Search
-
NetMeeting Remote Desktop Sharing
-
Network DDE
-
Network DDE DSDM
-
Print Spooler Service (if you won't be printing from this server)
-
QoS RSVP
-
Remote Access Auto Connection Manager
-
Remote Procedure Call (RPC) Locator
-
Routing and Remote Access
-
RunAsService
-
Smart Card
-
Smart Card Helper
-
SMTP Service
-
Telnet
-
Utility Manager
-
Windows Installer
-
World Wide Web Service
Generally, I turn off these services (assuming they are currently on) and ensure that their "Startup Type" setting is set to "Manual." Of course, if you have a need for any of these services, you don't have to turn them off.
Have All Unnecessary Network Protocols Been Turned Off?
Generally, the only network protocol you need is TCP/IP if you are running SQL Server on it. Removing unnecessary network protocols on your SQL Servers helps by reducing the load on the server and by reducing unnecessary network traffic.
Is Antivirus Software Being Used?
•Real-time antivirus software creates a big resource hog for SQL Server, and is not recommended on production SQL Servers, especially clusters.
If you are worried about viruses, you can do remote scanning against your SQL Servers on a daily basis, preferably during off hours.
Now What?
Your goal should be to perform this part of the performance audit, described on this page, for each of your SQL Servers, and then use this information to make changes, if you can.
Once you have completed this part of the performance audit, you are now ready to audit your SQL Server's configuration.
Friday, January 22, 2010
Sorting a Dropdownlist!!
Hi,
Today while workin on a project, i came across a situation where i need to sort the item in a dropdownlist. Unfortunately, there is no sort method available to the Dropdownlist and other ListItem containers. So i need to write it of my own, the functionality to sort the items. Here is code for you, if any needs!
-- Write these 2 classes in any of your class file.
-- Usage General.SortDropDownList(dropdownlist);
1 public class General {
2 public static void SortDropDownList(DropDownList ddlList) {
3 ArrayList arl = null;
4 if (ddlList.Items.Count > 0) {
5 arl = new ArrayList(ddlList.Items.Count);
6 foreach (ListItem li in ddlList.Items) {
7 arl.Add(li);
8 }
9 }
10 arl.Sort(new ListItemComparer());
11 ddlList.Items.Clear();
12 for (int i = 0; i < arl.Count; i++) {
13 ddlList.Items.Add(arl[i].ToString());
14 }
15 }
16 }
17
18 public class ListItemComparer : IComparer {
19 #region IComparer Members
20 public int Compare(object x, object y) {
21 ListItem lix = (ListItem)x;
22 ListItem liy = (ListItem)y;
23 CaseInsensitiveComparer c = new CaseInsensitiveComparer();
24 return c.Compare(lix.Text, liy.Text);
25 }
26 #endregion
27 }
Thanks