The Multifunctioning DBA

March 31, 2009  3:57 PM

Sybase Learning Continued

Colin Smith Colin Smith Profile: Colin Smith

Today I came back into the office after having a week off. It is always hard to come back into the office but it is nice to get back into the swing of things as well. When I arrived I found some new Sybase books sitting on my desk. Now I know that my company is not going to send me to another class right now in these rough economic times so it was a nice surprise to see the books. Unfortunately, they are the old books of a former employee here. None the less, I plan on reading the books and trying to do as many of the labs as I can. I will be posting in the future about what I am learning here. I have some ASE Performance and Tuning as well as Advanced Administration and Troubleshooting books. I am really looking forward to the Performance and Tuning guide as I would love to make our end users experience better. I will keep you posted on my progress.

March 30, 2009  9:57 PM


Colin Smith Colin Smith Profile: Colin Smith

So I have people ask me all the time how I can get so much done in a day. I have to be honest with you, I do not really do that much. This is because I write scripts to do anything and everything for me if I have to do it more than once I script it. If I think something might be useful I script it. I hate doing the same work over and over. Take something as simple as creating a new user on a domain. This is a very simple task in AD but it takes about 2 minutes per account. It is easy to find a script that will create mass accounts with some generic name. Why not take that same script and make it so it creates one account at a time or ten or whatever you need. You can make it so you type in the name of the user interactively or read names in from a list that you have. Simple things like that. Creating this account only takes 2 minutes in AD but I can do it in under 10 seconds.

When you work in the fast paced world like we do, especially in IT where everyone wants it now now now, every second counts. Saving just under 2 minutes does not seem like a lot but that is the just the beginning. If you save 5 minutes here and 10 there and 2 there then it adds up very fast so you can leave work an hour early, or you just make your boss think that you are that much better and more effective. It does not really matter if you are a Windows person or a Unix/Linux person. SCRIPT anything you can and save time.

I come from a Windows background and in this area the Unix/Linux admins are years ahead of the Windows users. I had done some automation using VBScript when I was a Windows Admin, but when I got into Unix for Database Admin, I quickly learned that scripting is the way. Now with Windows Powershell, Windows administrators can be much more effective in less time. Please learn a scripting language that is of use to you and that you understand. I prefer Powershell but VBscript is a good way to go if you like it better.

Good luck scripting and as always, if you have a question let me know by heading to and click the ‘Submit a Question’ link on the right.

March 30, 2009  9:41 PM

Changing Perfstat Job

Colin Smith Colin Smith Profile: Colin Smith

I got a question about how I would change the Prefstat Statspack job in Oracle to run at 15 minute increments during the day when OLTP transactions are occurring and then change it to run only onve every hour during off hours while batch is running. Since the user already had the PL\SQL to change the job my answer is to build that SQL into a shell script that is scheduled in CRON. Have two jobs. One that changes the time to once an hour and one that changes back to every fifteen minutes. In the script just make a connection to the DB, run the SQL, Log the changes and perhaps build in some logic to alert you if the changes were not made. Sounds pretty basic and I will try to work out the shell scripts and have them posted tomorrow.

If you have a question please head over to and click the ‘submit a question’ link to the right. Thanks

March 26, 2009  5:20 PM

Free Space or Mount Points

Colin Smith Colin Smith Profile: Colin Smith

I had a question about getting free space of mount points on a windows server. The user had some Exchange servers with a huge chunk of san disk attached. Then he mounted drive letters into empty folders on that disk. This gave him multiple mount points on that one volume. Now he wants to be able to report on each mount point individually. I do not have any servers that have been set up this way and I am out of the office all week. I did find this post in anther forum though.

PS C:\WINDOWS> gwmi win32_volume|where-object {$_.filesystem -match “ntfs”}|ft name,capacity,freespace

name capacity freespace

—- ——– ———

C:\ 20973137920 12781355008

D:\ 88266911744 30121046016

E:\ 36410552320 11617628160

D:\Mounts\D02\ 1924139716608 1785309392896

D:\Mounts\D03\ 1099506044928 1016254210048

D:\Data\Shared\D01\ 2186130853888 697559801856

And here is a link to the forum that I found it. I have not attempted this as I do not have any servers with this type of mount point but try it and I hope that it works. I am not sure if it will though since win32_logical disk, I do not think it will report like this. I also know that you can try win32_mountpoint and this will get you a list of all your mounts. You may be able to do some work and math using that to figure out the free space. I will try to set this up once I return to the office and see if I can work something out if this does not work.

March 25, 2009  6:08 PM

Interview Update

Colin Smith Colin Smith Profile: Colin Smith

I had told you that I had an interview with a company here in the valley and I just wanted to let you know what happened with that. The job description online talked about Windows and Exchange Administration. The title was Network Analyst and that sounded strange to me. The title did not fit the job description. I submitted my resume and they called me in. When I arrived they had a test for me to take. This test did have some Windows Administration questions, no Exchange questions, and a ton of Cisco Networking questions. I took the test, sure that I did not do well in the networking area as I am not a network admin and certainly not CCNA. The interview actually did go well and I think that they liked me but I did fail the test. I asked them about the description and asked why it did not say anything about Cisco since they told me they were looking for someone with CCNA. They said they consider it to be one in the same. That really shocked me, I do not think Windows and Exchange Administration have much of anything in common with CCNA Network Administration.

Oh well, I am happy to have had the opportunity to interview with them and perhaps they will call back if another opportunity arises with them. The interview did start me thinking that I perhaps should look into some networking and Cisco training. I know that companies are feeling the crunch just like everyone else right now and the more you know the better off you will be.

March 25, 2009  6:01 PM

Customer Service Rant Cont.

Colin Smith Colin Smith Profile: Colin Smith

Back on the 17th I posted a rant about customer service. I was having a problem with a warranty company. I am not going to name the company or the Electronics store that sold me the warranty. After that post I continued to have problems getting the light bulb replacement for my TV. I called and called and complained and had multiple managers of at the warranty company tell me that they would take ownership of my issue. I was promised on two occasions about when my light would arrive but it did not show either time. Finally 3 full weeks after submitting my claim for this easy to replace covered part I did finally get the lamp.

Since then I have been contacted by the warranty company’s upper management and they tell me that this light is free and I can still have two more. That is great but if it is this much of a hassle again I would rather just buy my own I told them. They continued on and talked to me about what I thought should be different in order to make other cases like mine better for the customer. I gave them some thoughts and did not hold back about anything. Since that I have been contacted by two more upper management members, one was from The Office of The President of the company, and have been told that they are putting some of my suggestions into action.

That is what really made me feel that they do care. I do not mind mistakes, we all make them, but when it affects a customer in such a negative manner. I expect that the company, or person, that made the mistake to go the extra mile to make it right. I do not feel that happened immediately with this company but I do now. I had also written the Electronics store telling them that I would no longer do business with them if this is the type of company that they choose to do business with. This store also took action and contacted the warranty group to find out what was going on. That to me also is above and beyond since they do not handle the actual warranty. I am going to mention that it was Ultimate Electronics. They, from the first complaint I made to them, took the initiative to try and work it out for me. They also called me back, not only to verify that things worked out, but also to make sure that they did not lose me as a customer and they gave me a $50.00 gift certificate. This was not necessary but it certainly is appreciated and Ultimate has my business for life after this.

March 19, 2009  4:25 PM


Colin Smith Colin Smith Profile: Colin Smith


I was just informed about a great contest that ITKE is doing for some free Xbox systems. They are literally handing out three systems. Please check this out, get involved with the community here, show off your skills and get some free bling. Even if you have an Xbox or do not play games you can do so much more with these systems. Get all the details here:

March 19, 2009  2:37 PM

Oracle Upgrade Cont.

Colin Smith Colin Smith Profile: Colin Smith

I have completed the Oracle Upgrade on our test system and then rolled back to Oracle 9 and upgraded the DB again to

This process was pretty straightforward. The company whose application uses this Database has some useful tools to utilize during the upgrade process. One gives you the ability to modify the SPFILE directly without causing any issue. I would not normally do this but the tool is very nice. I used the DBUA to complete the upgrade and I upgraded the Database in place. That is to say that I did not have to copy the Data files to a separate location before doing the upgrade.

I ran into two snags on the second run and both were easily resolved. First is the Listener, I was not able to start or stop it. It kept telling me that the password was not recognized. Now I am not sure why this listener has a password on it as this is not the standard setup for us. I could see that the password was in the listener.ora file and not encrypted. I tried to change the password, and I tried to pass the password to lsnrctl but it kept telling me that it was wrong. To resolve this I finally ps –ef | grep lsnrctl and found the listener process. I killed it. I then was able to do a lsnrctl start and the listener started. I am now able to do anything I need to the listener. Just a strange and frustrating issue.

The second is that the DBUA put the ARCHIVE_MODE into a NO ARCHINVE state. This caused an issue when doing a hot backup. The Hot backup script is custom made by the application developers and requires that the ARCHIVE_MODE be in ARCHIVE. I had to bring the DB down and do a startup mount. Then I was able to change this and restart the DB again. Now everything seems to be working and I will be starting the upgrade on our production cluster and failover standby database next week.

If you have any questions let me know by leaving a comment or head over to and click on the submit a question link on the right.

March 18, 2009  7:58 PM

Powershell VS VBScript

Colin Smith Colin Smith Profile: Colin Smith

My wife works for a large company as an accountant for a company here in Phoenix and she called me one day asking if I could put a script together that would do some file manipulation and combine multiple files into one. I said no problem. You tell me what you need and I can do it in Powershell. She told me everything that she wanted it to do and provided me with some sample input files to work with. I would put the scripts on here but they are so unique to what she needs that I do not think they would help anyone else. Anyway, I got it done in Powershell and I called her and emailed her the file and said let me know. She informed me that she did not have powershell on her machine at work and that it would not work. I later went to her office and found that they are using Windows 2000 so Powershell is not even supported. I thought well I guess I could do it in VBScript.

I went back to my computer and started hammering out the code. I finished the script and found that I had over 200 lines of code. I went back to my Powershell script and found that I had just over 30 lines. To me Powershell wins hands down just because of that. With the ease of the pipe I am able to write much less code and accomplish so much more.

Let me know your thoughts on Powershell VS VBScript by leaving a comment or heading to and clicking on the Submit a Question link on the right.

March 17, 2009  2:36 PM

Customer Service Rant

Colin Smith Colin Smith Profile: Colin Smith

So this is not really going to be a technical entry in the Blog but I do feel that this is a good place to rant a bit about something that has been on-going for a couple weeks. Over two weeks ago the bulb went out in my 65″ DLP TV. This is to be expected and this is a relatively easy and inexpensive thing to repair. I, however, bought the extended Warranty and service plan for my TV at the time of purchase. I do not usually buy these but on the Big Screen TV I thought it might be wise as repairs for these sometimes exceed the cost of the unit. With this plan I am entitled to two free bulb replacements during the life of the contract.

When the light went out I made the call to the warranty company, who for now will remain nameless, and I was informed that my light would be ordered and shipped that day and that I should get it in 7 – 10 business days. That I think is not acceptable, I think that this should be sent overnight since my TV is useless without the bulb. I could have got on-line and for less than $150.00 bought a new bulb and had it overnighted. Well never mind that, I thought OK I will wait, Just about a week or two not the end of the world and I do have other TV’s that I can watch. I wait the 10 business days and no replacement bulb is at my mailbox. I am a bit upset but I think that mistakes happen I will just call and see what happened. I call on Saturday and I talk to a young lady that was certainly not helpful at all. She tells me that the bulb is on backorder from the supplier for at least 2 months and that they are looking for an alternative supplier. This upsets me as I am not willing to wait two months to get my TV back. I do not think that is reasonable at all. I tell her that and she tells me that I have no recourse on the matter. It is what it is. I ask to speak to a manager and she tells me that they do not work on Saturday. I tell her that I would like her to send me a check for $150.00 and I will order the bulb myself. I feel that since the contract states that I am entitled to two replacements that they should reimburse me for the cost. She refuses to allow me to think that reimbursement is an option at all. So I finally tell her that I would like to hear from a manager on Monday morning first thing. She then tells me that she can put a request in but management is probably not going to call back since they are so busy. Now I am just about the most upset customer I have ever been. She has essentially told me that I have to wait two months and that her company does not care about the customer enough to even call back. And in my mind they had proven that by not calling me to tell me that the bulb would not be arriving and that it was on backorder.

Well Monday came and I did not get a call so I called them back. Another woman picked up the phone and I told her that she could not help me and that I would like to speak to her manager. She apologized for my trouble and transferred me. I put my phone on speaker and starting doing some work while I waited. After a while my phone beeps at me and tells me the battery is dying. I look at the clock and realize that I have been on hold for over two hours. Now I am even more upset then I was on Saturday. Now they are just ignoring me. How does a call wait in a hold que for that long and not get picked up?? I hang up and call again.

This time I get a person that does not want to transfer me but just wants to help me. I appreciate this very much as I do not feel as though anyone has helped me up to this point. She tells me that she is not sure why the bulb did not get ordered and she says she will overnight it for me. I ask how can you do that when the reason it is not already at my house is because the bulb is on back order for two months and you can not get them? She tells me that they are not on back order. Now I know that someone is lying to me and I am not sure who it is. Is it the young lady from Saturday or this woman that I am speaking with now? I explain my frustration to her and explain that I just do not trust her because I know someone is not telling me the truth and that I would like to speak to her manager. She understands and actually gets me her manager on the line with a live transfer.

I talk to the manager and she assures me that she has verified that they can get the bulb and it will be overnighted to me and I should have it no later then Wednesday. I inform her that if I do not have it by then I will call her back as well as log a formal complaint with the better business bureau. So we will see if I get the bulb today or tomorrow. I hope that I do as I just want my TV back. If not though I will let you know and I will let you know the names of the companies that I am dealing with here. If they make it right I do not have an issue.

I really think that this portrays part of the reason our economy is in the state that it is in. Customer service does not exist any more. No one should have to go through all this to get a part that is readily available and under warranty. Customers should not be lied to. Tell me the truth. I might not like it but I will deal with it. I understand that mistakes happen, I make them everyday, and I am a pretty easy going guy. I just can not stand it when the people that are supposed to be looking out for the customer are not doing just that.

Well that ran longer than I thought it would but it is what it is. I hope that none of you have to deal with anything like this in the future.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: