Category Archives: How to Fix

Using dism to fix Windows Update errors

Install IIS times in the server 2012 system made the mistake, the error code of 0 x800736cc, checked the official community found this problem is the system by some tools to optimize the damaged system files or some other operation, cause the system can’t install updates installed (IIS is also a system update process), the solution is as follows:
1. If the system can be networked
The administrator opens a command prompt, runs the following command, and scans the current system for corrupted or modified components. After scanning, the current system components are listed as corrupted or modified

DISM.exe /Online /Cleanup-image /Scanhealth

Note: scan time is generally within 15 minutes, but in some machines on time may be more long, can see the progress bar seems to have stopped, but in fact scanning continues, so don’t cancel, the patient can

the scanning process is just a list of the current system is damaged or modified components, can skip in theory, run the following repair orders directly, can repair component

DISM.exe /Online /Cleanup-image /Restorehealth





2. If the system cannot be connected to the Internet
In the offline environment, the online repair orders above clearly with no, we can use the system image offline repair, need to be aware of is the use of a mirror image of the need to tell you the current system version corresponds to the
(1) the system image “loaded” into the system


(2) the administrator open a command prompt, run the following repair order can begin repair, where X loading for you to drive a mirror image of the current system directory

Dism /Apply-Image /ImageFile:X:\sources\install.wim /Index:1 /ApplyDir:C:\


(3) if the above method cannot be repaired, try to extract the system image directly, extract the sources folder to the local, directly specify the sources folder for offline repair, where X is the disk character where the directory is extracted

Dism /Online /Cleanup-Image /RestoreHealth /Source:X:\sources /LimitAccess

MySQL error: error 1010 (HY000) when deleting database

mysql> drop database testdb;

ERROR 1010 (HY000): Error dropping database (can’t rmdir ‘./testdb/’, errno: 17)

mysql> select @@datadir;

+————————+

| @ @ datadir |

+————————+

| /usr/local/mysql/data/ |

+————————+

1 row in set (0.00 SEC)
The reason is that there are files other than database files in the directory of data /usr/local/mysql/data/. You can CD to its directory after clearing it out. Drop again
[root-@localhost104 testdb]# CD testdb
[root-@localhost104 testdb]# ll
total 0
-rw-r — r-1 root root 0 Jul 23 10:22 delete.txt
[root-@localhost104 testdb]# rm delete.txt
rm: Remove regular empty File ‘delete.txt’?yes
mysql> drop database testdb;
Query OK, 0 rows affected (0.06 SEC)
The database directory cannot hold files unrelated to the database!

C + +: error in X utility file

In the middle of writing the program and testing it, there were a bunch of syntax errors that came from xUtility files.
opens the xutility file, which defines many constructs and function templates. Find the source of the error is not found, because it is similar to the lack of; “And so on. So back before writing the code, and finally found the problem: in the global defines a short function, then the short function and a function template name repetition, combined with the incoming parameters when calling type does not conform to the global defines the type of function, to the template, but does not define the type of template function, hence lead to errors.
correction method:
1. Change function name, error parameter type will report the correct position
2. Use scope to avoid ambiguity caused by improper parameter types

mysql ERROR:1396

Cause:
First delete the user, then create the user, execute the SQL:

 create user yong@localhost identified by '111111'

Exception:

ERROR 1396 (HY000): Operation CREATE USER failed for 'yong'@'localhost'

Solution:

flush privileges;
drop user yong@localhost;
flush privileges;

win7 VMware Error:1325 Documents Is not a valid short name solution

Recently, when installing VMware8.0 in Win7, I encountered Error:1325 Documents is not an valid short name. I still cannot install it. There are many answers on the Internet, but I failed to solve them one by one. Finally, combined with the solutions on the Internet, I summed up an effective method, at least on my machine is a success.
Found in the registry HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders directory, double-click the Favorites options. The diagram below:

Check whether the computer has D partition (D disk). If it does not (where the problem is), set it as follows:


Change the partition identifier specified by the Favorites string. Mine is D:\Favorites.
Note: at the beginning, there were no D disks on my machine, there were C, E, F and G disks, but I changed G disks to D disks.

A solution to the refusal of rdesktop connection to windows host

1. On the Windows host to be connected, right click ‘My Computer’ -& GT; Attribute “- & gt; “Advanced System Settings” – & GT; Remote setting “-& GT; In the Remote Desktop option, select the connection that allows you to run any version of the remote desktop. 2. Check whether the Linux host and the Windows host to be connected can ping each other; 3. Check whether the IP address appended to rdesktop is correct; 4. Create passwords for users on Windows hosts. Sometimes rdesktop cannot support password-less remote connections. 5. Close the firewall on the Windows host.
in general, rdesktop can connect to remote Windows hosts after the above five steps.

Ora-00257: archiver error. Connect internal only, until free

No configuration environment variable is loaded once
The source/home/oracle 11 g /. Following
Connect super administrator
(1) SQLPLUS/AS SYsdBA;
There are errors under The Times

(2) SQLPLUS SYS/Password as SYsdBA

Look at V$FLASH_RECOVERY_AREA_USAGE to see how the archive directory is being used. Sure enough, the file is full.
SYS@ orcl> select * from V$FLASH_RECOVERY_AREA_USAGE;

Note: As you can see, ARCHIVELOG logs have reached 99.9%. The reason why the archive is full is that a user is doing a lot of add, delete and change operations, which results in a lot of redo logs.
archive logs switch frequently. The solution is to clear out a lot of archived logs!
there are two ways to solve this problem.
1 use RMAN to clear archive logs.
2 modify the size of the flashback recovery area DB_RECOVERY_FILE_DEST_SIZE.

the first method USES RMAN to clear archive logs.
[root@oracle fast_recovery_area]# rman target sys/Huawei12#$
Note: System is Oracle user, MyOracle is Oracle user password, orCL is the database name SID of connection.
RMAN> crosscheck archivelog all;
RMAN> Delete noprompt EXPIRED Archivelog all;
Note: Delete expired archives
This removes the archive. Go into SQLPlus again to see ARCHIVELOG log usage!
 
The second method is to increase the size of the flash recovery area. As follows:
SYS@ orcl> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=8g;
Make a backup strategy in the archived data. To avoid causing the problem.
configure retention policy to recovery window of 15 days;
or delete the log information at backup time. Use rman Target sys/Huawei12#$to execute the following two commands
DELETE ARCHIVELOG ALL COMPLETED BEFORE ‘SYSDATE-7’; // Delete an archive from 7 days ago
DELETE ARCHIVELOG FROM TIME ‘SYSDATE-7’; // Delete seven days to the present archive
After I delete it

“Method does not override method from its superclass”

The @override annotation in IDEA gives error message “Method does not override Method from its superclass”

Cause of problem:
!! First check to see if the method overloads a parent class. If it doesn’t have a parent class, using @override will get an error.
!!!!!! Check to see if the method name/parameter is different when overloaded;
if none of the above problems exist, it may be the following reasons:
!! There are bugs in IDK5 version of the reference; Override is already available in JDK5, but does not support the implementation of the interface, arguing that it is not override error. JDK6 fixes this bug by annotating either the Override of the parent method or the implementation of the interface with @override.
Project Structure—->

select the version above 6 in the Project language level.

2. After this setting, the problem has not been solved. The following Settings are required:
file– > Project Structure—–> Modules

STOP: c000021a { Fatal System Error } the initial session process or system process terminated …

Error:
STOP: c000021a { Fatal System Error } the initial session process or system process terminated unexpectedly with a status of 0x000000001 (0xc0000034 0x0010038c). The system has been shut down
What went wrong:
Windows7 automatic upgrade to windows10, restart the computer after the beginning of the first step “file copy” process, because to be eager to use the computer, but the replication speed is very slow, waited for almost three minutes to copy 1%, the operation interface and there is no return or undo options, so I decided to force a shutdown. Then the tragedy, boot again, after the display of boot animation will enter the blue screen mode, blue screen display error as above.
try safe mode entry and system recovery will not work, keep going into this terrible blue screen mode.
this is obviously a software error, not hardware related. And the system handler error (abnormal termination), copy 1%, the problem should not be serious.
through PE, can enter the disk and access all the contents of the system disk.
Check the files under the system32 directory of the system disk, found that not many files have been changed, the generated log files are not affected, and several files under C:\Windows\System32\config have been changed.
Solutions:
Copy C:\Windows\System32\config\RegBack to C:\Windows\System32\config

SFTP login error: fatal error: received unexpected end of file from SFTP server

STFP suddenly failed to log in, no restart, no configuration change, and suddenly an error was reported
ERROR: Received unexpected end-of-file from SFTP server
ERROR: unable to connect to server
status: waiting for retry…

The first possibility:
Password expired, change password, verify this problem, just su (SFTP username) on the server, for example: su Test

If the password prompt has expired, directly change the password, you can log in
Change password command
1. Switch to SFTP user: Su Test
2. Enter the old password for Test
3. Press the prompt to enter a new password. Don’t repeat the old password
Suggestion: The password expiration time can be changed, the default is 90 days, we can change a little longer
 
The second possibility:
Modify the configuration file and remember to back up the file
1. The vi/etc/SSH/sshd_config
Delete the Subsystem SFTP/usr/libexec/openssh/SFTP – “#” in front of the server,
Save the exit and restart SSH
# service SSHD restart
Then reconnect to the FTP test.