Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Multi-DB's and Stored Procs

Author  Topic 

toddhd
Yak Posting Veteran

55 Posts

Posted - 2004-11-21 : 20:31:11
Let me give you some brief background. I have an intranet site that uses DotNetNuke (DNN) as its framework. The site serves as a knowledgebase - it contains thousands of articles. Currently, both DNN and the articles share the same DB. The articles require a dozens of Stored Procs and tables to function.

A new version of DNN came out, and I need to simultaneously develop on the "old" version and the "new" version at the same time. But the new version has it's own DB, and it has to be that way.

I can't really afford to keep duplicating the article data from one DB to another - what makes the most sense to me is to create a third DB, and put all the article tables and stored procs in there. That way both apps can access the data, and the data is always up to date. Changes made to stored procs will work in both apps.

So far, so good. Now, here is my problem.

The articles have security on them. They are sensitive regarding who is viewing them. For instance, only people in the "editors" (or an admin or host) can edit articles. Some articles can only be seen by developers, where others can be viewed by anyone, etc.

The user roles and info exist in the DNN databases. The stored procs that I use to SELECT articles take into account the user roles and rights, so they to JOIN with the ROLES table, as well as a few others (such as Country) that exist in the DNN database(s).

So here is the question:

Can this be done? Any ideas how to proceed?

I supposed I can pull the articles without accounting for that info, and then eliminate articles by using code in the app, but that puts a lot of overhead on the application. I'd prefer to do it in SQL if possible?

Kristen
Test

22859 Posts

Posted - 2004-11-21 : 23:25:40
DO you mean you want something like this:

SELECT *
FROM ThirdDB.dbo.ARTICLES A
JOIN DNN.dbo.ROLES R
ON R.SomeKey = A.SomeKey

Kristen
Go to Top of Page
   

- Advertisement -