SQL Server 2005: How do I know if a table is being used in a stored procedure or not

This is the most hectic task I have often got called for. How can I find out if a table is being used in stored procedures or not?

The easiest way to find that out is to run the following SQL. This statement searches for the table name text in all the stored procedures and returns found stored procedure names.

So, if a table is not being used in any of the stored procedure – you will get an empty resultset.

--search for ImportCustomer table
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%ImportCustomer%'
GO

--search for ImportCustomer table and CreatedBy column
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%ImportCustomer%'
AND OBJECT_DEFINITION(OBJECT_ID) LIKE '%CreatedBy%'

JIRA and SQL Server 2005. Login failed even when mixed authentication is applied

I had a lot of trouble in configuring JIRA with SQL Server 2005. All settings in entityengine.xml and server.xml were made according to the “Connecting JIRA to SQL Server 2005″ pdf manual supplied by Atlassian. Still had issues in connecting with SQL Server.

After long hours of troubleshooting, issue was resolved by the following : -

1. IP Address was enabled with default port 1433 in SQL Server Configuration Manager.

2. Since SQL Server 2000 was already installed on the machine so SQL Server 2005 was installed with instance name SQL2005. That was the root cause of the problem.

In server.xml file located in JIRA 4.0.1\conf folder, I simply replaced my url to jdbc:jtds:sqlserver://PCNAME:1433/JIRADB;instance=SQL2005 and it worked!!!

Follow

Get every new post delivered to your Inbox.