Skip to content

Commit

Permalink
Update footprints page
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosschults committed Aug 15, 2024
1 parent 268a9ea commit 30ca6bc
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions footprints.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,29 @@ This page is a collection of cheat-sheets for things that I forget often how to
- [Misc](#misc)
- [Getting the HTTP status code for a URL](#curl)
- [Finding out the PID of a process using a specific port (Windows)](#pid)
- [Looking for all SQL Server Stored Procedures whose definition contain a given text](#procs)

## Databases
### <a name="sqlserverproc">Get all stored procedures that reference a given table</a>

In SQL Server, to find out all stored procedures that mention/use a given table, run this:

```
{% highlight sql %}
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%TableNameOrWhatever%'
```

-- OR, a bit more detailed

SELECT
OBJECT_NAME(object_id) AS ProcedureName,
definition
FROM
sys.sql_modules
WHERE
definition LIKE '%some text%'
AND OBJECTPROPERTY(object_id, 'IsProcedure') = 1;
{% endhighlight %}

## Docker
### RabbitMQ
Expand Down

0 comments on commit 30ca6bc

Please sign in to comment.