This document provides tips for database administrators (DBAs) to improve communication and working relationships with developers. It discusses how DBAs and developers often have different goals that can cause conflicts. The document recommends that DBAs learn coding skills, participate in code reviews, and grant developers access to database tools to foster understanding between the roles. It also suggests developers educate themselves on how databases work and help with production issues. Overall, it promotes focusing on business goals over individual priorities through respectful collaboration between DBAs and developers.
1 of 36
More Related Content
Redgate How to be Friends with Developers
1. How to Become Friends with
Developers and Stop Making DBA
Stand for "Don't Bother Asking"
Presented by: Kellyn Pot’Vin
Sr. Technical Consultant, Enkitec
March 27, 2013
2. Who am I?
• Resides in Westminster, Colorado
• Oracle ACE, Sr. Technical Specialist at
Enkitec
• Specialize in performance and enterprise
management of large database
environments.
• Board of directors for RMOUG, Director of
Training Days 2014 and Database Track
Lead for KSCOPE 2013
• Blog: http://DBAKevlar.com
• Twitter: @DBAKevlar
• Expert EM12c Book- May 16th from
Apress
3
3. Why This Topic?
• Conversations with User Group
Members/peers.
• How Often I Experience it
professionally.
• Read about it often in blogs, articles
and in books.
• Some of my biggest wins, consider
my most important compliments had
to do with this subject.
• When first learning, others would
seek me out over others who knew
more because of it.
4
4. The Valued Lesson
• First “official” Job as a DBA
• First Time Managing
MSSQL
• Instructed NOT to Speak to
Dev/App Group.
• Two Frustrating Weeks.
• Broke “No Communication”
Rule
• Great Experience
• Supported for Four Years
5
5. The Ball and Chain
“If you have been in IT long
enough, you are probably aware that
most DBAs don't get along well with
the developers.
They are somewhat akin to a
husband and wife who don’t like
each other but can't get a divorce.“
6
6. Different Goals
Developer Goals- To implement new business
enhancements, often by a deadline.
Database Administrator- Ensure that database
environments are accessible and functioning 24X7
without any interruption to service.
Outside Influencers- To ensure they get what
they want, even if requirements given to
Developers are unattainable and risk production
uptime for Database Administrators.
7
7. Negative Culture
“[Most] DBAs aren't happy unless they're well established
as the bottlenecks in the [development] process.”
“If Shakespeare were alive in 2012, he’d be a technical
writer, and his motto would be: “Kill all the DBAs.”
“Why does it take two developers to change a light bulb?
Because one always leaves in the middle of the project.“
“The Only way I know to deal with Developers involves a
bat!”
Now, try substituting an minority or racial group when you
say anything similar to the above comments and you may
think twice about what may have become culturally
acceptable in the workplace.
8
8. What Many DBA’s Think is
Required to talk to Developers
Dangerous Borderline Safe Safest
Your code sucks Interesting Would you like This is brilliant
coding choice to work on this
together?
Yeah, You’re You need 2TB I think we This is brilliant
not getting 2 of space for could rewrite
TB for THIS. this? this to use less
temp.
Why would you This may not I’d like to This is brilliant
ever do this? be the best recommend an
way to write alternative
this… strategy.
9
9. What Developers think is required
to talk with DBA’s
Dangerous Borderline Safe Safest
Nothings Could I’m sure You are
Changed something something absolutely
have changed? must have correct.
changed.
The database Something Could you help You are
sucks seems to be me out and absolutely
up with the check the correct.
database. database?
It works great We did test I could really You are
in dev and this, but it is use your help absolutely
test. having issues figuring out correct.
in production. why its having
issues in prod.
10
10. We Lack Respect, but Why?
• Deadlines
• Demands of each group
• Lack of respect for each role’s skill set
Truth is, both sides
think they are Obi Wan
and neither are Darth
Vader!
11
11. Results
• Impacts productivity
• Causes Turnover, eliminating positions.
• Costs business $$
In My Opinion-
• Demands Developers to fill DBA positions in
hopes of meeting deadlines.
• Reason for “Agile Like” development
processes.
• Makes more demand for “open-source” tools
to circumvent RDBMS dependent
environments.
12
12. Why DBA’s are Needed
Database Administrators and
Developers primary roles
require different mindsets.
To play both roles often:
• Is a conflict of interest.
• Leaves priorities
unaddressed.
• Lessens expertise.
13
13. Why we Need Developers
That differing mindset requires someone who can
visualize quickly how to design a process, yet not
overthink the issues that might arise, (that is the
DBA’s job when time comes for code review!)
For a Developer to
perform his tasks and
maintain the database,
do afterhours support,
etc.??
14
14. Changing the Game
How do we change the
never-ending battle?
First identify the source of the
conflict-
• Is it centralized?
• Is it between certain
individuals?
• Is it cultural in an
organization?
• Are there outside
contributors?
15
15. Standing Up to the Fight
Find a responsible manager to
buy-in.
Focus on-
• Cost to
• Resources
• Deadlines
• Goals
• Revenue
• Changing the culture, not
assigning blame.
If you are assigning blame, you
may be part of the problem…
16
16. As a DBA?
• Learn to code- some level, some platform.
• Learn the database- the best DBA’s know their
data.
• Participate in code reviews- Be a productive
participant.
• Give read only access to key developers
• Share with Developers what you know- it
shouldn’t look like magic!
• Don’t make decisions based on control- base
them on the business’ best interest.
• Never assume, request time to research and
have data behind findings.
17
17. Options for Developers?
• Educate yourself on how Oracle works and about
the Cost Based Optimizer, (CBO)
• Help with production issues- you are often an
integral part of the solution!
• Build your code to perform efficiently, not just
functionally.
• Share your knowledge with the database
administrators.
• Ensure that anything going to production is
ready, support your DBA!
18
18. When Communication Degrades
Focus on:
• End-user experience instead of individual goals.
• The value to the business
• Do not personalize
• Remember to show respect
• Consult each other when opportunity presents
itself.
• Support, do not sabotage the other group.
• Possess higher authority when issues remain
unresolved.
19
19. Next Level…
• Review and verify that expectations were clearly
defined.
• Verify that respect is being shown.
• Don’t allow any negative competition.
• Trust and confidence in the other’s capabilities to
complete their roles.
• Live up to our own expectations.
• Involve each group earlier in projects.
• Final decision by higher authority when unable to
resolve disagreement is agreed to be followed.
20
20. What the DBA Should Always Do
• Ensure development database are FULL/recent
copy of production environment.
• Ensure Development has FULL access to the
development environment.
• Grant access to performance metrics.
• Less than full copy allows for “assumptions” to
lead into testing scenarios.
If you have Enterprise Manager 12c, GRANT
THEM ACCESS!!
21
21. Read Only Access in EM12c
• Create User, (Do not Create Like until
you create first “read-only user”
• Choose to add the EM_ALL_VIEWER
Role
22
24. Target Level Logins
For logins to a target, they require the following:
• Connect
• View_any_dictionary
• Advisor
Object Level Privileges for AWR:
GRANT SELECT ON SYS.V_$DATABASE TO user;
GRANT SELECT ON SYS.V_$INSTANCE TO user;
GRANT EXECUTE ON SYS.DBMS_WORKLOAD_REPOSITORY TO user;
GRANT SELECT ON SYS.DBA_HIST_DATABASE_INSTANCE TO user;
GRANT SELECT ON SYS.DBA_HIST_SNAPSHOT TO user;
25
26. What Developers Need to Know
• Know the difference between an explain plan
and an execution plan.
• The explain plan is the choice the CBO, (Cost
Based Optimizer) may choose.
• The execution plan is the actual plan the
CBO made with a SQL statement.
• Learn how to view temp usage.
• Use SQL Monitor after DBA’s grant access.
27
28. DBMS_XPLAN
Collect info from DBMS_XPLAN:
Execute Query,
SELECT * FROM
TABLE(DBMS_XPLAN.DISPLAY_CURSOR
(format=>'ADVANCED'));
29
29. What is the Cost Based Optimizer
The Cost Based Optimizer, aka CBO:
Determines the most efficient path to executing a
SQL statement.
CBO choices are impacted by:
• Parameters, such as OPTIMIZER_MODE
• Session level parameters.
• Statement Hints
• Statistics and Dynamic Sampling
• Parallelism, (High DOP)
• Complex design
• THE SQL
• ….
30
30. Viewing Temp and Memory Usage
select vst.sql_text, swa.sql_id, swa.sid, swa.tablespace
, swa.operation_type
, trunc(swa.work_area_size/1024/1024) "PGA MB"
, trunc(swa.max_mem_used/1024/1024)"Mem MB"
, trunc(swa.tempseg_size/1024/1024)"Temp MB"
from v$sql_workarea_active swa, v$session vs, v$sqltext vst
where swa.sid=vs.sid
and swa.sql_id=vs.sql_id
and vs.sql_id=vst.sql_id
and vst.piece=0
order by swa.sql_id
SELECT i.COL1, COUNT(t.col4) i.col3 4jv6ja2qa2p7z 515
GROUP BY (HASH) 996 15
SELECT i.COL1, COUNT(t.col4) i.col3 4jv6ja2qa2p7z 515
TEMP BUFFER 1 97 23
31
32. SQL Monitor Features
• Status of process- active or complete
• Wait information, including legend color.
33
33. SQL Monitor with Parallel
• Parallel, requested vs. allocated.
• Instance ID for RAC and SQL_ID links
34
34. We’re All In This Together!
• Trust and common vision should be
the goal.
• Performance is part of the goal, not
just functionality.
• If you aren’t helping, you’re hindering.
• Its the business’ database, no one
else has a right to ownership.
• Being right is not always the same as
doing the right thing.
35
35. References
DBAs Gone Bad
http://c2.com/cgi/wiki?DbasGoneBad
Can DBAs and Programmers Ever Get Along?
http://www.creativemac.com/articles/viewarticle.jsp?id=37828-1
Communication and the Database World
http://www.scarydba.com/2011/03/21/communication/
Kerry Osborne, Oracle Performance for Developers and the DBA’s that
Love Them
http://kerryosborne.oracle-
guy.com/papers/Oracle_Performance_for_Developers_and_the_DBAs_
Who_Love_Them-Final.pdf
Solving the Problem of Prima-Donna Developers
http://www.techrepublic.com/article/solving-the-problem-of-prima-donna-
developers/1046043
Survival Tps for Developers/DBA’s: How to talk to [Each Other]
http://thomaslarock.com/2012/08/survival-tips-for-developers-how-to-
talk-to-your-dba/
36