I had to use the following step to reset a the root password on a Solaris system the other day. You will need physical access to the system to use these steps.
Press Stop-A on the console or Ctrl-] and send brk from a remote console connection to access the Open Boot PROM (OBP).
NOTE : If you are using TeraTerm-Pro, you send a break from the menu.
Insert a bootable Solaris CD/DVD and boot into single-user mode with boot cdrom -s
If a JumpStart boot server is located on the system’s subnet, and the system was properly configured for JumpStart, you may instead boot over the network into single-user mode with boot net -s
Make a mount point within the /tmp file system by typing mkdir /tmp/mnt
Mount the root partition of your boot disk in /tmp/mnt
e.g. #> mount /dev/dsk/c0t0d0s0 /tmp/mnt
NOTE : To check the device name use the format command.
Edit /etc/shadow with TERM=vt100 vi /tmp/mnt/etc/shadow
Remove the encrypted part of the root password (the second field; fields are separated by colons), save, and exit.
Unmount the file system with umount /tmp/mnt
Reboot the system and assign a new password at a shell prompt with the passwd command.
If you are unable to run vi above, you can edit /etc/shadow using the ed editor.
# ed /tmp/mnt/etc/shadow
s/:………….:/::/ (Note: there are 13 dots in the second field)
I have installed Soalris 10 onto a laptop a few times to see how well it works. It does quite well.
One annoying feature though is that if you backspace all the way back to the prompt and then by mistake try to go one more, like if you hold down the backspace key, Solaris will make a really loud beep. It gets really annoying, really quickly.
To turn it off you need to run
/usr/openwin/bin/xset b 0
It also seems to do this at startup. I haven’t figured out how to disable that yet. Do you know ?
Every time I have to setup users in MySQL I seem to have problems.
I was setting up a system to do some WordPress testing and installed MySQL OK, but ran into problems with the users and permissions. Again.
So I had to search the net, again, and find out what I was doing wrong, again.
Maybe I’m just used to the way oracle does it, my MySQL does it in a strange way, why is it so hard ?
One of the jobs I do the most as a DBA is added space to peoples schemas. It’s not a big thing, just something I have to monitor and watch out for. Users don’t like it when they can’t save their data into the database.
Below is a script that simplifies the main tasks required to do this.
One of the cool new features of Oracle 10g is Flasback.
“Flashback Database quickly rewinds an Oracle database to a previous point in time to correct any problems caused by logical data corruptions or user errors. Flashback Database is like a “rewind button” for your database. It is similar to conventional point-in-time recovery in its effects: it allows you to return a database to its state at a time in the recent past. However, it eliminates the time required to restore backup files.”
To enable flashback on your 10g database is fairly simple.
We’ve had an Oracle Manage Server (OMS) running here at work for some time now. I think it was setup by a DBA who worked here years ago. The previous DBA didn’t use it so when I came to the job he told me to just login locally to OEM and not worry about using it.
I had some spare time the other day and thought I would have a look into what it could do. One of the first problems I ran into though was that I had to reset my password. Of course I didn’t have the admin password, and the last DBA doesn’t work here any more. So I had to find out how to reset the sysman password.
I have been playing with Oracle Management Server at work receenty to try and mke the management of all our Oracle 8i and 9i databases a little easier.
One of the thing I want to setup was something to monitor the amount of tablespace left in each tablespace. I already had a clunky way to do it using PL/SQL, shell scripts and web pages. But OMS looked like a better way to do it.