Your SlideShare is downloading. ×
0
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Thinking outside the box, learning a little about a lot
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Thinking outside the box, learning a little about a lot

608

Published on

Being a SQL specialist is not enough. Windows and the interfaces SQL consumes are becoming ever more complex. Being aware of these technologies and beyond can make you a better DBA. You will learn how …

Being a SQL specialist is not enough. Windows and the interfaces SQL consumes are becoming ever more complex. Being aware of these technologies and beyond can make you a better DBA. You will learn how to become a DBA 2.5, SQL Enterprise name resolution strategies, create your own private VSAN & VCluster, fail instances BETWEEN separate clusters and use the CLR to manage the OS from SQL.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
608
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Thinking outside the Box, learning a little about a lot Mark Broadbent SQL Server DBA http://tenbulls.co.uk @retracement    
  • 2. Agenda Become a DBA 2.5 SQL Instance Enterprise name resolution strategies D.I.Y. Virtual SAN D.I.Y. Virtual Cluster Failing Cluster Groups between independent Clusters Using the CLR to expose and manage the OS    
  • 3. Generalist vs Specialist Generalist “Jack of all trades” (...master of none), versatile Unfocused, unproductive Specialist Attention to detail, very productive, take responsibility A risk, inflexible, bottleneck    
  • 4. Generalist (the reality)    
  • 5. Specialist (the reality)    
  • 6. Generalizing Specialist Agile Productive Can see larger picture Focused Versatile Take responsibility Less Risk    
  • 7. Generalizing Specialist (the reality)    
  • 8. DBA Life­cycle unskilled skilled professional specialist “DBA 2.5” 2.5 generalizing specialist    
  • 9. "A human being should be able to change a diaper, plan an invasion,  butcher a hog, conn a ship, design a building,write a sonnet, balance accounts,  build a wall, set a bone, comfort the dying, take orders, give orders,  cooperate, act alone, solve equations, analyze a new problem,  pitch manure, program a computer, cook a tasty meal,  fight efficiently, die gallantly.  Specialization is for insects!" Robert A. Heinlein.    
  • 10. How to become a DBA 2.5 part I Understand your the environment Get out of your comfort zone Visit the server room!!! Talk to people! Research Talk some more Get involved and take an interest    
  • 11. How to become a DBA 2.5 part II From a technical level Use Personal Virtualization Understand hardware, RAID Levels and Storage  Understand TCP/IP and networking ...and know when to use ping, nslookup, netstat etc Use other Operating Systems and Database Engines Program a .NET language to a competent level Have an arsenal of tools and scripts    
  • 12. How to become a DBA 2.5 part III From a personal level Invest time Maintain standards Produce documentation and notes Don't be afraid to say NO – you are responsible Don't be afraid to ask questions Surround yourself with brilliant people    
  • 13. Demo Virtualization – the basics    
  • 14. Name Resolution Service Based Machine Based DNS DNS name .NET SQLClient cache SQL Browser SQL Native Local hostname Service Client netbios name lmhosts NBNS (WINS) cache Active netbios hosts Directory broadcast    
  • 15. Using DNS sqlbits.com. AUTHORITIVE POSITIVE REFERRAL NEGATIVE Lookup sqlbits1_alias vserver1.sqlbits.com. Connect to IP and instance 10.0.3.1sql1    
  • 16. Using SQL Native Client Lookup sqlbits1 Connect to vserver1sql    
  • 17. Updating SQL Native Client by  Group Policy    
  • 18. Demo Redirecting an instance  using SQL Native Client and Group Policy    
  • 19. Using application based redirection DBMirroring Failover partner in connection string .NET 2.0 upwards Application based error handling Inline Configuration files Virtualization?    
  • 20. What is a SAN? ..Storage Area Network Works at the block level Scalable Highly available Remote Highly Accessible (Universal Storage Connectivity) High performance    
  • 21. Preparing for our Virtual SAN Virtual Hardware Disk/s for Operating System and iSCSI targets Network Card Installation Media FreeNAS ISO or CD (alternatives such as Openfiler) Configuration Considerations IP address, subnet mask, g/w, memory Active Directory    
  • 22. Demo Setup our Virtual SAN and Virtual Cluster    
  • 23. Clustering solution version 1 cluster1 cluster2 server2 server3 server4 server5 vserver1 virtual server vserver1 vserver2 names shared vserver2 vserver3 vserver3 vserver4 vserver4 LUNS LUNS SAN based mirroring    
  • 24. Clustering solution version 2 cluster1 Enterprise cluster2 Redirection server2 server3 server4 server5 vserver1 Unique virtual vserver1f vserver2f server names vserver2 vserver3 vserver3f vserver4f vserver4 LUNS LUNS SAN based mirroring    
  • 25. Demo Failing Groups across  Clusters    
  • 26. Using the CLR Calling Assemblies Call through SQLCLR Call through xp_cmdshell Directly/ scheduled tasks Integration Services Packages Powershell    
  • 27. Using the CLR using sql = Microsoft.SqlServer.Server; using io = System.IO; public class IO { [sql.SqlFunction()] public static sqltype.SqlInt64 DriveFree(sqltype.SqlString drive){ io.DriveInfo di; try { di = new System.IO.DriveInfo(drive.ToString()); return di.TotalFreeSpace; } catch { return -1; } } ....... }    
  • 28. Using the CLR using sql = Microsoft.SqlServer.Server; using io ASSEMBLY SQLCallAssembly CREATE = System.IO; FROM 'H:SQLCallAssembly.DLL' WITH PERMISSION_SET = EXTERNAL_ACCESS public class IO { GO [sql.SqlFunction()] public static sqltype.SqlInt64 DriveFree(sqltype.SqlString drive){ CREATE io.DriveInfo di; FUNCTION dbo.udf_drivefree(@drive NVARCHAR(1)) RETURNS BIGINT try { EXTERNAL NAME SQLCallAssembly.IO.DriveFree; di = new System.IO.DriveInfo(drive.ToString()); GO return di.TotalFreeSpace; CREATE }FUNCTION dbo.udf_driveused(@drive NVARCHAR(1)) ... catch { return -1; } CREATE FUNCTION dbo.udf_drivesize(@drive NVARCHAR(1)) } .......... } CREATE FUNCTION dbo.udf_drivefreepercent(@drive NVARCHAR(1)) ... CREATE FUNCTION dbo.udf_driveusedpercent(@drive NVARCHAR(1)) ... GO    
  • 29. Using the CLR using sql = Microsoft.SqlServer.Server; using io ASSEMBLY SQLCallAssembly CREATE = System.IO; CREATE 'H:SQLCallAssembly.DLL' FROM VIEW vw_drivespace AS public SELECTIO { class 1 as 'seq', WITH PERMISSION_SET = EXTERNAL_ACCESS GO [sql.SqlFunction()] drive, 'system' as public 'C' as sqltype.SqlInt64 DriveFree(sqltype.SqlString drive){ static 'letter', [dbo].[udf_drivefreepercent]('c') AS [%free], CREATE io.DriveInfo di; FUNCTION dbo.udf_drivefree(@drive NVARCHAR(1)) RETURNS BIGINT [dbo].[udf_driveusedpercent]('c')as [%used], try { EXTERNAL NAME SQLCallAssembly.IO.DriveFree;AS [capacity(MB)], [dbo].[udf_drivesize]('c')/1048576 di = new System.IO.DriveInfo(drive.ToString()); GO [dbo].[udf_drivefree]('c')/1048576 AS [free(MB)], return di.TotalFreeSpace; CREATE } [dbo].[udf_driveused]('c')/1048576 as [used(MB)] FUNCTION dbo.udf_driveused(@drive NVARCHAR(1)) ... UNION { return -1; } catch CREATE FUNCTION dbo.udf_drivesize(@drive NVARCHAR(1)) } .......... ..... } CREATE FUNCTION dbo.udf_drivefreepercent(@drive NVARCHAR(1)) ... SELECT ..... CREATE FUNCTION dbo.udf_driveusedpercent(@drive NVARCHAR(1)) ... GOGO    
  • 30. Using the CLR using sql = Microsoft.SqlServer.Server; using io ASSEMBLY SQLCallAssembly CREATE = System.IO; CREATE 'H:SQLCallAssembly.DLL' FROM VIEW vw_drivespace AS public SELECTIO { class 1 as 'seq', WITH PERMISSION_SET = EXTERNAL_ACCESS GO [sql.SqlFunction()] drive, 'system' as public 'C' as sqltype.SqlInt64 DriveFree(sqltype.SqlString drive){ static 'letter', [dbo].[udf_drivefreepercent]('c') AS [%free], CREATE io.DriveInfo di; FUNCTION dbo.udf_drivefree(@drive NVARCHAR(1)) RETURNS BIGINT [dbo].[udf_driveusedpercent]('c')as [%used], try { EXTERNAL NAME SQLCallAssembly.IO.DriveFree;AS [capacity(MB)], [dbo].[udf_drivesize]('c')/1048576 di = new System.IO.DriveInfo(drive.ToString()); GO [dbo].[udf_drivefree]('c')/1048576 AS [free(MB)], return di.TotalFreeSpace; CREATE } [dbo].[udf_driveused]('c')/1048576 as [used(MB)] FUNCTION dbo.udf_driveused(@drive NVARCHAR(1)) ... UNION { return -1; } catch CREATE FUNCTION dbo.udf_drivesize(@drive NVARCHAR(1)) } .......... ..... } CREATE FUNCTION dbo.udf_drivefreepercent(@drive NVARCHAR(1)) ... SELECT ..... CREATE FUNCTION dbo.udf_driveusedpercent(@drive NVARCHAR(1)) ... GOGO    
  • 31. Summary #1 DBA 2.5 Widen your skillset but still stay focused  Talk to other teams and get involved Get your own Virtual Environment Name Resolution Useful for abstracting from the host name Not suitable for every situation, good for applications    
  • 32. Summary #2 Virtual SAN and Virtual Cluster Easy to setup, great for testing Failing over Cluster Groups across Clusters Effective, but element of risk Ensure strict guidelines and standards are followed Using the CLR Useful for the DBA too! Many uses and ways of calling assemblies    
  • 33. Further Resources http://tenbulls.co.uk/sqlbits/references or http://bit.ly/a27KPH    
  • 34. Questions    
  • 35. Thinking outside the Box, learning a little about a lot Mark Broadbent SQL Server DBA http://tenbulls.co.uk @retracement    

×