Tag: Redgate

  • Code from Redgate Streamed

    I presented a session today at Redgate Streamed and did a number of demos. The code consists of a few flies, which I’ve made available here: BasicUnitTesttsqlt.zip.

    This consists of:

    • 00_tsqlt.sql – Creates a database and adds the tsqlt framework.
    • 01_GetTesting_tsqlt_Setup.sql – adds objects you need.
    • 10_SQT_SQLCop_Demo.sql – The standards test demo
    • 20_SQT_RefactorArticles_MetaData.sql – Testing a table API
    • 30_SQT_RefactorArticles_IsolateProcedure – Test a function and procedure separately
    • 40_SQT_RefactorArticles_Exceptions.sql – Testing edge cases and bad data
    • 50_SQT_RefactorGrouping.sql – Sample test class breakdown
    • 99_SQT_Cleanup.sql – cleans things up

    You do need to have the SQLCLR enabled, and you will enable TRUSTWORTHY for this test database.

    Any question, let me know.

  • It’s Not April Fools – Redgate Streamed is Coming

    Next week is April 1, typically April Fools Day, where we have jokes, pranks, and false stories. I’ve done my share of them, but this isn’t one. With the postponement of SQL Bits,we are running a three day virtual event, Redgate Streamed. Each day is separate, and you can register for each below.

    The world of software development marches on, and many of us are being asked to do more with less all the time. We’re being asked to be more flexible and responsive in our database development. Redgate can help, and we have a number of sessions that will give you practical knowledge, and others that will make you think. I’m particularly looking forward to the panels, and I’m interested in what the others have to say.

    If you need a break from work, want some free training, and are missing the chance to attend live events, think about joining us for Redgate Streamed next week.

  • Save the Dates for Redgate Streamed

    We’ve got three days of online content coming your way from Redgate on Apr 1-3. There is a great lineup, and you can register for each day here:

    This is a tough time for many of us, being stuck at home, out of our routine, adapting to a new world. At the same time, companies are still trying to get work done, and they are recognizing the need for better software development, especially in remote scenarios.

    We’ve got a lineup of talented speakers, both inside Redgate and from our Friends and partners, that can help you break up your day, and learn about how you might build a more efficient process.

    Check out our schedule and join us when you want to learn a bit more or even just touch base with some other live humans in a similar situation as you.

  • Schema Filtering in SQL Prompt

    I love SQL Prompt, and I’m regularly impressed by the enhancements our teams continue to make in the product. One item that I found interesting recently was schema filtering. This post takes a quick look at this feature.

    If I go to look for an object, intellisense is amazing. In this case, I’ll type “SSF <tab> cust”. I’ll see this:

    2020-02-27 15_03_37-ObjectDefinitionBox

    There is the customer table first, and as we see on the right, this is the dbo.customer table. Below this, we see there is a Customer table in the ETL schema and two CustomerLoad tables, which are in two different schemas.

    I might actually be working in one of those schemas. Let’s say I’m an ETL developer. I don’t want to accidentally be coding against dbo.Customer when I want to use ETL.Customer. Certainly I might need each one, but in this case, I might just care about loading stuff into the ETL schema and want to work there.

    I can add filtering in SQL Prompt by going to the Options and then the Connections section. As you can see below, I have a drop down for schemas.

    2020-02-27 15_05_03-SQL Prompt – Options

    The default is all schemas, in all databases, but I can change this. I can set a filter. In this case, I’ll choose the “Only load…” option. When I do this, I see a generic wildcard here.

    2020-02-27 15_06_45-SQL Prompt – Options

    I see schemas for all servers and databases. However, I can set filtering for a specific server and database. Or a database on all servers, or certain servers, but all databases. Here I’ll just edit the schema.

    2020-02-27 15_06_05-SQL Prompt – Options

    This will change behavior to only show the ETL schema in all databases on all servers. Now when I type the same thing, I see the ETL schema objects only.

    2020-02-27 15_08_32-ObjectDefinitionBox

    Good, right? Plus, the refreshes and loads are faster. The downside here is that in another database, I see no tables.

    2020-02-27 15_09_14-CandidateList

    I can fix this, and just look in that one database by entering the database name. I’d suggest you set this by server and database, just so you are clear what behavior is happening, but it’s up to you.

    This was a request from developers that do work in some large schemas, and only want to see those objects. It’s been added to SQL Prompt, so update today, upgrade, or download a trial and give it a try.