Monday, December 7, 2009
Restarting a Windows XP when connected over Remote Desktop
Here is a simple work around that I could find. Please note that the remote desktop program by design disables the shutdown option when connected.
"Shutdown" is the utility and can be invoked from command prompt. If you have access to command prompt - run the following command and you should see a dialoguebox displaying countdown to shutdown.
C:\>shutdown -s
please note that if you don't pass any arguments; the command will list all available parameters that "shutdown" utility can take as arguments.
Following command will restart the machine.
C:\>shutdown -r
Hope this helps...
Monday, November 30, 2009
Importance of Traceability
With the fast pace industry – it becomes imperative to understand how any change impacts you. I am sure most of us try to calculate this mentally and can narrate most of the impacts. In daily life we do this subconsciously and intuitively that seldom we notice this. And since humans perform the actions off of his brains – there is a chance of human error. The way to avoid the margin of error is to define a process. A process will be based on a methodology and guidelines that will help us derive outcomes which sometimes go overlooked and cause disasters.
In software world – methodology is what helps maintain a discipline. We were pitching in at a new client who is in the business of oil trading. They implemented complex trading system and the implementation was Rapid Application Development. A flip side of the implementation approach was that it sometimes overlooks the documentation. Documentation has been a secondary priority and in the process to keep showing progress, they are always neglected by developers, designers and testers.
Let’s think about a few scenarios:
- Sometimes a good project execution will ensure right amount of relevant documentation is in place but documents produced at the end of the project execution is voluminous enough to be unmanageable
- Sometimes the application will change hands between implementation and maintenance team. New people join team old people leave team and KT for a few hours during the hand off process is not sufficient enough to provide coverage for every document produced during implementation.
- Sometimes documentation is present but one needs to identify which is the area where the documentation is missing or can be improved.
- A new requirement is being introduced half way thru the implementation and one needs to determine where all places the change will impact and what all documentation will have to be changed
- Software upgrade is scheduled in 3rd year of implementation and impact analysis is required
Unless there is a map that leads from and links all the requirements to the configuration / implementation details – the task will become rather manual and time consuming and unreliable.
These pain points bring us to Traceability of change in an application. Traceability becomes all-the-more important once the application enters maintenance phase. There has to be a matrix which will explain the requirements and map it back to low level technical requirements, design, implementation, configuration artifacts associated with it including the coverage of QA on different environment.
I have noticed tremendous help a matrix like this provides to the Clients, maintenance team, the developers and testers.
Please feel free to get in touch if you need to learn more about traceability to me.
Tuesday, November 10, 2009
Mailbox Size in Corporate World - A Rant...
Advent of Data Centers, and Cloud Computing opens up a whole new infinite window of opportunity for IT Infrastructure. It liberates us from small time computing and space constraints. I still remember how we treasured the fact when Yahoo! Announced to increase the mailbox size from 25MB to 100MB in April 2004. Google Mail used to lead the bandwagon by providing 2 GB space. And then almost every tom dick and harry email provider offered unlimited mailbox size.
I wonder when the IT companies will start looking at ways and means to making this available to an average employee. I am constrained with 100MB storage on Exchange Server and there is no way I can retrieve emails older than 6 months unless... I keep taking backup manually. It becomes really frustrating when I have to search something that I sent last year to my clients. Taking a backup on my PC and synchronizing the emails with Laptop again is a big pain.
E-mails is the most critical means of running every day business. I wonder if putting a restriction on email box for people will *not* have an impact on business. Every time I miss an email / have to re-create information in my email; I end up wasting my precious time. Either that gets billed to the clients or makes me work long hours if I don’t want that to happen. Think about the magnitude of effort when 80,000 employees spending 15 minutes every day re-creating information in emails. It will be 20,000 man hours i.e. 2500 man days. And if we look at it from Cost perspective; (Assuming average pay of US $150 per person per day) it will be US $375000. Let’s assume we are supposed to find opportunity cost of this time spent by assuming Clients are charged US $65 per hour for 8 hours per person every day. It will total to US $1,550,000 (1.55 Mil) worth of revenues *Daily*!
You see, now it makes sense to you.
Wouldn’t it be great if IT companies who brag about setting trends in the industry pay a little attention to bring the change in their own organization?
Tuesday, October 27, 2009
Oracle Invalid Objects
SELECT owner,object_name,object_type
FROM dba_objects WHERE status='INVALID'
Monday, October 12, 2009
Deleting Objects from a Schema in Oracle
Here is a script that would come handy if you need to delete all the objects in a schema. Please ensure you are NOT logged in as System / Sys. Log in as the user for whose schema all the objects need to be dropped. Hope this helps.
--
prompt >>>
prompt >>> dropping it all..................
prompt >>>
--
begin
declare
cursor c1 is
select table_name, constraint_name from user_constraints where constraint_type = 'R';
cursor c2 is
select table_name, constraint_name from user_constraints where constraint_name not like 'SYS_IL%';
cursor c3 is
select index_name from user_indexes where index_name not like 'SYS_IL%';
cursor c4 is
select table_name, constraint_name from user_constraints where constraint_type = 'P';
cursor c5 is
select index_name from user_indexes where index_type = 'NORMAL' and uniqueness = 'NONUNIQUE';
cursor c6 is
select table_name from user_tables;
cursor c7 is
select object_name from user_objects where object_type = 'PROCEDURE';
cursor c8 is
select sequence_name from user_sequences;
v_sql varchar2(512);
begin
for c8_rec in c8 LOOP
v_sql := 'drop sequence '||c8_rec.sequence_name;
execute immediate v_sql;
END LOOP;
for c1_rec in c1 LOOP
v_sql := 'alter table '||c1_rec.table_name||' drop constraint '||c1_rec.constraint_name;
execute immediate v_sql;
END LOOP;
for c2_rec in c2 LOOP
v_sql := 'alter table '||c2_rec.table_name||' drop constraint '||c2_rec.constraint_name||' drop index';
execute immediate v_sql;
END LOOP;
for c3_rec in c3 LOOP
v_sql := 'drop index '||c3_rec.index_name;
execute immediate v_sql;
END LOOP;
for c4_rec in c4 LOOP
v_sql := 'alter table '||c4_rec.table_name||' drop constraint '||c4_rec.constraint_name||' drop index';
execute immediate v_sql;
END LOOP;
for c5_rec in c5 LOOP
v_sql := 'drop index '||c5_rec.index_name;
execute immediate v_sql;
END LOOP;
for c6_rec in c6 LOOP
v_sql := 'drop table '||c6_rec.table_name||' cascade constraints';
execute immediate v_sql;
END LOOP;
for c7_rec in c7 LOOP
v_sql := 'drop procedure '||c7_rec.object_name;
execute immediate v_sql;
END LOOP;
end;
end;
/
Useful SQL commands
A – How to create a Tablespace
Please log as “system” (with its valid password) using SqlPlus.
-- Create a 1GB tablespace from scratch.CREATE TABLESPACE LOGGING DATAFILE 'X:\full\path\to\XXXX.DBF' SIZE 1000M EXTENT MANAGEMENT LOCAL; -- Change existing tablespace name.ALTER TABLESPACE RENAME TO ; -- Change default user tablespace.ALTER USER DEFAULT TABLESPACE QUOTA UNLIMITED ON ; B – How to create a user for the Tablespace CREATE USER IDENTIFIED BY DEFAULT TABLESPACE TEMPORARY TABLESPACE temp; GRANT SELECT ANY TABLE TO ; GRANT UNLIMITED TABLESPACE TO ; GRANT UPDATE ANY TABLE TO ; GRANT RESOURCE TO ; GRANT CONNECT TO ; GRANT CREATE SESSION TO ; grant query rewrite to ; C – How to export your own database: Exp system/@<instance> file= owner= log=explogfile.log Parameters: - Oracle user name. - Oracle instance name. - System password. - Your database dump (like myDump.dmp). Wednesday, October 7, 2009
Tech Jokes
----------
1. An SQL query walks into a bar and sees two tables. It walks up to them and says "Can I join you?" Tables say, "Sure, if you have the key?"
2. A Session Bean walks into a bar and asks for a Jack Daniels on the rocks. Bartender says, "I'm afraid I can't serve you any alcohol", and the Session Bean says, "why not? Are you discriminating against Session Beans?" The bartender replies "well, look at the state you're in".