Tuesday, July 15, 2008

IIS startup after install for .Net 2.0

Find the latest version of .net (like v1.0.x or v1.1.x or v2.0.x) looking in: C:\Windows\Microsoft.Net\Framework\
Run this command: "net stop w3svc" to stop web services
Run "aspnet_regiis.exe -ua" to uninstall all instances of ASP.NET from IIS
Now run "aspnet_regiis.exe -i" to install ASP.NET into IIS
Finally restart web services with "net start w3svc"

Tuesday, June 3, 2008

No Longer Sharepoint Admin

Well, I took the plunge and traded hats: Sharepoint Admin for Clarion Programmer. I left CMI for CAT2 on May 16th. I've been training in Clarion 5.5 and 6.3 for 2 weeks now, and I am very near to beginning my first real assignment.

I'll let you know how I do on this soon!

Thursday, May 1, 2008

SharePoint Subsite Move Up 1 Level

by Zac Smith, 9 July 2007
Had a situation recently where I needed to promote a subsite to a top level site. As STSADM backup/restore can only be used at the site collection level, a different approach was required.
As of WSS v3, there are two new STSADM commands - import and export.
The basic procedure to promote the subsite was to STSADM export the site to a file and then STSADM import it at the toplevel.
Here are the basic commands I used:

Export subsite
stsadm -o export -url http://toplevel/sub_site/subsite -filename c:\subsite.bak -includeusersecurity -versions 4

Import subsite
stsadm -o import -url http://toplevel/subsite/ -filename c:\subsite.bak -includeusersecurity

A couple of things to note:
The -includeusersecurity switch ensures that all the columns such as modifed by, created by are maintained.

The -versions 4 switch will ensure that all versions of list items/documents are exported.

You must import/export to sites that share the same template. So a team site can only be exported and imported into another team site. You will know you are trying to import into non matching templates if you get the following error:

"The exported site is based on the template STS#1 but the destination site is based on the template STS#0"

This means that a site based on the blank template is trying to be imported into a site based on the team template. To my knowledge there is no easy way of changing a sites templates.
The following lists some of the common WSS templates:

Team SiteSTS#0
Blank SiteSTS#1
Document WorkspaceSTS#2
Wiki SiteWIKI#0

Wednesday, April 23, 2008

NPC Skill Chart

Detail Green Rookie RegularVeteran Expert Elite
Initiative12 3 4 5 6
Observation 6 8 10 12 14 16
Primary Wpn. Skill 1 2-3
4-5 6-78-9 9-10
Avg. Stat. 3 4 56 7 8
Wpn. Bonus 45% 55%65% 70%75% 80%
Armor Bonus 40% 50% 55% 60% 65% 75%
Gear Bonus 35% 40%
45% 50%55% 70%
Loyalty Base 12 46 8 10
Loyalty Bonus -2 -1 0 2 4 6

Monday, April 14, 2008

SQL 2005 would not let me drop a database

I did some digging to see if there was a 'real' reason for this. All I could find was the the database was in use.

I found this t-sql script to help me find out why the db was in use.

USE Master

DECLARE @dbname nvarchar(40)
SET @dbname = '[your_db_name_here]'
SELECT @dbid = dbid FROM sys.sysdatabases WHERE name = @dbname

IF EXISTS (SELECT spid FROM sys.sysprocesses WHERE dbid = @dbid)
--RAISERROR ('The restore cannot be done', 16, 1)
SELECT 'These processes are blocking the db in question' AS Note,
spid, last_batch, [status], hostname, loginame FROM sys.sysprocesses
WHERE dbid = @dbid
SELECT 'There were no SPIDS using the database: ' + @dbname as Note

I ran this t-sql and saw that I had a single SPID (51) that was connected to my database. I executed 'kill [spid]' and then tried my drop db command again. Of course it didn't work. I then ran this script repeatedly by highlighting the code ind the SQL Server Management Studio code window and pressed F5 over and over until I could see that the command to drop the db was working.

Not sure why that SPID kept reappearing. But the problem is fixed.

Wednesday, March 5, 2008

T2K Base Hit Numbers (d20)

We talked about posting a new hit chart including point blank and extreme range.
So I'll post the table here...

SkillPB (+6)Short (+4)Med (+2)Long (stat)Ext (-4)
10 16 1412 106
9 15 13 11 9 5
8 14 12 10 8 4
7 13 11 9 7 3
6 12 10 8 6 2
5 11 9 7 5 1
4 10 8 6 4 -
3 9 7 5 3 -
2 8 6 4 2 -
1 7 5 3 1 -

Stat1 2 3 4 5 6 7 8 9 10
Adj.-3 -2 -2 -1 0 +1 +1 +2 +2 +3

Tuesday, March 4, 2008



(and so on)

ProjectServer 2007 Project Not Showing In Project Center

This one had me stumped for over a week! (Embarrased about this, now that I know how easy it should have been.)
Could see project from Project Professional by viewing Project Center.
Could *NOT* see project from PWA by viewing Project Center.
Make sure you posted project to correct PWA server. (use profiles if necessary)
  1. Open Project Professional
  2. Click File - Open - (choose "Retrieve the list of all projects from Project Server" in the list of previously opened projects) and click Open
  3. Choose Project from list (if project does not appear, you have connected to the wrong PWA source)

Now: Choose File - Publish (it's that easy!)

To create profiles:

  1. Tools - Enterprise Options - Micorosoft Office Project Server Accounts
    or Alt T - E - P
  2. Make sure your URL appears in the list with your domain name as the name used in the project --- if not, click Add and complete the form as needed
  3. If you have multiple PWA sources, choose the "Manully control connection state" radio button on this utility

Happy Servering!

Monday, February 18, 2008

Question: DB from SQL 2005 to SQL 2000

When initially trying to migrate SharePoint databases from the same machine that is running the whole FARM, I got this error:

SqlException: Too many backup devices specified for backup or restore; only 64 are allowed. RESTORE DATABASE is terminating abnormally.

Afer researching this, I discovered that it should work after upgrading the SQL 2000 engine to SP4 (as we had SP3). Over the weekend, we upgraded our production database to SP4. Then I tried the SharePoint restore to that production database again
(using stsadm -o restore -directory \\server2\disks\sharepointbackup -restoremethod new and applying the new db server name, server db and log file location, and then the new db names). The new error is:

SqlException: The backed-up database has on-disk structure version 611. The server supports version 539 and cannot restore or upgrade this database. RESTORE DATABASE is terminating abnormally.

If anyone else is having a similary issue and knows how to get around this, please post a comment or email me.

Friday, February 15, 2008

osql query to text file - thanks to Brain Knight

Piping a Query to a Text File
By Brian Knight, 2001/05/21

The case where one has to send the results of a query to a text file comes up quite often. General this case take the form of a maintenance script that you run through Agent nightly and would like to see the results in the morning.
In the above example, you can create a CMDEXEC job to run the below command. This will output the results of the query inside c:\inputquery.txt to a separate file.

\mssql7\binn\osql -Usa -Ppassword -Ic:\inputquery.txt -Oc:\outputdir\output.txt

You can also use -E switch for trusted connection if you don't want to hard code a password into your job. From an Query Analyzer window or inside the stored procedure you can run the above statement with an extended stored procedure called XP_CMDSHELL:

master..xp_cmdshell 'osql
-Q"select * from products"

The -Q parameter in the above syntax runs the query then exits ISQL. You may also want to add the additional NO_OUTPUT parameter at the end of query as shown below to supress any output to the client:

master..xp_cmdshell 'osql
-Q"select * from products"
-oc:\output.txt', no_output

There are other methods of piping a query to a text file by using OLE Automation but they are much more complex than this method.

By Brian Knight, 2001/05/21

usage: osql [-U login id] [-P password]
[-S server] [-H hostname] [-E trusted connection]
[-d use database name] [-l login timeout] [-t query timeout]
[-h headers] [-s colseparator] [-w columnwidth]
[-a packetsize] [-e echo input] [-I Enable Quoted Identifiers]
[-L list servers] [-c cmdend] [-D ODBC DSN name]
[-q "cmdline query"] [-Q "cmdline query" and exit]
[-n remove numbering] [-m errorlevel]
[-r msgs to stderr] [-V severitylevel]
[-i inputfile] [-o outputfile]
[-p print statistics] [-b On error batch abort]
[-O use Old ISQL behavior disables the following]
batch processing
Auto console width scaling
Wide messages
default errorlevel is -1 vs 1
[-? show syntax summary]

Thursday, February 14, 2008

Petit Jean National State Park, 2006

Here are my boys, my daughter, and 2 of my neices and 2 of my nephews. This pic was taken at Petit Jean Ntl Park during the winter of 2006. Here's a mountaintop view of the beautiful falls there.

IPTV at the Coppock Household

The day has finally arived! A box shipped today from the company we've chosen to replace Charter Communication as our TV entertainment provider. We chose Sky Angel (www.skyangel.com) due to the now available Family Package along with their Faith Package. We were blowing through about $80/month to have digital cable (expanded basic). Now, through our broadband connection, we are watching TV over our home network. (They even have the Miliary Channel and NFL Network!) And the best part so far is that the commercials are not offensive, violent, sexually suggestive, or in any way a thing that would cause myself or my wife to yell out, "Close your eyes!" or "Don't look!" We are a family that loves God, and chooses to please Him. We couldn't be happier with our choice to drop cable and go with IPTV. If you are interested, you'll look at the price difference. I don't want to post them; I am not trying to be as salesman for them.

IIS 7.0 Config change

This command-line execution will correctly configure your IIS settings after they get hosed by inadvertent changes or applications that make unwanted changes.

From: Drew Coppock
Sent: Wednesday, November 07, 2007 3:27 PM
To: Drew Coppock
Subject: IIS 7.0 Config change

C:\Windows\system32\inetsrv\APPCMD.EXE set app "Default Web Site/" /applicationPool:"Classic .NET AppPool"

Should see
APP object "Default Web Site/" changed

Did I mention I am a Cubmaster?

Yep, it's true. I am the Cubmaster for Agape Church Cub Scout Pack 70 in Little Rock, Arkansas. Need to ask me about this? email me.
Check out the BLOG for our Pack - http://quapawpack70.blogspot.com/
Check out the BLOG for our Troop - http://quapawtroop70.blogspot.com/

SQL 2005 User migration script

I found this script very useful when migrating databases from 2000 to 2005. The security accounts were successfuly imported with the tables and views, but none of them worked properly. This script fixed things in a jiffy!

----- Begin Script, Create sp_help_revlogin procedure -----

USE master


IF OBJECT_ID ('sp_hexadecimal') IS NOT NULL

DROP PROCEDURE sp_hexadecimal


CREATE PROCEDURE sp_hexadecimal

@binvalue varbinary(256),

@hexvalue varchar(256) OUTPUT


DECLARE @charvalue varchar(256)

DECLARE @i int

DECLARE @length int

DECLARE @hexstring char(16)

SELECT @charvalue = '0x'

SELECT @i = 1

SELECT @length = DATALENGTH (@binvalue)

SELECT @hexstring = '0123456789ABCDEF'

WHILE (@i <= @length) BEGIN DECLARE @tempint int DECLARE @firstint int DECLARE @secondint int SELECT @tempint = CONVERT(int, SUBSTRING(@binvalue,@i,1)) SELECT @firstint = FLOOR(@tempint/16) SELECT @secondint = @tempint - (@firstint*16) SELECT @charvalue = @charvalue + SUBSTRING(@hexstring, @firstint+1, 1) + SUBSTRING(@hexstring, @secondint+1, 1) SELECT @i = @i + 1 END SELECT @hexvalue = @charvalue GO IF OBJECT_ID ('sp_help_revlogin') IS NOT NULL DROP PROCEDURE sp_help_revlogin GO CREATE PROCEDURE sp_help_revlogin @login_name sysname = NULL AS DECLARE @name sysname DECLARE @xstatus int DECLARE @binpwd varbinary (256) DECLARE @txtpwd sysname DECLARE @tmpstr varchar (256) DECLARE @SID_varbinary varbinary(85) DECLARE @SID_string varchar(256) IF (@login_name IS NULL) DECLARE login_curs CURSOR FOR SELECT sid, name, xstatus, password FROM master..sysxlogins WHERE srvid IS NULL AND name <> 'sa'



SELECT sid, name, xstatus, password FROM master..sysxlogins

WHERE srvid IS NULL AND name = @login_name

OPEN login_curs

FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @xstatus, @binpwd

IF (@@fetch_status = -1)


PRINT 'No login(s) found.'

CLOSE login_curs

DEALLOCATE login_curs



SET @tmpstr = '/* sp_help_revlogin script '

PRINT @tmpstr

SET @tmpstr = '** Generated '

+ CONVERT (varchar, GETDATE()) + ' on ' + @@SERVERNAME + ' */'

PRINT @tmpstr


PRINT 'DECLARE @pwd sysname'

WHILE (@@fetch_status <> -1)


IF (@@fetch_status <> -2)



SET @tmpstr = '-- Login: ' + @name

PRINT @tmpstr

IF (@xstatus & 4) = 4

BEGIN -- NT authenticated account/group

IF (@xstatus & 1) = 1

BEGIN -- NT login is denied access

SET @tmpstr = 'EXEC master..sp_denylogin ''' + @name + ''''

PRINT @tmpstr


ELSE BEGIN -- NT login has access

SET @tmpstr = 'EXEC master..sp_grantlogin ''' + @name + ''''

PRINT @tmpstr



ELSE BEGIN -- SQL Server authentication

IF (@binpwd IS NOT NULL)

BEGIN -- Non-null password

EXEC sp_hexadecimal @binpwd, @txtpwd OUT

IF (@xstatus & 2048) = 2048

SET @tmpstr = 'SET @pwd = CONVERT (varchar(256), ' + @txtpwd + ')'


SET @tmpstr = 'SET @pwd = CONVERT (varbinary(256), ' + @txtpwd + ')'

PRINT @tmpstr

EXEC sp_hexadecimal @SID_varbinary,@SID_string OUT

SET @tmpstr = 'EXEC master..sp_addlogin ''' + @name

+ ''', @pwd, @sid = ' + @SID_string + ', @encryptopt = '



-- Null password

EXEC sp_hexadecimal @SID_varbinary,@SID_string OUT

SET @tmpstr = 'EXEC master..sp_addlogin ''' + @name

+ ''', NULL, @sid = ' + @SID_string + ', @encryptopt = '


IF (@xstatus & 2048) = 2048

-- login upgraded from 6.5

SET @tmpstr = @tmpstr + '''skip_encryption_old'''


SET @tmpstr = @tmpstr + '''skip_encryption'''

PRINT @tmpstr



FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @xstatus, @binpwd


CLOSE login_curs

DEALLOCATE login_curs



----- End Script -----

To make SQL Server Express 2005 work in Management Studio

1. Run SAC (Surface Area Configuration)
2. Add authority for user
3. Run Configuration Manager
4. Set to run as Local System, not Network Service
5. Should restart automatically

Wednesday, February 13, 2008


My younger brother and his 2 oldest sons play Twilight 2000 with me. We will post some gaming details here.


Greets! I am excited to have finally gotten started in the whole blogging world. This has all happened at the bequest of a certain blogger I met just today. (Robin Meuré) I say met, but actually, I just IM'd with him. He asked me if I had a blog. I had to admit reluctantly that I had not taken that step as yet. His is glorix.blogspot.com.

I will be posting on different topics on this blog. Topics will include my professional life and skills I have developed, as well as important issues to me (like family life).

My professional life has given me the opportunity to grow in many different areas, but not excel enough to be a guru in any area. I have been doing HTML since 1997, a skill I picked up while killing time at the University of Central Arkansas' Computer Science Unix Lab. In 1998, I started an internship with Acxiom Corp (http://www.acxiom.com/) working on their Y2k intranet. In 1999, I started full time with them in an R&D group, doing VBScript (ASP) and Javascript to provision a site for their much-touted Acxiom Data Network. While working, I picked up some T-SQL skills, and SQLServer skills, but not enough to succeed at being a DBA. (Which just happened to be my next gig.) In 2003, I moved on to work for a 1-man shop doing T-SQL, DTS Packages, and batch scripts for automation as a consultant with Alltel. After 6 months of this, I moved on to a small company in the area who shut their doors after I worked for them for 2 weeks. I then moved on to work as a consultant for the state as an area coordinator. While doing this work, I maintained the web site and database. I stuck with this consultancy role far too long. I ended up being hired by the state in 2005 to fill a role that was not IT related. I just considered all my IT skills a bonus. So did the director. In total, I filled that role for a year and a half. During that time, I was able to attend an ASP.Net training class at Complete Computing (http://www.complete.com/). I left this role for the opportunity to be a consultant for this division, but according to the lawyers, a state employee may not leave the employ of the state and subsequently enter into a consultancy until after a 12 month time period has passed. So, I moved on to my next gig; working for a school district's IT department, doing ASP, ASP.Net, T-SQL, Javascript, HTML, and heavy DHTML. I moved on after 6 months of fun. Since 2006, I've been with a company serving as a Solutions Developer, working on VBA, VB.Net, ASP.Net, DotNetNuke, T-SQL, DTS Packages, SQLServer 2000 and 2005, as well as my HTML/DHTML and Javascript.

That's enough about work. Now for a little about my family. I've been married to my wife since 1995, and we have 2 boys who are 9 and 6. We also have a daughter who is 17. She is mine, but many people say she looks enough like my wife that folks cannot tell. All of my family currently live in Arkansas. My Mom lives a bit more than an hour away in North Central Arkansas. My Dad lives in Conway, my sister and her family live in Conway, and my younger brother and his family live in Conway. My older brother and his family live west of Little Rock. So I can visit any of my family within about an hour drive. We are a very close family, and we celebrate our closeness as often as we can. We enjoy food. Can I say that again? We enjoy putting a feed on! I may end up posting some of our favorite recipies here, too! (Not too many, though!) This is a guy's blog, after all.

Enough of the introductions. I'll post some more later.
Thanks for visiting!