Montagem e Reparação de computadores. Recuperação de dados. Suporte à sua empresa. Solicite já um orçamento! Contacte: errorsolutions.blogspot@gmail.com
Tuesday, November 20, 2012
Change motherboard without reinstall windows XP - bluescreen - 0x0000007b
Friday, November 9, 2012
MS-Dos - Internal commands/Batch file commands
Internal commands
- BREAK
- Controls the handling of program interruption with Ctrl+C or Ctrl+Break.
- CHCP
- Displays or changes the current system code page.
- CHDIR, CD
- Changes the current working directory or displays the current directory.
- CLS
- Clears the screen.
- COPY
- Copies one file to another (if the destination file already exists, MS-DOS asks whether to replace it). (See also XCOPY, an external command that could also copy directory trees).
- CTTY
- Defines the device to use for input and output.
- DATE
- Display and set the date of the system.
- DEL, ERASE
- Deletes a file. When used on a directory, deletes all files.
- DIR
- Lists the files in the specified directory.
- ECHO
- Toggles whether text is displayed (ECHO ON) or not (ECHO OFF). Also displays text on the screen (ECHO text).
- EXIT
- Exits from COMMAND.COM and returns to the program which launched it.
- LFNFOR
- Enables or disables the return of long filenames by the FOR command. (Windows 95/98/Me only).
- LOADHIGH, LH
- Loads a program into upper memory (HILOAD in DR DOS).
- LOCK
- Enables external programs to perform low-level disk access to a volume. (Windows 95/98/Me only).
- MKDIR, MD
- Creates a new directory.
- PATH
- Displays or changes the value of the PATH environment variable which controls the places where COMMAND.COM will search for executable files.
- PROMPT
- Displays or change the value of the PROMPT environment variable which controls the appearance of the prompt.
- REN, RENAME
- Renames a file or directory.
- RMDIR, RD
- Removes an empty directory.
- SET
- Sets the value of an environment variable ; Without arguments, shows all defined environment variables.
- TIME
- Display and set the time of the system.
- TRUENAME
- Display the fully expanded physical name of a file, resolving ASSIGN, JOIN and SUBST logical filesystem mappings.
- TYPE
- Display the content of a file on the console.
- UNLOCK
- Disables low-level disk access. (Windows 95/98/Me only)
- VER
- Displays the version of the operating system.
- VERIFY
- Enable or disable verification of writing for files.
- VOL
- Shows information about a volume.
[edit]Batch file commands
- :label
- Defines a target for GOTO.
- CALL
- Executes another batch file and returns to the old one and continues.
- FOR
- Iteration: repeats a command for each out of a specified set of files.
- GOTO
- Moves execution to a specified label. Labels are specified at the beginning of a line, with a colon (:likethis).
- IF
- Conditional statement, allows to branch the program execution.
- PAUSE
- Halts execution of the program and displays a message asking the user to press any key to continue.
- REM
- comment: any text following this command is ignored.
- SHIFT
- Replaces each of the command-line variables with the subsequent one (e.g. %0 with %1, %1 with %2 etc.).
Ms-Dos parameters/arguments - Batch files
%~1 | - | expands %1 removing any surrounding quotes (") |
%~f1 | - | expands %1 to a fully qualified path name |
%~d1 | - | expands %1 to a drive letter only |
%~p1 | - | expands %1 to a path only |
%~n1 | - | expands %1 to a file name only |
%~x1 | - | expands %1 to a file extension only |
%~s1 | - | expanded path contains short names only |
%~a1 | - | expands %1 to file attributes |
%~t1 | - | expands %1 to date/time of file |
%~z1 | - | expands %1 to size of file |
%~$PATH:1 | - | searches the directories listed in the PATH environment variable and expands %1 to the fully qualified name of the first one found. If the environment variable name is not defined or the file is not found by the search, then this modifier expands to the empty string |
%~dp1 | - | expands %1 to a drive letter and path only |
%~nx1 | - | expands %1 to a file name and extension only |
%~dp$PATH:1 | - | searches the directories listed in the PATH environment variable for %1 and expands to the drive letter and path of the first one found. |
%~ftza1 | - | expands %1 to a DIR-like output line |
Friday, October 26, 2012
How to read windows dump file
http://msdn.microsoft.com/en-us/library/5a4x27ek.aspx
Install Windows Software Development Kit (SDK) for Windows 8
http://msdn.microsoft.com/en-US/windows/hardware/hh852363
Details:
http://support.microsoft.com/kb/315263/en-us?wa=wsignin1.0
symbol search path > http://msdl.microsoft.com/download/symbols
image source path > z:
my z: is the windows folder of a windows 2003 server installation because my dump is from windows 2003 server.
Placeholder | Explanation |
---|---|
SymbolPath | Either the local path where the symbol files have been downloaded or the symbol server path, including a cache folder. Because a small memory dump file contains limited information, the actual binary files must be loaded together with the symbols for the dump file to be correctly read. |
ImagePath | The path of these files. The files are contained in the I386 folder on the Windows XP CD-ROM. For example, the path may be C:\Windows\I386. |
DumpFilePath | The path and file name for the dump file that you are examining. |
Using command-line
- Go to C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86 directory (in 32bits machine)
Example
- C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x86> kd -y srv*c:\symbols*http://msdl.microsoft.com/download/symbols -i z:\ -z E:\my_dump_files\MEMORY.DMP
After the first info you can go deep writing:
- !analyze -v
To exit
- q
Using win app:
Start > all programs > windows kits > debugging tools for windows > windbg
File > symbol search path > http://msdl.microsoft.com/download/symbols
File > image source path > z:
click !analyze -v for deep analysis
Linux change the speed and duplex settings of an Ethernet card
# ethtool eth0
Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full Advertised auto-negotiation: Yes Speed: 100Mb/s Duplex: Full Port: MII PHYAD: 32 Transceiver: internal Auto-negotiation: on Supports Wake-on: pumbg Wake-on: d Current message level: 0x00000007 (7) Link detected: yes
Task: Change the speed and duplex settings
Setup eth0 negotiated speed with ethtool# ethtool -s eth0 speed 100 duplex full
# ethtool -s eth0 speed 10 duplex half
To make these settings permanent you need to create a shell script and call from /etc/rc.local(Red Hat) or if you are using Debian create a script into the directory /etc/init.d/ directory and run update-rc.d command to update the script.
Monday, October 15, 2012
RAID 10 Vs RAID 01 (RAID 1+0 Vs RAID 0+1)
RAID 10 is not the same as RAID 01.
RAID 10
- RAID 10 is also called as RAID 1+0
- It is also called as “stripe of mirrors”
- It requires minimum of 4 disks
- To understand this better, group the disks in pair of two (for mirror). For example, if you have a total of 6 disks in RAID 10, there will be three groups–Group 1, Group 2, Group 3 as shown in the above diagram.
- Within the group, the data is mirrored. In the above example, Disk 1 and Disk 2 belongs to Group 1. The data on Disk 1 will be exactly same as the data on Disk 2. So, block A written on Disk 1 will be mirroed on Disk 2. Block B written on Disk 3 will be mirrored on Disk 4.
- Across the group, the data is striped. i.e Block A is written to Group 1, Block B is written to Group 2, Block C is written to Group 3.
- This is why it is called “stripe of mirrors”. i.e the disks within the group are mirrored. But, the groups themselves are striped.
- RAID 01 is also called as RAID 0+1
- It is also called as “mirror of stripes”
- It requires minimum of 3 disks. But in most cases this will be implemented as minimum of 4 disks.
- To understand this better, create two groups. For example, if you have total of 6 disks, create two groups with 3 disks each as shown below. In the above example, Group 1 has 3 disks and Group 2 has 3 disks.
- Within the group, the data is striped. i.e In the Group 1 which contains three disks, the 1st block will be written to 1st disk, 2nd block to 2nd disk, and the 3rd block to 3rd disk. So, block A is written to Disk 1, block B to Disk 2, block C to Disk 3.
- Across the group, the data is mirrored. i.e The Group 1 and Group 2 will look exactly the same. i.e Disk 1 is mirrored to Disk 4, Disk 2 to Disk 5, Disk 3 to Disk 6.
- This is why it is called “mirror of stripes”. i.e the disks within the groups are striped. But, the groups are mirrored.
Main difference between RAID 10 vs RAID 01
- Performance on both RAID 10 and RAID 01 will be the same.
- The storage capacity on these will be the same.
- The main difference is the fault tolerance level. On most implememntations of RAID controllers, RAID 01 fault tolerance is less. On RAID 01, since we have only two groups of RAID 0, if two drives (one in each group) fails, the entire RAID 01 will fail. In the above RAID 01 diagram, if Disk 1 and Disk 4 fails, both the groups will be down. So, the whole RAID 01 will fail.
- RAID 10 fault tolerance is more. On RAID 10, since there are many groups (as the individual group is only two disks), even if three disks fails (one in each group), the RAID 10 is still functional. In the above RAID 10 example, even if Disk 1, Disk 3, Disk 5 fails, the RAID 10 will still be functional.
- So, given a choice between RAID 10 and RAID 01, always choose RAID 10.
- Gx is the name of the groups
- Dx is the name of the disks
For loosing your file, you need to loose G1 OR G2 OR G3. To loose G1, you need to loose D1 AND D2, to loose G2 you need to loose D3 AND D4 and to loose G3 you need to loose D5 AND D6.
=> probability of loosing your file : (f*f)+(f*f)+(f*f) = f²+f²+f² = 3f²
For loosing your file, you need to loose G1 AND G2. To loose G1 you need to loose D1 OR D2 OR D3, and to loose G2 you need to loose D4 OR D5 OR D6.
=> probability of loosing your file : (f+f+f)*(f+f+f)=3f*3f=9f²
- on RAID 10, if one disk fails, when the second failure appears, I have 1 possibility between 5 that this makes my entire system fail (the other disk in the group)
- on RAID 01, if one disk fails, when the second failure appears, I have 3 possibilities between 5 that this makes my entire system fail (any disk in the other group)
1,3 Up Up
1,4 Down Up
1,5 Down Up
1,6 Down Up
2,3 Up Up
2,4 Down Up
2,5 Down Up
2,6 Down Up
3,4 Down Down
3,5 Down Up
3,6 Down Up
4,5 Up Up
4,6 Up Up
5,6 Up Down
Some performance tests:
http://www.zdnet.com/blog/ou/comprehensive-raid-performance-report/484
Thursday, August 30, 2012
How do you transfer or export SQL Server 2005 data to Excel
- Right-click the database in SQL Management Studio
- Go to Tasks and then Export data, you'll then see an easy to use wizard.
- Your database will be the source, you can enter your SQL query
- Choose Excel as the target
- Run it at end of wizard
If you wanted, you could save the SSIS package as well (there's an option at the end of the wizard) so that you can do it on a schedule or something (and even open and modify to add more functionality if needed).
Option 2:
- Select menu item Query > Query Options.
- Set check box in Results > Grid > Include column headers when copying or saving the results.
After that, when you Select All and Copy the query results, you can paste them to Excel, and the column headers will be present.
Option3:
- Open Excel Data>Import/Export Data>Import Data Next to file name
- Click "New Source" Button On Welcome to the Data Connection Wizard,
- Choose Microsoft SQL Server. Click Next.
- Enter Server Name and Credentials.
- From the drop down box, choose whichever database holds the table you need.
- Select your table then Next.....
- Enter a Description if you'd like and click Finish.
When your done and back in Excel, just click "OK" Easy.
Thursday, August 23, 2012
Linux change the speed and duplex settings of an Ethernet card
Task: Get speed and other information for eth0
Type following command:# ethtool eth0
Output:
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
Link detected: yes
Task: Change the speed and duplex settings
Setup eth0 negotiated speed with ethtool# ethtool -s eth0 speed 100 duplex full
To make these settings permanent you need to create a shell script and call from /etc/rc.local(Red Hat) or if you are using Debian create a script into the directory /etc/init.d/ directory and run update-rc.d command to update the script.
# ethtool -s eth0 speed 10 duplex half
Read man page of ethtool for more information.
Monday, August 20, 2012
LDAP test connection
Use LDAP browser tool to test connections
http://www.ldapadministrator.com/download.htm
It’s free and works well
Tuesday, August 14, 2012
How can I move my database files in SQL Server?
- Start SQL Server Management Studio
- Expand the server instance, expand Databases
- Right-click the database you want to move, and choose "Properties"
- In the Properties window, choose "Files" and write down the current file paths. Click "Cancel"
- Right-click the database again, and choose "Tasks - Detach..."
- Click "OK" in the next window
- Use Windows Explorer to move the data and log files (.mdf and .ldf) to the new location
- Right-click Databases, and choose "Attach..."
- In the "Attach databases" window, click "Add"
- In the "Locate database files" window, browse to the new location and select the .mdf file. Click "OK"
- In the details pane, verify that the new location is listed for both the .mdf and the .ldf file. Click "OK"
- In SQL Server Management Studio, choose "View - Refresh" and verify that your database is listed again under Databases
Monday, July 2, 2012
Search and remove files - UniX (find) - Getting error: argument list too long
Linux or UNIX - Find and remove file syntax
find . -name "FILE-TO-FIND"-exec rm -rf {} \;
find . -type f -name "FILE-TO-FIND" -exec rm -f {} \;
More Examples of find command
$ find . -type f -name "*.bak" -exec rm -f {} \;
# find / -name core -exec rm -f {} \;
$ find . -type f -name "*.bak" -exec rm -i {} \;
rm: remove regular empty file `./data0002.bak'? y rm: remove regular empty file `./d234234234fsdf.bak'? y rm: remove regular empty file `./backup-20-10-2005.bak'? n
Friday, June 29, 2012
Command to Compress/Uncompress tar.gz and tar.bz2 files
Compress folder Test/ to Test.tar.gz
tar czfv Test.tar.gz Test/
czfv = ‘Compress Zip File Verbose’
If you want bzip files, use ‘j’ instead of ‘z’.
Uncompress Test.tar.gz to folder Test/
tar -xzf Test.tar.gz
x = ‘eXtract’
Again, if you want bzip files, use ‘j’ instead of ‘z’.
Wednesday, May 30, 2012
How can I change or add OEM logo and information on my computer?
By default, the General tab (right-click My Computer, or double-click System in Control Panel) contains information on the Windows version, processor, memory, registered user and registration identity
Optional items include the manufacturer and model, a small picture, and a button leading to a separate page of support information.
The information is not held in the registry, but in an old-style .INI file, which can be created in any plain-text editor including Windows Notepad.
This file can have two sections:
The first section, has a section header called [General], and within that section - two entries:
Manufacturer=
Model=
The second section, headed [Support Information], is optional, but if present adds a button with that label to the page. The entries after that heading should be in the form:
Line1=
Line2=
Line3=
and so on. The limit on the number and length of lines seems limited only by the 64 KB general limit on .INI files.
The file should be saved in the %systemroot%\system folder (for Windows 98/ME computers) or in %systemroot%\system32 folder (for W2K/XP/2003 computers) as OEMINFO.INI.
The picture is a 256-colour-Windows bitmap (.BMP) file.
Microsoft states that the size should be 96 pixels square when using small fonts in Display Property settings, or 120 square with large fonts.
The file should be saved in the %systemroot%\system folder (for Windows 98/ME computers) or in %systemroot%\system32 folder (for W2K/XP/2003 computers) as OEMLOGO.BMP.
No other entry in the .INI file is required, but the latter must exist and have a populated [General] section for the bitmap to be visible in Display Properties.
No reboot is necessary in order for the hack to take place. Press the ÿ +BREAK keys and see for yourself.
For example, using this OEMINFO.INI file:
[General]
Manufacturer=Self made Computer
Model=Zelda K12
[Support Information]
Line1=Visit my home page at
Line2=
Line3=http://www.errorsolutions.blogspot.com
Line4=
Line5=For hundreds of tips, tricks, knowledge base articles and much more!
Line6=
Line7=You can also contact me by using the following e-mail address:
Line8=
Line9=errorsolutions.blogspot@gmail.com
Dual boot with Vista/Win7 installed
1 - Execute o boot pelo CD de instalação do Windows XP e instale-o em uma partição ou disco rígido diferente diferente de onde o Vista está. Quando a instalação tiver terminado, o computador irá iniciar o Windows XP por padrão. Mas não se preocupe, o Windows Vista ainda está em seu computador (se você o instalou em uma partição ou HD diferente).
2 - Quando você instalou o XP, o Vista Boot Manager foi substituído pelos componentes de boot do Windows XP. O Vista Boot Manager precisa ser corrigido usando o DVD de instalação do Windows Vista. Execute o boot pelo DVD do Vista, clique em Next nas opções regionais e clique em Reparar seu computador no canto inferior esquerdo da janela. Selecione sua instalação do Windows Vista e escolha o Startup Repair. Isto irá corrigir o Windows Boot Manager e o Windows Vista será iniciado por padrão.
3 - Agora precisamos adicionar uma entrada ao Windows Boot Manager para o Windows XP. Isto é feito dentro do Windows Vista. Abra o prompt de comando como Administrador e execute os comandos abaixo:
bcdedit /create {ntldr} /d "Windows XP"
bcdedit /set {ntldr} device boot
bcdedit /set {ntldr} path \ntldr
bcdedit /displayorder {ntldr} /addlast
4 - Reinicie seu PC e teste seu menu de boot.
Com isso, o dual boot foi configurado em seu computador.
How I change the default start path for cmd.exe in Windows 7
How I change the default start path for cmd.exe in Windows 7
Tuesday, January 10, 2012
Send to Location in Windows 7 (sendto)
Here it is....