Monday, August 2, 2010

Updating the TEMPDB

Here's a quick/dirty little script to update your tempdb for SQL to 5GB for the tempdev (tempdb.mdf) file and 512MB for the templog (templog.ldf) file while at the same time turning off Auto Growth.


USE [master]

GO

ALTER DATABASE

[tempdb]

MODIFY FILE

(NAME = N'tempdev', SIZE = 5242880KB , FILEGROWTH = 0)

GO

ALTER DATABASE

[tempdb]

MODIFY FILE

(NAME = N'templog', SIZE = 524288KB , FILEGROWTH = 0)

GO


The restart your SQL Server Agent and SQL Server Services. Mine is on a cluster with the instance named SQL1.  If you are running on an MS Cluster, then you should probably do this via the Cluster Administrator console because even though the services may be online, the cluster admin console may report them to be in a failed state.



net stop SQLAgent$SQL1 & net stop MSSQL$SQL1

net start MSSQL$SQL1 & net start SQLAgent$SQL1




And yes, you can run a single command with that little ampersand (&) thingy there. :)

Here's an example of setting a TempDB with the following:

mdf file at 15GB, max size of 17.5GB, and growth at 10%

ldf file at 1.5GB, max size of 1.8 GB, and growth set to 10%
USE [master]
GO
ALTER DATABASE [tempdb]
MODIFY FILE ( NAME = N'tempdev',
SIZE = 15728640KB ,
MAXSIZE = 18350080KB,
FILEGROWTH = 10% )
GO
ALTER DATABASE [tempdb]
MODIFY FILE ( NAME = N'templog',
SIZE = 1572864KB ,
MAXSIZE = 1835008KB,
FILEGROWTH = 10% )
GO

Special note: If you copy/paste the code from the block-quotes above, and then try to run them in SQL Management Studio, you might notice them failing.  Try updating the single quotes from  around the file names, tempdev and templog.

Sunday, May 16, 2010

Zen of Attraction

If Less Is More, Then Nothing Is Everything

1. Promise Nothing

Just do what you most enjoy doing.

Hidden benefit: You will always over-deliver.

2. Offer Nothing

Just share what you have with those who express an interest in it.

Hidden benefit: Takes the pressure off of wanting other people to see you as valuable or important.

3. Expect Nothing

Enjoy what you already have. It’s plenty.

Hidden benefit: You will realize how complete your life is already.

4. Need Nothing

Just build up your reserves and your needs will disappear.

Hidden benefit: You boundaries will be extended and filled with space.

5. Create Nothing

Just respond well to what comes to you.

Hidden benefit: Openness.

6. Hype Nothing

Let quality sell by itself.

Hidden benefit: Trustworthiness

7. Plan Nothing

Take the path of least resistance.

Hidden benefit: Achievement will become effortless.

8. Learn Nothing

Let your body absorb it all on your behalf.

Hidden benefit: You will become more receptive to what you need to know in the moment.

9. Become No One

Just be more of yourself.

Hidden benefit: Authenticity.

10. Change Nothing

Just tell the truth and things will change by themselves.

Hidden benefit: Acceptance.

Thursday, May 6, 2010

Eseutil /Y Copy File Mode on non-Exchange Server

The ability of Eseutil to copy large files is a capability introduced in Exchange Server 2003 that has been imported from ESEFile. The copy file mode is optimized to copy very large files efficiently. You can use the switch to copy a database, streaming file, or log file. However, the mode is not suited as a general purpose copy utility.

You can use the Eseutil /Y switch to copy a database, streaming file, or log file. For best speed and stability, you should run Eseutil /Y from a local command prompt on the copy destination server rather than from an intermediate location

From Server 2
ESEUTIL /Y \\server1\d$\priv1.edb /D\\server2\d$\priv1.edb

NOTE! Don't forget to provide the file name at the destination. Otherwise, you will get an error message.
Copying c:\program files\exchsrvr\mdbdata\priv1.edb to c:\Foldername

FAILURE: CreateFile: Access is denied

Eseutil /D Defragmentation Mode
Eseutil /P Repair Mode
Eseutil /C Restore Mode
Eseutil /R Recovery Mode
Eseutil /G Integrity Mode
Eseutil /M File Dump Mode
Eseutil /K Checksum Mode
Eseutil /Y Copy Mode

To run ESEUTIL on a non-Exchange system, follow these steps:

  1. Copy Eseutil.exe, Ese.dll, Jcb.dll, Exosal.dll, and Exchmem.dll from Exchange Server's Exchsrvr\bin folder to a folder on the non-Exchange server.

  2. Run the desired ESEUTIL commands against the copied database.

Tuesday, May 4, 2010

Adding the Knowledge Base site template for MOSS 2007

stsadm -o addsolution -filename C:\Bits\KnowledgeBase.wsp

stsadm -o deploysolution -name KnowledgeBase.wsp -allowgacdeployment -immediate

WSS Central Administration site.
Click the Operations tab, and
then click Solution management under global configuration.

After all the solutions are marked Globally Deployed,

run iisreset from the command line.
http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx