Skip to main content

Posts

Showing posts from 2023

[SQL] error : Exclusive access could not be obtained because the database is in use.

When your got  the below SQL error for restore.  Exclusive access could not be obtained because the database is in use. For resolve this issue,   We can kill the users or change DATABASE in Single user mode to disconnect them. 1. Kill users You can check current online users by " sp_who2 " command.  Then kill the command by SPID  The example is SPID has 333 and "kill 333" then it will kill the process.  Here is example for hostname start with A or J or R to kill. And not kill myself.  DECLARE @kill varchar(8000) = ''; SELECT @kill = @kill + 'kill ' + CONVERT(varchar(5), spid) + ';' FROM master..sysprocesses WHERE spid <> @@spid AND (hostname like 'A%' OR hostname like 'J%' OR hostname like 'R%') EXEC(@kill); 2. change DATABASE in single user mode here is example for AdventureWorks DB, change name ALTER DATABASE AdventureWorks SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO RESTORE DATABASE AdventureWorks FROM DISK = ...

[Synology] old file folder auto delete

1.  open your text editor 2.  Directory remove for 3 days ago at "/volume1/recording"  #!/bin/sh find "/volume1/recording"- type d -mtime +3 -exec rm -rf{} \; for 50 days ago #!/bin/sh find "/volume1/recording"- type d -mtime +50 -exec rm -rf{} \; 3. File remove for 3 days ago #!/bin/sh find "/volume1/recording"- type f -mtime +3 -exec rm -rf{} \; 4. Save file as "auto_del.sh" sh file is for script.  5. Synology control panel - job scheduler - user defined script add here. 

[Sharepoint]"Your changes could not be saved" error message. File locking wifh office files(Excel, docs, Power point) Sharepoint Online Document stuck "open" by a user. No other user can access.

"Your changes could not be saved" error message  PROBLEM: Sharepoint office files are stuck "open" by a user. No other user can access. sharepoint save file can not open for awhile. SharePoint thinks a user still has a lock on.  I can't administratively do anything with the file online.  This has been going on for almost a day. We've cleared cache, closed Excel on his computer, cleared out some local cache directories, rebooted, etc. Nothing is clearing up this lock. It took 1 hours to release. Also many different symptoms when saving on lock issue. CAUSE:  web client service add lock on the file RESOLUTION:  since no need for checkout/checkin, add below registry to disable the lock function of web client service but keep all other functions like explorer view support                                 HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\SupportLocking=0 Registry...

[SharePoint] Versioning Settings menu location for sharepoint 2013

  https://support.microsoft.com/en-gb/office/enable-and-configure-versioning-for-a-list-or-library-1555d642-23ee-446a-990a-bcab618c7a37#OfficeVersion=2016,_2013 1. From top menu Select "PAGE" 2. Select "Library Settings" 3. Select "Versioning settings" 4. Versioning Settings are listed. 

Windows server 2012 install

1. ADD DVD for Windows 2012 2. install 3. select second one Windows Server 2012 R2 Stardard(GUI include server) 4. select second one This is first time installation so do not select upgrade one.  custom : install Windows only(Advanced) 5. select HDD expect 50G for windows 2012, try to minimized for backup later.  6. setup password 7. login 8. right click network 9. configure your ip 10. Remote Desktop Have this issue as well in our environment.  Typical untested patch that makes a headache for large groups of people.  Very irresponsible of the patch team. Remove the tick from the "Allow connections only from computers running Remote Desktop with Network Level Authentication" got us working again Windows Desktop Client to Server 2012 R2

[Cisco] command and CDR log backup by FTP (gw-accounting file)

Below command has been tested with ISR4331 devices.  1. check Cisco device file size command :  a. show current folder dir flash:  b. show all folder and files dir flash 2. check file only start with "cdr." dir flash:cdr.* 3. Remove file (Add option [ /recursive /force]  when you delete file is not recovering free space) delete /recursive /force  flash:cdr.* 4. check subfolder file dir flash:\tracelogs 5. example for log back to ftp https://www.cisco.com/c/en/us/td/docs/ios/voice/cdr/developer/manual/cdrdev/cdrcsv.html#marker-1163166 enable conf t gw-accounting file primary ftp 192.168.1.51/cisco/cdr username cisco password xxxxx secondary sftp 192.168.1.52/cisco/cdr username cisco password xxxxx acct-template callhistory-detail maximum buffer-size  30 maximum retry-count 3 (note : if these setting is not working. check these area, FTP password can not be used @ and some of special characters for this command. Second, ftp location is case sensitive. Please...

vmware esxi 백업

  'ESXi'의 버추얼 머신(Virtual Machine)을 옮기려면 백업파일을 받아야 합니다. 'ESXi'에서 버추얼 머신 백업(backup)하면 다운로드할 수 있습니다. 이 방식으로 버추얼 머신을 백업하고 복원하는 방법을 알아봅시다.  실행 중인 버추얼 머신을 정지시키고 진행해야 합니다.   1-1. 웹에서 다운받기 백업받으려는 가상 시스템을 클릭하고 작업 > 내보내기 를 선택합니다. 2-1. 웹에서 복원하기 가상 시스템 > VM 생성/등록 을 선택하고 '생성 유형'을 'OVF 또는 OVA 파일에서 가상 시스템 배포'를 선택합니다. 위에서 다운받은 백업 파일을 넣어줍니다. 이때 넣어줄 파일은 '*.ovf'와 '*.vmdk'입니다. 하드용량에따라 시간이 걸립니다.  5M-10M 속도로 상당히 느립니다. 

Vmware ESXi Raid change from 0 to 6

    Back up  with NAS or other method Check disk for windows server 192.168.1.250   raid from 0 to  6 instruction https://www.dell.com/support/kbdoc/en-us/000129246/dell-poweredge-how-to-change-the-raid-level-of-a-virtual-disk Purchase below to prepare before starting this.  https://workdone.shop/products/x7k8w 4-Pack 3.5-inch Hard Drive Caddy WH5D2   purchase Brand: Seagate IronWolf Pro Model: ST8000NT001 Qty : 3 (2 for Raid 1, 1 for old HDD  replacement ) https://www.newegg.com/seagate-ironwolf-pro-st8000nt001-8tb/p/N82E16822185077

[Cisco Network] connect by serial and usb & setup IP

Accessing the CLI via PuTTY with a Console Connection Step 1. Connect the switch to the computer using a standard 9-pin serial cable. The Cisco DB9 to RJ45 Console Cable also supports console connections, but only if the switch has an RJ45 Console port. An RJ45 Console port resembles an Ethernet port and is labeled CONSOLE on the back of the switch. Newer laptops don’t have Serial ports on them, so in this case you have to use a USB to Serial adapter. When plugging that into a computer it assigns a COM port number to it that is not COM1. If this is the case for you, you need to know where to look to find the correct COM port number when setting up the connection with PuTTY. Right-click on the Windows logo/Start menu and click on Device Manager to open it. In the Device Manager, you would look to see what COM port is given to the USB adapter. In this case you would need to use COM4 for the Serial line to make the connection.     Step 2. Open the PuTTY application. The  PuT...