Microsoft RichCopy batch script example

@ECHO OFF
:: Batch script example for Microsoft RichCopy 4.x
:: Ref: http://blogs.technet.com/b/ken/archive/2009/04/29/multi-threaded-file-copy-richcopy.aspx#3372805 
:: Save as richcopyfolder.bat and go to sleep.

CALL:RICHCOPYFOLDERS "D:\DATA\Source\2010\12\" "\\FileServer\Data\Destination\2010\12"
CALL:RICHCOPYFOLDERS "\\FileServer\Data\Destination\2010\12" "\\FileServerArchive\Data\Destination\2010\12"

GOTO :EOF

:RICHCOPYFOLDERS
SET src=%1
SET dst=%2

SET opt=/NE /NC /QN /TS 256 /SC 10000 /TD 256 /TP 2 /FC 4096
SET rcpath="C:\Program Files (x86)\Microsoft Rich Tools\RichCopy 4.0\RichCopy64.exe"
SET parms=%opt% %src% %dst%

ECHO %rcpath% %parms% >>CopyLog.log
%rcpath% %parms%

GOTO :EOF

Cisco AnyConnect CLIENT v2.4 – “UNABLE TO ESTABLISH VPN” | eGROUP Blogs!

ESET ATE MY...
Cisco AnyConnect CLIENT v2.4 – “UNABLE TO ESTABLISH VPN” | eGROUP Blogs!
But I'm ok with it now.

Export data from SQL Server to Excel

Note to self: Export data from SQL Server to Excel

bkite archive

Archived Brightkite posts

Preview this bundle

SQL Partitioning script, Function and Scheme

/* 
DROP partition SCHEME PS_MIH
DROP partition FUNCTION PF_MIH
*/
--// Script Table Partition by Week/Month
SET NOCOUNT ON
DECLARE
@TableName VARCHAR(128)
, @PartitionBy VARCHAR(128)
, @BoundaryType VARCHAR(15)
, @TimeInterval VARCHAR(15)
, @StartingTime DATETIME
, @NumberOfPartitions INT

DECLARE
@PartionCounter INT
, @tmpBoundary CHAR(19)
, @SQLCMD VARCHAR(MAX)
, @CREATE_SCHEMA VARCHAR(MAX)
, @GOBANANA BIT

SELECT
@TableName = 'MIH'
, @PartitionBy = 'MIHDateCreated'
, @BoundaryType = 'RIGHT'
, @TimeInterval = 'MONTH'
, @StartingTime = '05/01/2010'
, @NumberOfPartitions = 260 --520 --// 5 years
--// BE SURE TO DO DRY RUNS. One known limitation is VARCHAR(MAX) = 8000 char
--// The create partition Schema script is stored in variable
, @GOBANANA = 0

DECLARE @tmpIntervals TABLE(ID INT IDENTITY(1,1), Boundary CHAR(19))
--// Lets get this party started
SELECT
@tmpBoundary = @StartingTime
, @PartionCounter = 1
, @CREATE_SCHEMA = 'CREATE PARTITION SCHEME [PS_'
+ @TableName + '] AS PARTITION [PF_' + @TableName + '] TO ([PRIMARY]'

IF @NumberOfPartitions > 1000
BEGIN
PRINT 'Too many partitions. Limit, for SQL 2005 is 1000 which equates to (8000 Char)'
RETURN
END

WHILE @PartionCounter < @NumberOfPartitions AND @tmpBoundary IS NOT NULL
BEGIN

SELECT
@tmpBoundary = CONVERT(CHAR(19),CASE
WHEN @TimeInterval = 'WEEK' THEN DATEADD(wk,@PartionCounter, @StartingTime)
WHEN @TimeInterval = 'MONTH' THEN DATEADD(mm,@PartionCounter, @StartingTime)
ELSE NULL END ,126) --// Format 2010-01-01T00:00:00

IF @PartionCounter = 1
BEGIN
--// Magic Time
SELECT @SQLCMD = 'CREATE PARTITION FUNCTION [PF_'
+ @TableName + '](DATETIME) AS RANGE RIGHT FOR VALUES(''' + @tmpBoundary + ''')'

PRINT @SQLCMD
IF @GOBANANA = 0 EXEC (@SQLCMD)

END
ELSE
BEGIN
SELECT @SQLCMD = 'ALTER PARTITION FUNCTION [PF_' + @TableName + ']()'
+ ' SPLIT RANGE (''' + CONVERT(CHAR(19),@tmpBoundary, 126) + ''');'

PRINT @SQLCMD
IF @GOBANANA = 0 EXEC (@SQLCMD)
END

SELECT
@CREATE_SCHEMA = @CREATE_SCHEMA + '
,[PRIMARY]'-- + CASE WHEN @NumberOfPartitions - @PartionCounter = 1 THEN '' ELSE ',' END
, @PartionCounter = @PartionCounter + 1
END

IF @PartionCounter = 0
BEGIN
PRINT 'Something not right.'
RETURN
END

SELECT @CREATE_SCHEMA = @CREATE_SCHEMA + ')'
PRINT @CREATE_SCHEMA
IF @GOBANANA = 0 EXEC (@CREATE_SCHEMA)

/*
At this point you now need to apply the partion

1. Drop any existing Clustered Index
2. Transaction recommended
3. Following is tail end of Partion Wizard Script
ALTER TABLE [dbo].[MIH] DROP CONSTRAINT [PK_MIH]

ALTER TABLE [dbo].[MIH] ADD CONSTRAINT [PK_MIH] PRIMARY KEY NONCLUSTERED
(
[MIHID] ASC
)WITH (PAD_INDEX = OFF,
STATISTICS_NORECOMPUTE = OFF,
SORT_IN_TEMPDB = OFF,
IGNORE_DUP_KEY = OFF,
ONLINE = OFF,
ALLOW_ROW_LOCKS = ON,
ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

CREATE CLUSTERED INDEX [ClusteredIndex_on_PS_MIH_634250676763125000] ON [dbo].[MIH]
(
[MIHDateCreated]
)WITH (SORT_IN_TEMPDB = OFF,
IGNORE_DUP_KEY = OFF,
DROP_EXISTING = OFF,
ONLINE = OFF) ON [PS_MIH]([MIHDateCreated])


DROP INDEX [ClusteredIndex_on_PS_MIH_634250676763125000] ON [dbo].[MIH] WITH ( ONLINE = OFF )

*/

More to share

"A Hero is an ordinary individual who finds the strength to persevere and endure in spite of overwhelming obstacles."
— Christopher Reeve

Leadership Quotes

Oprime find

Funny find of the morning: Church Of Optimus Prime

TurnKey Fileserver, Extplorer and SSL


note to self:
/etc/ssl/certs/cert.pem
save original, then replace
with valid .pem which should contain:

-----BEGIN RSA PRIVATE KEY-----
jibberinshh......
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
jibberinshh......
-----END CERTIFICATE-----

The webmin section can be managed within webmin but this is for extplorer, AFAIK.

Manhunt to figure this out, as not a seasoned linux monkey. Found this, which led me to "grep ':443'/etc/* -r" in attempts to find a reference file. Using CoreFTP, /etc/lighttpd/conf-enabled/ list folders, so i couldn't just edit away:

Really strange, or I just haven't grasped something yet.

Oh well, after I replaced the cert.pem and ran "/etc/init.d/lighttpd force-reload", my certificate changed in extplorer and showed as valid.
YAY!!!.

FYI, I used a wildcard certificate.

How to alter multiple columns with T-SQL(sort of)

--//1. Create a table. I see this a lot :-(.
CREATE TABLE myLameTbl(
ID INT Identity(1,1)
, FirstName VarChar(10)
, LastName VarChar(15)
, FavoriteURL1 VarChar(45)
, FavoriteURL2 VarChar(45)
, FavoriteURL3 VarChar(45)
, FavoriteURL4 VarChar(45)
, FavoriteURL5 VarChar(45)
)

--//2. insert some data
INSERT INTO myLameTbl
SELECT
'Bob'
,'Mihada'
,'http://www.databasejournal.com'
,'http://www.google.com/'
,'http://www.turnkeylinux.org/'
,'http://www.facebook.com/'
,'http://www.bobmihada.com/'

SELECT * FROM myLameTbl

--// 3. Unknowningly insert more than table allows.
--// Coming soon: String or binary data would be truncated.
UPDATE myLameTbl
SET FavoriteURL5 = 'http://www.bobmihada.com/2010/11/how-to-alter-multiple-columns-with-t.html'

--// 4. Curse the developer who created said table.
--// 5. Get on with it. Mitigate risk with this script. Review/Execute the printed command.
--// Alters that increase character size should take seconds.
--// As oppose to the SSMS GUI, design and save, always timesout.
--//---------------------------------------------------
DECLARE @SXML as VARCHAR(MAX)
SELECT @SXML = REPLACE((
SELECT
'ALTER TABLE ' + TABLE_NAME
+ ' ALTER COLUMN ' + COLUMN_NAME
+ ' VARCHAR(255)
GO
'
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME ='myLameTbl'
AND COLUMN_NAME LIKE 'FavoriteURL[1-9]'
FOR XML PATH('')
),'&#x0D;','')
PRINT @SXML
--//---------------------------------------------------
--//---------------------------------------------------

--// 6. review your change and smile.
SELECT
TABLE_NAME
,COLUMN_NAME
,DATA_TYPE
,CHARACTER_MAXIMUM_LENGTH
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME ='myLameTbl'
AND COLUMN_NAME LIKE 'FavoriteURL[1-9]'

--//7. lets try step #3 again
UPDATE myLameTbl
SET FavoriteURL5 = 'http://www.bobmihada.com/2010/11/how-to-alter-multiple-columns-with-t.html'

Another OMG moment.."near capacity"

I don't know what to say, to myself...


Short of all the "reasons" for how I got stuck at this point:

Event Type: Warning
Event Source: Srv
Event Category: None
Event ID: 2013
Date: ?/?/2010
Time: Does it really matter?
User: N/A
Computer: BOBSQL
Description:
The F: disk is at or near capacity. You may need to delete some files.


Yes, that is one of the primary disk for SQL. Short answer, someone running bad, bad, bad, ETL, freaked out the DB to grow like crazy.

Now what?If anything else triggers a grow, inevitable, SQL is toast. Find that GAME FACE and MIH, ninja style....

High level summary
  1. Procure additional disk space, without shutting down? A. ISCSI
  2. Backup offending DB, or which ever you wish to move off (ensure Full Recovery mode). I choose "BOBTRENDS"
  3. Restore backup to new space as BOBTRENDS_NEW. Note: ensure your file names include "_NEW" (e.g. I:\SQL_DATA\BOBTRENDS_NEW_Data.MDF) and WITH NORECOVERY.
  4. Prep SQL scripts: Rename existing db and files. Rename New db, drop new, rename files, attach as original name

oh man. ready? Everything below is geared for my environment, adjust accordingly. Eh, don't try to run in one shot, murphy's watching you.

USE [MASTER]
GO
--// -------------------------------------
--// Step 1. Backup Current
--// -------------------------------------
BACKUP DATABASE [BOBTRENDS] TO DISK ='Q:\FULL_SQL_BK\BOBTRENDS_2010xxxx_1130_FULL.hbc'
GO
--// -------------------------------------
--// Step 2. Restore to new space
--// -------------------------------------
RESTORE DATABASE [BOBTRENDS_NEW]
FROM DISK= 'Q:\FULL_SQL_BK\BOBTRENDS_2010xxxx_1130_FULL.hbc'
WITH
MOVE 'BOBTRENDS_Data' TO 'I:\SQL_DATA\BOBTRENDS_NEW_Data.MDF' --// This the fatty
,MOVE 'BOBTRENDS_Fast' TO 'G:\SQL_FAST\BOBTRENDS_NEW_Fast.ndf'
,MOVE 'BOBTRENDS_Log' TO 'E:\SQL_LOGS\BOBTRENDS_NEW_Log.LDF'
, NORECOVERY, STATS=10
GO
--// -------------------------------------
--// Step 3. Close shop, emergency restroom break?
--// -------------------------------------
--// Sorry people, I gotta boot you, 5 minutes I promise :-O
;ALTER DATABASE [BOBTRENDS]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE

--//Backup transaction log
BACKUP LOG [BOBTRENDS] TO DISK ='Q:\LOG_SHIPPING_DROP\BOBTRENDS_2010xxxx_1200_LOG.hbc' WITH MAXTRANSFERSIZE = 262144;
GO
--// -------------------------------------
--// Step 4. Start Rename
--// -------------------------------------
--// Rename current as _ORIG. Why? I don't want to risk overwriting, bad restore or brain fart.
--// Oh and one file(s) will remain on same disk space, G:\.
GO
EXEC master..sp_renamedb 'BOBTRENDS','BOBTRENDS_ORIG'
GO
/* Detach Current Database :ty mssqltips */
EXEC master.dbo.sp_detach_db @dbname = N'BOBTRENDS_ORIG'
GO
/* Rename Physical Files :ty mssqltips*/
EXEC xp_cmdshell 'RENAME "F:\SQL_DATA\BOBTRENDS_Data.MDF", "BOBTRENDS_ORIG_Data.MDF"'
GO
EXEC xp_cmdshell 'RENAME "G:\SQL_FAST\BOBTRENDS_Fast.ndf", "BOBTRENDS_ORIG_Fast.ndf"'
GO
EXEC xp_cmdshell 'RENAME "E:\SQL_LOGS\BOBTRENDS_Log.LDF", "BOBTRENDS_ORIG_Log.LDF"'
GO
RETURN
--// -------------------------------------
--// Step 5. VERIFY ALL WENT WELL
--// -------------------------------------
/* ALWAYS HAVE A ROLLBACK PLAN!!!
EXEC xp_cmdshell 'RENAME "F:\SQL_DATA\BOBTRENDS_ORIG_Data.MDF", "BOBTRENDS_Data.MDF"'
GO
EXEC xp_cmdshell 'RENAME "G:\SQL_FAST\BOBTRENDS_ORIG_Fast.ndf", "BOBTRENDS_Fast.ndf"'
GO
EXEC xp_cmdshell 'RENAME "E:\SQL_LOGS\BOBTRENDS_ORIG_Log.LDF", "BOBTRENDS_Log.LDF"'
GO
EXEC master.dbo.sp_attach_db @dbname = N'BOBTRENDS_ORIG'
GO
EXEC master..sp_renamedb 'BOBTRENDS_ORIG','BOBTRENDS'
*/
RETURN
--// -------------------------------------
--// Step 6. Now address the "_NEW" DB
--// -------------------------------------
RESTORE LOG [BOBTRENDS_NEW]
FROM DISK= 'Q:\LOG_SHIPPING_DROP\BOBTRENDS_2010xxxx_1200_LOG.hbc'
WITH NORECOVERY, MAXTRANSFERSIZE = 1048576,STATS=10
GO
;RESTORE DATABASE [BOBTRENDS_NEW] WITH RECOVERY
GO
;ALTER DATABASE [BOBTRENDS_NEW]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE
GO
EXEC master..sp_renamedb 'BOBTRENDS_NEW','BOBTRENDS'
GO
/* Detach Current Database :ty mssqltips */
EXEC master.dbo.sp_detach_db @dbname = N'BOBTRENDS'
GO
/* Rename Physical Files :ty mssqltips */
EXEC xp_cmdshell 'RENAME "I:\SQL_DATA\BOBTRENDS_NEW_Data.MDF", "BOBTRENDS_Data.MDF"'
GO
EXEC xp_cmdshell 'RENAME "G:\SQL_FAST\BOBTRENDS_NEW_Fast.ndf", "BOBTRENDS_Fast.ndf"'
GO
EXEC xp_cmdshell 'RENAME "e:\SQL_LOGS\BOBTRENDS_NEW_Log.LDF", "BOBTRENDS_Log.LDF"'
GO

/* Attach Renamed Database :ty mssqltips */
CREATE DATABASE [BOBTRENDS] ON
( FILENAME = N'I:\SQL_DATA\BOBTRENDS_Data.MDF' ),
( FILENAME = N'G:\SQL_FAST\BOBTRENDS_Fast.ndf'),
( FILENAME = N'E:\SQL_LOGS\BOBTRENDS_Log.LDF')
FOR ATTACH

/* Identify Database File Names :ty mssqltips */
SELECT
name AS [Logical Name],
physical_name AS [DB File Path],
type_desc AS [File Type],
state_desc AS [State]
FROM sys.master_files
WHERE database_id IN (DB_ID(N'BOBTRENDS_NEW'),DB_ID(N'BOBTRENDS'),DB_ID(N'BOBTRENDS_ORIG') )
--// -------------------------------------
--// Step 7. CHECK CHECK AND TRIPLE CHECK
--// -------------------------------------


After I confirmed the new db was functional, I performed a full back up, and deleted the _ORIG files.
Reclaiming 300 GB. YAY!!!

SolveigMM Video Splitter

When you just need to trim or split a .WMV file.


Movie Maker was killing me, I just needed to trim last 3 minutes off a 1h 20m file (276mb). Its was going to take 512 minutes to save, MEH!!!

Took me 15minutes of googling and testing various results to find this GEM.


Enjoy.

VMware ESXi OPENFiler Goodness

Dual OP 4tb each, 2 esxi, HIGH I/O, iSCSI, Unhappiness, Large LUNs, at one point shared between the 2 esxi, dual 1gb nics.....sporatic disconnects Then this: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005009 and I like this gus post, http://vinf.net/2009/10/29/iscsi-lun-is-very-slowno-longer-visible-from-vsphere-host/


Ok I need to reconfigure somethings...

Automate DBSchema imports

If you got a lot of DB's to manage and servers, and don't have it under source control, try this:
Read this Deploying your Database Project without VSTSDB installed, and then toil with below. Just another shotgun approach.


One step further, for pre-existing environments, capture all the schemas, then DEPLOY to a dev environment and start creating Database Projects(haven't figure out how to automate that yet). A few tweak to the sources, and you got the makings of GUI approach for change management and source control.

Can anyone advise on how to programmatically create a DB Project? I'm struggling to find resources on that topic.

@ECHO off
::Run this to create function calls
:: select
:: 'CALL:GOBANANA "' +name + '" "' + @@Servername + '"'
:: from
:: sysdatabases where name not in('tempdb') --// Yes I want master and model

SET VSDBCMD="C:\Program Files\Microsoft Visual Studio 9.0\VSTSDB\Deploy\vsdbcmd.exe"

CALL:GOBANANA "BOBS_DB" "BOBS_SQLSERVER"

GOTO:EOF

:GOBANANA
SET DBNAME=%~1
SET SVRNAME=%~2
SET SCHEMAFOLDER="C:\temp\DB_Schemas\%SVRNAME:\=_%"
ECHO %SCHEMAFOLDER%

IF NOT EXIST %SCHEMAFOLDER% MKDIR %SCHEMAFOLDER%
:: Strip double quote, safety
SET SCHEMAFOLDER=###%SCHEMAFOLDER%###
SET SCHEMAFOLDER=%SCHEMAFOLDER:"###=%
SET SCHEMAFOLDER=%SCHEMAFOLDER:###"=%
SET SCHEMAFOLDER=%SCHEMAFOLDER:###=%

ECHO SAVING Database Schema for, %DBNAME% to "%SCHEMAFOLDER%\%DBNAME%.dbschema"

%VSDBCMD% /a:Import /cs:"Server=%SVRNAME%;Integrated Security=true;Pooling=false;Initial Catalog=%DBNAME%;" /dsp:Sql /model:"%SCHEMAFOLDER%\%DBNAME%.dbschema"
GOTO:EOF

Amazing win2k3Ent.

Evil Temporary ASP.NET Files CACHED!!!

Another fine mess. 404's galore cause of bad referencing in static CSS files. Culprit found, fix and redeployed, but 404's persist. DIG DIG DIG

AHAHA!!!! The "Temporary ASP.NET Files" still contains the bugged compiled version. Batchscript? Sure why not....

---------------------------------------------------------------


@ECHO OFF
ECHO DO YOU REALLY WANT TO DO THIS???
:: SAFETY FIRST!!! Comment out below to run, but I suggest a dry run and test
GOTO:EOF

::// Uncomment for dry run with just one server
::CALL:GOBANANA WEB1
::GOTO:EOF
:://----------------------------

CALL:GOBANANA ServerName
::CALL:GOBANANA ServerNameX

GOTO :EOF

:GOBANANA
SET SRVNAME=%1
:: Know thy path to Sysinternals Suite:
:: http://technet.microsoft.com/en-us/sysinternals/bb842062.aspx
:: Or just goolge
SET PRGPATH=C:\SysinternalsSuite
ECHO HOST: \\%SRVNAME%
%PRGPATH%\psexec \\%SRVNAME% iisreset /stop
%PRGPATH%\psexec \\%SRVNAME% cmd.exe /c for /d %%i in ("C:\Windows\Microsoft.Net\Framework\v2.0.50727\Temporary ASP.NET Files\*") do RMDIR /S/Q "%%i"
%PRGPATH%\psexec \\%SRVNAME% iisreset /start


ENJOY!!!

TurnKey Fileserver ....




ThankYou

configure DNS remotely. NETSH -r MEH

It must be that I need a nap, but I couldn't get netsh -r to work. I wanted to create a batch script to set the DNS for all windows servers in a domain. Alas I gave in for what I knew would work...

Be sure you got sysinternals installed...

Let's see what the current setting are:
psexec \\ServerName ipconfig /all

working example:
-----------------------------------------------------------------
Windows IP Configuration

Host Name . . . . . . . . . . . . : ServerName
Primary Dns Suffix . . . . . . . : BOBMIHADA.COM
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : BOBMIHADA.COM

Ethernet adapter Private:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
Physical Address. . . . . . . . . : 00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.101.71
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :192.168.101.1
DNS Servers . . . . . . . . . . . : 192.168.101.10
192.168.101.51

Ethernet adapter Public:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.2.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.2.1
DNS Servers . . . . . . . . . . . : 192.168.2.10
192.168.2.54
ipconfig exited on ServerName with error code 0.


Now let's proceed with changing the DNS settings on the Private Interface
--------------------------------------------------------------------------------

psexec \\ServerName netsh interface ip set dns "Private" source=static addr=192.168.101.69
psexec \\ServerName netsh interface ip add dns "Private" 192.168.101.79

Let's see what the NEW current setting are:
psexec \\ServerName ipconfig /all

-----------------------------------------------------------------
Windows IP Configuration

Host Name . . . . . . . . . . . . : ServerName
Primary Dns Suffix . . . . . . . : BOBMIHADA.COM
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : BOBMIHADA.COM

Ethernet adapter Private:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
Physical Address. . . . . . . . . : 00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.101.71
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :192.168.101.1
DNS Servers . . . . . . . . . . . : 192.168.101.69
192.168.101.79

Ethernet adapter Public:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection #2
Physical Address. . . . . . . . . : 00-00-00-00-00-00
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.2.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.2.1
DNS Servers . . . . . . . . . . . : 192.168.2.10
192.168.2.54
ipconfig exited on ServerName with error code 0.

ENJOY!

SQL TIMEOUT only on call from webserver!!!

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)


Stored procedure executed from Web application results in "Time out expired".

Same executed in query analyzer return in a instant, executes in seconds.

WHY?

Meh, I struggled with this for a bit. I couldn't find any answers on GOOGLE. And now after the fact I can find everywhere, just need to know what the fix was first: http://www.google.com/search?q=timeout+sp_recompile+fix&hl=en&tbo=1&num=10&lr=&ft=i&cr=&safe=images

It's SQL!!!

The solution that worked for me was to sp_recompile the Proc in question. If you want to recompile all try this: http://www.bobmihada.com/2010/01/ms-sql-sprecompile-all-procs.html

SSB References

http://www.sqlservercentral.com/articles/Service+Broker/2897/







SQL SERVICE BROKER AND ME

OH MAN!!! This seriously sent me for a loop... mostly cause I kept getting interrupted. 
This is my self help, part 1 for SSB. Fist time I got it to work was a miracle. After that 
it grew legs and ran around for a bit. This will setup the Endpoints and generic 
basics. Just need to work on the Activation, Poisson messaging and Event notifications.

PROPS OUT TO: 
http://www.amazon.com/Rational-Server-Service-Broker-Guides/dp/1932577270 
- Just good wholesome stuff

http://rusanu.com/2007/10/31/error-handling-in-service-broker-procedures/ 
- This guys is Mr.SSB. Tons of references

http://www.hilite.me/ - This just made my day.  Thank you for the readability
/*
Notes:
***Check communication between SQL servers

Run this on the sender and receiver, but be
sure to swap the following values respectively:

@LocalServer = 'NITROGEN'
, @LocalDB = 'NITROGEN_SSB'

, @RemoteServer = 'GOLD'
, @RemoteDB = 'GOLD_SSB'
*/

DECLARE
@SQLCMD NVARCHAR(MAX)
, @SenderDB VarChar(128) -- Which way should the data flow
, @LocalServer VarChar(128)
, @LocalDB VarChar(128)
, @LocalBrokerID uniqueIdentifier
, @RouteSend VarChar(128)
, @RouteResponse VarChar(128)
, @LocalDB_ENDPOINT VarChar(128)
, @RemoteServer VarChar(128)
, @RemoteDB VarChar(128)
, @RemoteBrokerID uniqueIdentifier
, @ListenerPort VarChar(4)
, @ServiceNameReceiver VarChar(256)
, @ServiceNameSender VarChar(256)
, @WindowsServiceAccount VarChar(128)
, @SSBNameSpace VarChar(128)


SET NOCOUNT ON

SELECT
@SenderDB = 'GOLD_SSB'

, @RemoteServer = 'GOLD'
, @RemoteDB= 'GOLD_SSB'
, @LocalServer = 'NITROGEN'
, @LocalDB = 'NITROGEN_SSB'

--, @LocalServer= 'GOLD'
--, @LocalDB = 'GOLD_SSB'
--, @RemoteServer = 'NITROGEN'
--, @RemoteDB= 'NITROGEN_SSB'

, @RouteSend = 'RoutePackage_Send'
, @RouteResponse = 'RoutePackage_Response'
, @ListenerPort = '4085'
, @SSBNameSpace = 'TestingSSB'

, @WindowsServiceAccount = 'DOMAIN\sqlservice'

IF @@SERVERNAME <> @LocalServer
BEGIN
PRINT 'ACHTUNG!!!
@LocalServer = ' + @LocalServer + '
ACTUAL LOCAL SERVER NAME IS ' + @@SERVERNAME + '

PLEASE REVIEW AND CORRECT'
RETURN
END

SELECT
@ServiceNameReceiver = '//' + @SSBNameSpace + '/Service_Receiver'
, @ServiceNameSender = '//' + @SSBNameSpace + '/Service_Sender'
,@LocalDB_ENDPOINT = @LocalDB + '_ENDPOINT'

IF OBJECT_ID('tempdb..#tmpSSB') IS NOT NULL DROP TABLE #tmpSSB

CREATE TABLE #tmpSSB(service_broker_guid uniqueIdentifier)


--// ---------------------------------------------------------------------------
--// 1. CREATE SERVICE BROKER ENDPOINT -----------------------------------------
SELECT @SQLCMD = '
USE MASTER
ALTER DATABASE [' + @LocalDB + '] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
ALTER DATABASE [' + @LocalDB + '] SET ENABLE_BROKER;
ALTER DATABASE [' + @LocalDB + '] SET MULTI_USER;'
EXEC(@SQLCMD)

SELECT @SQLCMD = '
IF EXISTS(SELECT Name FROM sys.service_broker_endpoints WHERE Name = ''' + @LocalDB_ENDPOINT + ''')
BEGIN
PRINT ''Dropping Existing @LocalDB_ENDPOINT''
DROP ENDPOINT ' + quoteName(@LocalDB_ENDPOINT) + '
END'
EXEC(@SQLCMD)

SELECT @SQLCMD = 'CREATE ENDPOINT ' + @LocalDB_ENDPOINT + '
AS TCP (LISTENER_PORT = ' + @ListenerPort + ')
FOR SERVICE_BROKER(
AUTHENTICATION = WINDOWS
,ENCRYPTION = DISABLED
)

;USE MASTER
GRANT CONNECT ON ENDPOINT::' + @LocalDB_ENDPOINT + ' To ['+ @WindowsServiceAccount +'];

ALTER ENDPOINT ' + @LocalDB_ENDPOINT + ' STATE= STARTED;
'
EXEC(@SQLCMD)
PRINT 'ENDPOINT: @LocalDB_ENDPOINT=' + @LocalDB_ENDPOINT + ', created'
--// ---------------------------------------------------------------------------

SELECT @SQLCMD = '
INSERT INTO #tmpSSB
SELECT
service_broker_guid
FROM
' + quoteName(@RemoteServer) + '.master.sys.databases where name = ''' + @RemoteDB + ''''
EXEC(@SQLCMD)

SELECT @RemoteBrokerID = service_broker_guid FROM #tmpSSB
IF @@ROWCOUNT = 0
BEGIN
SELECT 'REMOTE DB service_broker_guid NOT FOUND!'
RETURN
END

IF OBJECT_ID('tempdb..#tmpSSB') IS NOT NULL TRUNCATE TABLE #tmpSSB

SELECT @SQLCMD = '
INSERT INTO #tmpSSB
SELECT
service_broker_guid
FROM
' + quoteName(@LocalServer) + '.master.sys.databases where name = ''' + @LocalDB + ''''
EXEC(@SQLCMD)

SELECT @LocalBrokerID = service_broker_guid FROM #tmpSSB
IF @@ROWCOUNT = 0
BEGIN
SELECT 'LOCAL DB service_broker_guid NOT FOUND!'
RETURN
END

--// ---------------------------------------------------------------------------
--// X. DROP EXISTING ----------------------------------------------------------
IF @SenderDB = @LocalDB
BEGIN
SELECT @SQLCMD = N'
IF EXISTS(SELECT * FROM sys.services WHERE NAME = ''' + @ServiceNameSender + ''')
BEGIN
PRINT ''Dropping Existing Service: ' + @ServiceNameSender + '''
DROP SERVICE ' + quoteName(@ServiceNameSender) + '
END'
EXEC(@SQLCMD)

SELECT @SQLCMD = N'
IF EXISTS(SELECT * FROM sys.service_queues WHERE NAME = ''' + @ServiceNameSender + '_QUEUE'')
BEGIN
PRINT ''Dropping Existing Queue: ' + @ServiceNameSender + '_QUEUE''
DROP QUEUE ' + quoteName(@ServiceNameSender + '_QUEUE') + '
END'
EXEC(@SQLCMD)

END
ELSE
BEGIN
SELECT @SQLCMD = N'
IF EXISTS(SELECT * FROM sys.services WHERE NAME = ''' + @ServiceNameReceiver + ''')
BEGIN
PRINT ''Dropping Existing Service: ' + @ServiceNameReceiver + '''
DROP SERVICE ' + quoteName(@ServiceNameReceiver) + '
END'
EXEC(@SQLCMD)

SELECT @SQLCMD = N'
IF EXISTS(SELECT * FROM sys.service_queues WHERE NAME = ''' + @ServiceNameReceiver + '_QUEUE'')
BEGIN
PRINT ''Dropping Existing Queue: ' + @ServiceNameReceiver + '_QUEUE''
DROP QUEUE ' + quoteName(@ServiceNameReceiver + '_QUEUE') + '
END'
EXEC(@SQLCMD)

END

SELECT @SQLCMD = N'
IF EXISTS(SELECT * FROM sys.service_contracts WHERE NAME = ''//' + @SSBNameSpace + '/Service_CONTRACT'')
BEGIN
PRINT ''Dropping Existing CONTRACT: //' + @SSBNameSpace + '/Service_CONTRACT''
DROP CONTRACT ' + quoteName('//' + @SSBNameSpace + '/Service_CONTRACT') + '
END'
EXEC(@SQLCMD)

SELECT @SQLCMD = N'
IF EXISTS(SELECT * FROM sys.service_message_types WHERE NAME = ''//' + @SSBNameSpace + '/RequestMessage'')
BEGIN
PRINT ''Dropping Existing MESSAGE TYPE : //' + @SSBNameSpace + '/RequestMessage''
DROP MESSAGE TYPE ' + quoteName('//' + @SSBNameSpace + '/RequestMessage') + '
END'
EXEC(@SQLCMD)

SELECT @SQLCMD = N'
IF EXISTS(SELECT * FROM sys.service_message_types WHERE NAME = ''//' + @SSBNameSpace + '/ResponseMessage'')
BEGIN
PRINT ''Dropping Existing MESSAGE TYPE : //' + @SSBNameSpace + '/ResponseMessage''
DROP MESSAGE TYPE ' + quoteName('//' + @SSBNameSpace + '/ResponseMessage') + '
END'
EXEC(@SQLCMD)
--// ---------------------------------------------------------------------------

--// ---------------------------------------------------------------------------
--// CREATE THE FOLLOWING
--// 1. Message Type(s), geeneral
--// 2. Contract(s), geeneral
--// 3. Queue(s), specific to sender or receiver
--// 4. Service(s), specific to sender or receiver

SELECT @SQLCMD = N'
CREATE MESSAGE TYPE ' + quoteName('//' + @SSBNameSpace + '/RequestMessage') + ' VALIDATION = NONE
PRINT ''MESSAGE TYPE ' + quoteName('//' + @SSBNameSpace + '/RequestMessage') + ', created''

CREATE MESSAGE TYPE ' + quoteName('//' + @SSBNameSpace + '/ResponseMessage') + ' VALIDATION = NONE
PRINT ''MESSAGE TYPE ' + quoteName('//' + @SSBNameSpace + '/ResponseMessage') + ', created''

CREATE CONTRACT ' + quoteName('//' + @SSBNameSpace + '/Service_CONTRACT') + '
(' + quoteName('//' + @SSBNameSpace + '/RequestMessage') + ' SENT BY INITIATOR
,' + quoteName('//' + @SSBNameSpace + '/ResponseMessage') + ' SENT BY TARGET )
PRINT ''CONTRACT ' + quoteName('//' + @SSBNameSpace + '/Service_CONTRACT') + ', created'''
EXEC(@SQLCMD)

IF @SenderDB = @LocalDB
BEGIN
SELECT @SQLCMD = N'
CREATE QUEUE ' + quoteName(@ServiceNameSender + '_QUEUE') + '
PRINT ''QUEUE' + + quoteName(@ServiceNameSender + '_QUEUE') + ', created''

CREATE SERVICE ' + quoteName(@ServiceNameSender) + '
ON QUEUE ' + quoteName(@ServiceNameSender + '_QUEUE') + '
(' + quoteName('//' + @SSBNameSpace + '/Service_CONTRACT') + ')
PRINT ''SERVICE' + quoteName(@ServiceNameSender) + ', created''

GRANT SEND ON SERVICE::[' + quoteName(@ServiceNameSender + '] TO PUBLIC ;
GRANT RECEIVE ON ' + quoteName(@ServiceNameSender + '_QUEUE') + ' TO [Public];
PRINT ''PERMISSIONS GRANTED ON ' + quoteName(@ServiceNameSender + '_QUEUE') + ''''
EXEC(@SQLCMD)
END
ELSE
BEGIN
SELECT @SQLCMD = N'
CREATE QUEUE ' + quoteName(@ServiceNameReceiver + '_QUEUE') + '
PRINT ''QUEUE' + + quoteName(@ServiceNameReceiver + '_QUEUE') + ', created''

CREATE SERVICE ' + quoteName(@ServiceNameReceiver) + '
ON QUEUE ' + quoteName(@ServiceNameReceiver + '_QUEUE') + '
(' + quoteName('//' + @SSBNameSpace + '/Service_CONTRACT') + ')
PRINT ''SERVICE' + quoteName(@ServiceNameReceiver) + ', created''

GRANT SEND ON SERVICE::[' + quoteName(@ServiceNameReceiver + '] TO PUBLIC ;
GRANT RECEIVE ON ' + quoteName(@ServiceNameReceiver + '_QUEUE') + ' TO [Public];
PRINT ''PERMISSIONS GRANTED ON ' + quoteName(@ServiceNameReceiver + '_QUEUE') +''''
EXEC(@SQLCMD)
END
--// ---------------------------------------------------------------------------

--// ---------------------------------------------------------------------------
--// 5. CREATE SERVICE ROUTES --------------------------------------------------
IF @SenderDB = @LocalDB
BEGIN
--// CREATE OUT-BOUND ROUTE @SenderDB
SELECT @SQLCMD = N'USE ' + quoteName(@LocalDB) + '
IF EXISTS(SELECT * FROM sys.routes WHERE Name = ''' + @RouteSend + ''')
BEGIN
PRINT ''Dropping Existing @RouteSend''
DROP ROUTE ' + quoteName(@RouteSend) + '
END
CREATE ROUTE ' + quoteName(@RouteSend) + '
WITH SERVICE_NAME = ''' + @ServiceNameReceiver + ''',
BROKER_INSTANCE = ''' + CAST(@RemoteBrokerID AS NVARCHAR(50)) + ''',
ADDRESS = N''TCP://' + @RemoteServer +':' + @ListenerPort + ''''
END
ELSE
BEGIN
--// CREATE OUT-BOUND ROUTE @SenderDB
SELECT @SQLCMD = N'USE ' + quoteName(@LocalDB) + '
IF EXISTS(SELECT * FROM sys.routes WHERE Name = ''' + @RouteSend + ''')
BEGIN
PRINT ''Dropping Existing @RouteSend''
DROP ROUTE ' + quoteName(@RouteSend) + '
END
CREATE ROUTE ' + quoteName(@RouteSend) + '
WITH SERVICE_NAME = ''' + @ServiceNameReceiver + ''',
BROKER_INSTANCE = ''' + CAST(@LocalBrokerID AS NVARCHAR(50)) + ''',
ADDRESS = N''LOCAL'''
END

EXEC(@SQLCMD)
PRINT 'Route : @RouteSend=' + @RouteSend + ', created'

IF @SenderDB = @LocalDB
BEGIN
--// CREATE IN-BOUND ROUTE
SELECT @SQLCMD = N'USE ' + quoteName(@LocalDB) + '
IF EXISTS(SELECT Name FROM sys.routes WHERE Name = ''' + @RouteResponse + ''')
BEGIN
PRINT ''Dropping Existing @RouteResponse''
DROP ROUTE ' + quoteName(@RouteResponse) + '
END
CREATE ROUTE ' + quoteName(@RouteResponse) + '
WITH SERVICE_NAME = ''' + @ServiceNameSender + ''',
BROKER_INSTANCE = ''' + CAST(@LocalBrokerID AS NVARCHAR(50)) + ''',
ADDRESS = N''LOCAL'''
END
ELSE
BEGIN
--// CREATE IN-BOUND ROUTE
SELECT @SQLCMD = N'USE ' + quoteName(@LocalDB) + '
IF EXISTS(SELECT Name FROM sys.routes WHERE Name = ''' + @RouteResponse + ''')
BEGIN
PRINT ''Dropping Existing @RouteResponse''
DROP ROUTE ' + quoteName(@RouteResponse) + '
END
CREATE ROUTE ' + quoteName(@RouteResponse) + '
WITH SERVICE_NAME = ''' + @ServiceNameSender + ''',
BROKER_INSTANCE = ''' + CAST(@RemoteBrokerID AS NVARCHAR(50)) + ''',
ADDRESS = N''TCP://' + @RemoteServer +':' + @ListenerPort + ''''
END

EXEC(@SQLCMD)
PRINT 'Route : @RouteResponse=' + @RouteResponse + ', created'
--// ---------------------------------------------------------------------------

RETURN
/*
--//REVIEW

SELECT * FROM sys.service_broker_endpoints WHERE endpoint_ID > 14
SELECT * FROM sys.routes WHERE name NOT IN ('AutoCreatedLocal')
SELECT * FROM sys.service_queues
WHERE Name NOT IN ('QueryNotificationErrorsQueue','EventNotificationErrorsQueue','ServiceBrokerQueue')
SELECT * FROM sys.service_message_types WHERE message_type_ID > 14
SELECT * FROM sys.service_contracts WHERE service_contract_ID > 14
SELECT * FROM sys.services WHERE service_ID > 14
SELECT * FROM sys.dm_broker_connections
*/

7z aka seven zip, todays savior

Curse my maintenance plans to archive data in a timely manner. Why curses? Freak'n tasks which were to act upon data prior to back up, were out of sync(timing got thrown off by reports failing to down load...blah blah blah). So now I got to unzip a crap load of files, bulk insert data into temp table for lookups and more boring stuff.


7z e *.zip *.837 -r

Extract all .837 files from all zip files found in current directory.

YAY!!!

When should you deploy?Weekday? Weekend? Whenever?

I've struggled with the logic behind all claims.


"We should deploy immediately" ~ cause we over committed

"We should wait till after peak hours" ~ cause it might have issues, less people may be impacted.

"Friday Night" ~cause you have the to weekend to try and resolve any issues that arise.

"Whenever" ~eh, we can take it or leave it...Not important to anyone important.

I've learned the best answer is to adhere to political hierarchy.
1. Who signs your check?
2. Who is most likely to complain to the person who signs your check?
3. If you screw up what will the person who signs your checks think?
4. What are the risk factors?
5. How easy will it be to rollback?
6. Have you even thought about how to handle the rollback?
7. Please tell me you are at least second guessing yourself
8. "You arrogant ass! You've killed us!" ~Andrei Bonovia [Hunt for Red October]

My advise is test, test, test and get buy in from those who may impact the judgement of the person who signs your check. Above all do right by the system.

The person who signs your check, is merely a metaphor for the COMPANY.

You are employed to help ensure the success of the company, period. If thats not your goal, you're in the wrong place.

Rant, rant, rant, blah, blah, blah, just do good. Respect the system, the users, and don't be arrogant.

MURPHY's LAW it tantamount is IT, and life.


SQL installs always take forever.


I never really get why it takes so dang long to intall. Disks are blazing, CPU not even sneezing, Memory for days.... but still draaaaaaaaags. And then the Service pack after that, and then the configuration and then.....

Lost your windows share? Export next time as a backup

Unfortunately this is usually discovered after the fact, but don't let it happen again.

So you spent hours fiddling with windows NTFS permission and then created corresponding folder shares. Of course, it was by hand and over the course of several month.

In comes
Murphy.


POOF!!!
ISCSI shares didn't import after windows update/reboot, hence disk not available and no shares to present. Hence the share info is gone. If your loucky after to get the shares mounted, it will still retain the NTFS permissions you painstakingly configured.

Yeah, you gotta start all over, boo. But take heart in the fact that it will be the last time that ever happens to to you.

1. Re-config your shares
2. Capture what you setup to a txt file for manual restore with this nugget.
  • C:\>SRVCHECK \\yourservernamehere >ManualSharesConfig.txt
3. Export those bad boys from the registry
  • SYSTEM\CurrentControlSet\Services\LanmanServer\Shares see this
4. Have a nice day


Thank you GlassGiant.com


.. ... =. .
.=.. .$7.. ~:
.O.:.:I??.I:$.
.8.Z?I$+ZZO+D..
... .8:ZI$8$8OODN. ...
.. . .?IOOOO8ZI88O. ..~
I=.. .I8IZ:.,??8ZN:..... ...,$:...
?+. .,DZZ~,,?I8ZD. .. ..... . . .,:...
.I+. .. .+OZ~:.II8O.....: .=.... ......:7. .
.++...... . .......=..7?....7$78O8$7::~7I?O7???O...:DO7+$$?7OI..
~?... .......:~==$D+OD????I7$8ZZZZZZZZZZOO8888~.8D8~I?=+??O$~.
...777$$ZZZO8=..ZZZOO88888OOOOOO8OOOZ$III7$ZOD?OONNDD88Z.:Z~OO87.
.~~OZ$$7$$ZO8$.7O88~?7O888OZZO7O8O7OOZZ7777II?IOONNDD8O~OO7?OZ8~,
=:O8Z$7$$$Z8ND8O888I+?II7$OOO78O8O8OZZ$777III$OO8NZDDOOO7=$O8DZ=.
.::$8OZ777$Z8NNDOO8O7?IIII$ZO$$OOOO8$OOZ7O7III7OOO..Z?O888DO$IIZ+..
=,$8OZ77$$$O8?$$8O8+I?7=7?OOZ$ZO8OOOOZ$I7I788O8O8..,O8?==+?=++$7+
.~.OOOZ$77ZZ8:..+$ID,~+?7$$$ZZ77O8O=I7$77$7I$7$OOZ ..DO7=+==?777=: .
,:$=:,.:...$D..,7O?:+Z77OOOOOOOODOOOOOOOOOOOOOOOZ...O8ID88NDO7Z,...
.:,+~..,~...Z8. .$$7O8OOOOOOZZO88N8NNNM8OOOZO8DOZ. .=ZOOO8+,:$O?ZZ.....
..,.~?I7$$$$ZD. .$OOO8DNNNN8Z$III?+==+IZ~~~===~~=. .$OO$7$7$OO77$Z$:..
.7ONNN8DN8....+~===:~:~~I$$7~Z?Z7I?Z=~~=~~~~7. ..?I?8Z$$$Z$ZZO8DD
..77DD8D8Z$7. ..7~~~~~~~=~I$I+=$?Z7I=8~~~=~~~~$. .,I7OZO8O888888O8O.
.:7ZN8.DO77I?....~~~~~~~=~7$?==I?II?~8~=~~~~~~,. .?OOOOO8ODO$$?78O.
.?7OD8=O$OOIZ....?~~~~~==+$7ZI7????I~ODOOOOZ. .????7OO?Z88O7IO8.
.$$Z::=+ZOO~~.. ..8D888O88IO87$=?$?I:Z8OOOO.. ..I+?$$87?O$$ZOO8,
.OZOO8OOOOO?~.. ....O888DD78OZO~?$77~7DOOOZ.. . ..~$Z$8?ZZ8OOOOO~
D=. .OO7I777OOO=+ . . .88DZO$DOZO~I$7I=INNDD?. ..?IO88ZOOOOOO~
.,+$O$8?I777OOO==.. ...888OO$777~===II7?DOOOZ7 ....$Z7IOO8OO..
?8OO$O$$OZ8==.. ..+8OOOOZ?7ZDNNNDDZ77I++=I. . .:=:..
78O8IIZOOO8=~.. .I:,,:~~:7,.,,,:,Z=OOOO+=++. . ....
. .ZOOOOZOOO8Z=, . .~:?????=?,++++=:Z+?+?+=+=?.
. .$ZZZZZZOZOO=... .I~===~::=:????+~O=+????+=?.
. .ZOO8O88888I+... .+~~~+??+~:+???=:Z~+===~~~,
....77ODDDDD87$I. . . ~?+~~:::~::::::$+==+DZI?.
.IO8O8D88Z$=... .,:~?77$8$Z$ZZZZZZ?+~77$==I.
..ZOOODI7ZZ7... .,~?==?I7$ZOOOZ7+?=~~?+=~I~?..
..ZZD8ZI$...... :=+=+I~IID7$7. .=~,..=..?:?:.
.,OO8DZZZ...... .7III?++IZZ?7?...,.,,,?,,:+$+
.ZOOZZO... IIIII??I77$I~ .. :~::=:::~$+
..+ZZOOO... .7???$+I77$$7, ...+?~~:~~~=$?
...O8O8O... $???Z+I7$$ZZ. .. 77~~~~~=$O+
..7I.... Z???Z+7$$Z8Z . =7+~=+++88I
.... .DI8DZ$I$$ZO$..... 8Z$O8O$D8I. .
...,+7OIO$ONNIO$O8,.....,DD$OOZZZZ$$+~...
...$ZOZ7$788ND8888?$O.7$$7$$$7$$$$$$$O:+,~
...$ZOZZZZ7?8OO888888.$$$Z$ZZZZ$7$$$Z8+~,,
..$$ZD8ZZ$Z$OOO8888D8.$$$87D$$7$7$$$ZDZ=,,
..8ZZ88OOO$$OOO8888D8.$$$O$77O777$$$ZO,:,:
.88ZZD8OZZ$$OO88888D8.ZZZOZ77Z777ZZZZDO~,.
I88$ZD88OZ$ZOO8888DD8.ZZZZO$$$$$ZZZZZ:. .
D8$I$8ZZZZ$$888888888.7ZZZOZZZZZZZZZZ:= ..
.7?I8I?II$$$88888888=.7$ZZZZZZZZZZ$$$$=:==.
.=$$7IIII??O88888888=.$ZZZZ$$O77$$ZZZ$IDD8.
..,77$$$$IO8888888D8=.I$ZZZZZZZZZZO,~ZIND8:
..,8777777O8O8888888I..ZZZZZZ$$$$$Z.:Z=ND8I.
..:DOOZ$7$Z888888888I .ZZZ87IIIIIIZ.:Z=D88+
..~88ZZZ7$OD8O88888O? .ZZZ8$ZOOOOO$.,7+D88?
..=8O$$$$ZOOO88888DO7..ZZZ8$777777Z.,=?D88I
..=DOOZZOI8OOO888888D..ZZZ8$$77I7IZ,,:?NDD+.
.$?8OZZZO?7NO88888ND8..Z$ZO7IIIIIIZ?~??,:=?
.?INO$$7I7$$NOO8888OO..:$$ZZ$$Z$$$Z$.?IONN8.
.+$777$OOOOOO88OOZ..IZZZ$$ZZ888$ZZOIIND8,
...I$ZZ7$OO8DOOOOOZZ..=$$ZZOO888888Z$$=N88~
.....~Z7ZO8DDNN$OOOOOZZ$.. INDDN7NNNND88O$,DDO~
.. .?ZZZ$OO88ONDZZZ8O$$$...,D8DD8DDDDDD88Z.DDO~
. ..7$ZZ8OO8OZZON$$$Z$$77....8O8888D88888OZ~D8O=
.~$$$$ZOOO8$$ZZZ88$$$7777.. .OOZOOO8OOOOO$O7DZ$:
.$ZI$OOOOOOO$$ZZZ8$$$$7......Z7OOO8888ODZ+O$I.
.ZOOIZZZZZZZZ$$$$ZZ+.. ?NO8O8O8O$D,...
.,7Z7Z$ZZ$$O=7:.. .... ,D$$$ZZZZ,D:...
...... ...... ..... ... .IZ..OOOZ+$~...
.~$OO888$$. .
. .........

GlassGiant.com

MU CCD CCR CDA KMA

Get this: WebViewLayout_CDA.xsl and HITSP_C32v2.5_Rev6_16Sections_Entries_MinimalErrors.xml From http://xreg2.nist.gov/cda-validation/downloads/HITSP_C32_Examples_Jan2010.zip

....can't wait for results from http://hit.fiu.edu/challenge.htm

Sample CRD Document

PatientHenry Levin, the 7th
Date of birthSeptember 24, 1932SexMale
Contact info

Patient IDs996-756-495 2.16.840.1.113883.19.5
Document IdSAMPLE_QRPH_CRD 2.16.840.1.113883.3.72.5.1
Document Created:February 7, 2008, 13:00:00 +0500
Author

Table of Contents


Active Problem Concern

ProblemDate of Onset
Patient has exercise induced asthma1/10/2007

Medications

MedicationDosageEffective TimeActive?
Augmentin 125-31.25 MG CHEW3 once a week1/14/2008Yes
Albuterol Sulfate 108 MCG/ACT AERS2 Puffs q6hrs prn1/14/2008Yes

Allergies and adverse reactions

Penicillin




Document maintained by