Friday, February 27, 2015

sql server restore database error Exclusive access could not be obtained because the database is in use

To solve this error


use Master
alter database Hospital_db_22_02 set offline with rollback immediate
alter database Hospital_db_22_02
set online
go




Wednesday, February 18, 2015

runtime error the type x exists in both x and y

i got this error in web site run under version 4 framework for user control assembly at runtime

Solution :

add this property to web.config file
<compilation debug="false" targetFramework="4.0" batch="false">

Explain for solution :
http://stackoverflow.com/questions/2596118/asp-net-error-the-type-foo-exists-in-both-temp1-dll-and-temp2-dll-pt-2

http://www.sellsbrothers.com/Posts/Details/1995

Friday, February 6, 2015


EXMAPLE : WITH USERNAME AND PASSWORD

NET USE \\10.10.10.X\emp_identification_letters /u:mosbah P@$$w0rd
NET USE \\10.10.10.X\Catalog /u:mosbah P@$$w0rd

robocopy /MIR D:\MWA_STORE\TENDERS_STORE \\10.10.10.X\Catalog
robocopy /MIR D:\MWA_STORE\EMP_IDENTIFICATION_LETTERS  \\10.10.10.X\emp_identification_letters
break


-----------------------------------------------------------------------------------------------------------------------
robocopy /MIR D:\MWA_STORE\TENDERS_STORE M
robocopy /MIR D:\MWA_STORE\EMP_IDENTIFICATION_LETTERS N
break
--pause
-----------------------------------------------------------------------------------------------------

synchronize using shared storage passing username and password for security issue
note : the task should run with user has permission to shared storage and local server


NET USE \\10.5.39.100\Backups\ARC_STORE_BACKUPS\Doc_Server2 Backups /user:.\sqluser P@$$w0rd
Robocopy "F:\Doc_Server2" "\\10.5.39.100\Backups\ARC_STORE_BACKUPS\Doc_Server2 Backups"  /MIR /FFT /Z /XA:H /W:5
NET USE \\10.5.39.100\Backups\ARC_STORE_BACKUPS\Doc_Server2 Backups /delete


NET USE \\10.5.39.100\Backups\ARC_STORE_BACKUPS\Doc_Server1 Backups /user:.\sqluser P@$$w0rd
Robocopy "E:\Doc_Server1" "\\10.5.39.100\Backups\ARC_STORE_BACKUPS\Doc_Server1 Backups"  /MIR /FFT /Z /XA:H /W:5
NET USE \\10.5.39.100\Backups\ARC_STORE_BACKUPS\Doc_Server1 Backups /delete