Showing posts with label handle. Show all posts
Showing posts with label handle. Show all posts

Monday, March 26, 2012

Multi company Application

I'm developing an application that needs to handle several companies data one at a time.

I have a database called ROOT with the common tables like companies, users, etc. and all the stored procedures that I need.

Then I have a unique database per company containing all their info.

How can I apply the stored procedures that I have on database ROOT to the tables on each company's databases ?

The TSQL USE command do not accept variables.

Thanks for your help,
MOsheOoh. I'd use one database and then put a company ID on everything. Other than that, I think you would have to use dynamic SQL for everything and use full object names database.owner.object. That would get to be a real pain. It'll also wreak havoc with permissisons since the execute permissions for the stored procedure won't allow you to access those objects unless the user has permissisons on the underlying objects themselves. Unless you're bound to multiple databases, I'd change that.|||Select * From [DataBaseName].[dbo].[TableName]sql

Friday, March 23, 2012

MTS Threads

I am wondering how to determine the the number of threads an MTS object can handle, and where you can view this information in the mts explorer.

Thanks

Mike

You should be posting the MTS group not SQL.

http://support.microsoft.com/kb/282490/