Good find, Todd. I generally use a regular expression in PowerShell to parse
out the server name.

 

Cheers,

Trevor Sullivan

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Todd Hemsell
Sent: Thursday, November 14, 2013 3:51 PM
To: [email protected]
Subject: [mssms] fnGetSiteSystemName

 

So in SQL you will see some of these ServerNALPaths relating to the
distribution points.

I always wind up with something like....

REPLACE(SUBSTRING(DPR.DPNALPath, CHARINDEX('\\', DPR.DPNALPath) + 2,
CHARINDEX('"]', DPR.DPNALPath) - CHARINDEX('\\', DPR.DPNALPath) - 3
),'.mydomain.com <http://mydomain.com> ,'')

 

swhen I want to pull the server name out of the NalPath. They also write
that in the reports.

It seems there is a built in function that does the same thing.

dbo.fnGetSiteSystemName(DPR.DPNALPath) will return the server name. it is a
lot cleaner.

 

 



Reply via email to