Query in SQL Management Studio and RE7

Options
Hi there,


I am about to start a new job using RE7. I am very good with T-SQL and I was wondering if I can make data selections using T-SQL on RE using Microsoft Management Studio.


Thank you

Comments

  • Yes you can.  You'll need security rights to the database obviously, and if you write anything to the db you'll void your service contract, but if you stick with read-only and just use SSMS to view and select data, it works fine.


    Edited to add: but other people won't be able to use those queries; there's nowhere to save them in the front end of RE. 
  • Although I am a novice at T-SQL, I am attempting the same thing you are and am in the midst of obtaining read-only access to our SQL Server instance that contains our backend Raiser's Edge database.  Below are some tidbits that I've found helpful:


    Blackbaud offers an optional plug-in called the "Read Only Database Assistance Query Tool" (RODBA) that is free to those folks that have a certain level service agreement with Blackbaud support.  You can find out more details about the RODBA plug in by going to the blackbaud website and looking it up in the Knowledgebase...very helpful.  The big advantage is that it allows you to view any RE query in actual SQL, so you can see how RE queries are formed in SQL, helping you craft how you form your queries in SSMS.  So, you can take a query that does what you want, view it in the RODBA plug in, grasp the SQL behind the query, and then expand on that, rather than starting from scratch.


    There is also a helpfile that becomes unlocked when you enable the RODBA module discussed above...this helpfile provides a great resource to understand how the Raiser's Edge schema is constructed, as the RE table structure is definitely not intuitive.  I highly recommend you use this helpfile, along with the RODBA plugin, and SSMS to more efficiently figure out how to hit the back end data.


    I am planning on using SSMS to access additional RE fields that RE Query does not expose.


    Hope this helps!!
  • Thank you for your useful answers! :)

    Do you know if I might use the RODBA even if I use RE NXT?
  • I don't know the answer about NXT, but if it's not included, it might make you feel any better RODBA is only a starting point. It's good for that but you'll very quickly see that the SQL that the system generates can be pretty obtuse -- it aliases tables with their own name or just as T_1, T_2, etc. it refers to system tables that apparently are added to pretty frequently but there's no indication what they are.  It's not that helpful, for instance, when you see a line like this:

     
    left outer join DBO.tmp2775726_477508300_1 as T_3_3_42125 on RECORDS.ID = T_3_3_42125.CONSTIT_ID



    uh... ok.


    That said, at least for starting out getting the schema somewhat down, figuring out which functions pull primary adressee, preferred address, views that handle hard and soft credits of gifts, etc., it's definitely useful.


    Alternately post any questions here and there are a few of us around who might be able to help. I'm much closer to novice than expert when it comes to writing SQL, but I've figured out some stuff about how it's all set up.
  • Perhaps this will help out a little with RODBA:  https://www.blackbaud.com/support/faqs/rodba.aspx

    Instructions for unlocking the RODBA module can be found here:  https://kb.blackbaud.com/articles/Article/75705 


    Remember, however, that you need the  Advantage Professional and Advantage Priority Maintenance level agreement to get the RODBA for free.


    The RODBA FAQ link addresses several questions you probably have (or will have) and gives you a good introduction.  I haven't found anywhere that specifically addresses compatibility with Raiser's Edge NXT, but I would guess, yes, it would work, as you would be using RE NXT in the Database Admin role and therefore using the normal RE7 client (RE 7.95), rather than the spiffy NXT GUI for other non-DBA roles.  However, I cannot 100% confirm this...just a guess.


    I would agree with James as well...RODBA is good place to start and wrap your head around the schema and how RE really operates behind the scenes.  I think it is worth your time to do this, however.  Jumping directly into SSMS and hitting the RE backend database directly with no knowledge of the underlying RE database structure will make for a difficult and frustrating experience, in my opinion.
  • RODBA is not available in the Blackbaud Hosting Services environment, which includes NXT.

     
  • There is also a Help Guide in the RE Folder, RE7Schema.chm, that does provide a list of tabels and views. It has really helped me understand the relationships between the tables and views. I would have to agree with the other posts that the RODBA is a good starting point, but many times it does not really provide the answer. The Functions are really important for Names, Linked Gifts, etc.


    If you are planning on using SSRS or another platform for expossing the data, then it is really helpful to be in the DB, otherwise you are better off just using Query. Currently, we export data using SSIS to our own custom ODS. This has been extremely powerful for the reporting that we provide to our users through SSRS and QlikSense.


    NXT is supposed to be releasing some APIs that would allow you to access the DB, but until that happens, there is no access. So if you plan on going down the TSQL route, you will have to wait awhile before you will have that same access in NXT, and then do it all over again using their API.


    Cheers,

    David

Categories