Why are Database consultants so important

 

One of the most common mistakes that organizations/teams make is not hiring a Database Consultant at the start of the project.

You might think that this is such a silly mistake and people should not do it, however trust me, they don’t and they do it again and again.

At the start of the project most of the times the team just want to hire a UI expert and want to start asap. The UI person creates a webpage and the associated events and later realizes that he/she needs to store the data somewhere (wow!!!) and creates a table and this activity goes on for every page or click the UI person is creating.

This leads to a Database design which is neither scalable, compatible and you can just imagine the performance and latency issues that you will get into.

Solution:

Database design is the foundation of a well-performing database.

Would you ever consider building a house without a blueprint? The foundation to your Applications, Interfaces and Systems is the database. To ensure that your database will be a good foundation for your applications and programs that rely on it, build it right in the beginning.

What Organizations need to do is to hire a Database consultant at the start of the project and let him design and decide the Data model and the Architecture. If there are budget constraints, at least get .5 FTE from some other project for some time and let him design the Database keeping in mind the environment you are working on. Trust me, this will go a long way for your application. Applications which are designed in such a manner can withstand latency, scalability, availability and compatibility issues in far better manner than others.

The benefits of building it right are many. Just as you would never consider building a house without thoughtful design and planning, so should you approach database design. Imagine the building architect who is designing to your specifications. You’ll be asked questions like “How will you use this?”, “What are your future plans?”, “What do you want this to look like?”, “How do you want it to work?” Asking these same questions when you’re building a database will give you the same usability and “livability” that you’ll get out of a well-designed house.

Properly tuned and deployed Database designs will go a very long way toward ensuring your database environment is functioning at optimal levels. It also ensures that all your stakeholders your Technical architects, DBAs, UI team, Domain managers, users and even business intelligence and applications teams are aligned and working together efficiently.

Happy Designing !!!!

Making System tablespace Offline – Oracle

If you search the Oracle documentation it says that you cannot bring the system tablespace offline.
However, here is a way to do it —

– Each tablespace is assigned one or more datafile. You can bring the datafile offline.
In the below case, I have deleted the system datafile and trying to start the database.

>>
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size 2182592 bytes
Variable Size 335544896 bytes
Database Buffers 725614592 bytes
Redo Buffers 5595136 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 – see DBWR trace file
ORA-01110: data file 1: ‘C:\ORACLE\ORADATA\WINDEV\SYSTEM01.ODF’

 

SQL> alter database datafile 1 offline;

Database altered.

and then you can bring it back up using the same datafile.

In my case, i have done a rman restore of the tablespace.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01147: SYSTEM tablespace file 1 is offline
ORA-01110: data file 1: ‘C:\ORACLE\ORADATA\WINDEV\SYSTEM01.ODF’

 

SQL> alter database datafile 1 online;

Database altered.

SQL> alter database open;

Database altered.

SQL>

EM dbconsole not starting and giving NET HELPMSG 3547

 

Here are the steps you can use to check if you face problems with EM DB Consle

Database version : 11.2.0.0.2 standard edition

EM DB Console not working.

1) check the status of dbconsole as follows

C:\WINDOWS\system32>emctl status dbconsole

2) Try to start the dbconsole

C:\WINDOWS\system32>emctl start dbconsole

if the dbconsole cannot be started, sometimes this problem may occur because SYSMAN and DBSNMP users are locked, so check their account status

C:\WINDOWS\system32>sqlplus / as sysdba

SQL> select username,account_status from dba_users;

USERNAME ACCOUNT_STATUS
—————————— ——————————–
OUTLN                                            OPEN
MGMT_VIEW                                 OPEN
SYS                                                   OPEN
SYSTEM                                           OPEN
DBSNMP                                         OPEN
SYSMAN                                          OPEN
DIP                                                   EXPIRED & LOCKED
ORACLE_OCM                                EXPIRED & LOCKED
APPQOSSYS                                    EXPIRED & LOCKED

so from above, its clear that both the user accounts are open

5) Check if agent is running or not

C:\WINDOWS\system32>emctl status agent

6) If the agent is not running try to start it

C:\WINDOWS\system32>emctl start agent

sometimes you get the message NET HELPMSG 2185

C:\WINDOWS\system32>NET HELPMSG 2185

The service name is invalid.
EXPLANATION

You tried to start a service that is not configured on this system.

ACTION

Check the spelling of the service name or check the configuration information for the service using
the Services option from Server Manager.

Eventually recreate the repository please remember that recreating the repository will not impact your database functionality

before recreating, make sure you have the following information with you
Database hostname
Database SID
Listener port number
password for SYS user
password for DBSNMP user
password for SYSMAN user
also, it is important that DBSNMP and SYSMAN user’s account should be opened

 

C:\WINDOWS\system32>emca -config dbcontrol db -repos recreate -silent -DB_UNIQUE_NAME WINDEV -PORT 1521 -EM_HOME C:\oracle\11g\R2 -LISTENER LISTENER -SERVICE_NAME WINDEV -SID WINDEV -ORACLE_HOME C:\oracle\11g\R2 -HOST HP -LISTENER_OH C:\oracle\11g\R2 -DBCONTROL_HTTP_PORT 1159 -DBSNMP_PWD oracle -SYSMAN_PWD oracle -SYS_PWD oracle

 

AWSCLI installtions issues

In case you are trying to install awscli and using cygwin and getting errors.
One of the errors that I encountered was
aws –version
> C:\windows-style-path-to-anaconda\python.exe: can’t open file > ‘cygdrive/c/cygdrive-style-path-to-anaconda/Scripts/aws’:
——————-

The problem is that you have installed awscli in your other python installation, could be windows anaconda.
The installation has to be there in cygwin
The solution is to install python and pip inside cygwin: Use the below commands

pip uninstall awscli
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
apt-cyg install python
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install awscli

reference:
http://stackoverflow.com/questions/37149718/aws-cli-in-cygwin-how-to-clean-up-differences-in-windows-and-cygwin-style-path