Saturday 15 March 2014

Archieve/Backup Visual SourceSafe file using CMD


@ECHO OFF
@TITLE Backing up source safe databases
FOR /F "tokens=2-4 delims=/ " %%i IN ('date /t') DO SET DATE=%%k%%j%%i
FOR /F "TOKENS=1-2 DELIMS=: " %%I IN ('time /t') DO SET TIME=%%I%%J
FOR /F "TOKENS=2 DELIMS= " %%K IN ('time /t') DO SET AMPM=%%K
"C:\Program Files\Microsoft Visual SourceSafe\ssarc" -d- "E:\Today.ssa" $/ "-sE:\Vss-Projects" -yadmin,pass@word1
@ECHO Finished backups


Here,
  
C:\Program Files\Microsoft Visual SourceSafe\ssarc is SourceSafe Archieve application (ssarc.exe) path
E:\Today.ssa - Backup File Location and Name
E:\Vss-Projects - Current Srcsafe stored Location.
admin and pass@word1 is credential for the VSS admin who has permission to backup and restore. 

Add a crawled property in SharePoint 2013 with sortable/Refinable using Powershell



For Sortable:

New-SPEnterpriseSearchMetadataCrawledProperty -Category SharePoint -IsNameEnum $false -Name "ows_MyCrawledProperty" -PropSet 00130329-0000-0130-c000-000000131346 -SearchApplication "Search Service Application" -VariantType 0

New-SPEnterpriseSearchMetadataManagedProperty -Name "MyCrawledProperty" -SearchApplication "Search Service Application" -Type 1 -Queryable $true -Retrievable $true

$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication "Search Service Application" "ows_MyCrawledProperty"

$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication "Search Service Application" -Identity "MyCrawledProperty"

$mp.sortable= $true

$mp.update

New-SPEnterpriseSearchMetadataMapping -SearchApplication "Search Service Application" -CrawledProperty $cp -ManagedProperty $mp


For Refinable:

New-SPEnterpriseSearchMetadataCrawledProperty -Category SharePoint -IsNameEnum $false -Name "ows_MyCrawledProperty" -PropSet 00130329-0000-0130-c000-000000131346 -SearchApplication "Search Service Application" -VariantType 0

New-SPEnterpriseSearchMetadataManagedProperty -Name "MyCrawledProperty" -SearchApplication "Search Service Application" -Type 1 -Queryable $true -Retrievable $true

$cp = Get-SPEnterpriseSearchMetadataCrawledProperty -SearchApplication "Search Service Application" "ows_MyCrawledProperty"

$mp = Get-SPEnterpriseSearchMetadataManagedProperty -SearchApplication "Search Service Application" -Identity "MyCrawledProperty"

$mp.Refinable= $true

$mp.update

New-SPEnterpriseSearchMetadataMapping -SearchApplication "Search Service Application" -CrawledProperty $cp -ManagedProperty $mp



Error: Cannot generate SSPI context in SQL server

                         

 My Scenario: 
          I Got error "Cannot generate SSPI context" in SQL, when I access
(machine1) Destination machine’s SQL instance from (machine2)Source Machine SQL instance.
 It works fine when I access using "sa" account but it happened only in Domain account.

Solution: 
 Check the below details,

1. The Domain Controller is On and accessible by the both SQL computers.
2. Time and TimeZone is synched with Domain Controller.
if not, run the below comments in cmd prompt to reset the time in both computers
   net stop w32time
   net start w32time