Every hour, we receive a database backup file via SFTP from a third-party vendor. We restore that database locally as a read-only database. The data in this database is an extract of our company's data from their web application. We restore it locally so we can run our own custom queries. The reason it's read-only is because it's just an import of our "real" data - and it will be overwritten the next hour when we receive and apply the next update from them. This arrangement is not under our control; it's the only mechanism that our vendor provides us with which to get a copy of our data.
For the purpose of illustration, let's say that database contains 1,000 tables. We then, in turn, want to share 100 tables with a different partner of ours but only specific rows from those tables, namely where they specific FacilityIDs. So it's not enough to limit which tables they can see, but we also need to filter the tables prior to providing them access.
It was suggested that I create a read-only user to provide access to the 100 tables to the "consumer" company "downstream" from us. The problem with creating a read-only user is because I believe that will only allow me to restrict which tables they see, but not filter, e.g. using a WHERE clause, that I need to apply prior to giving them access.
So I've been looking into replication as was recommended in a comment on a different question. Since our (1,000 table) database and the one we'd provide to the "consumer" company (100 table) database are both read-only, I'm not looking for two-way replication. I don't care about the changes they might make to the data we provide them. My goal is simply to provide them with a subset of what we've got. We're going to be providing them an update hourly in a similar manner, namely by providing a SQL Server .bak file to them via SFTP. If they make changes to the data, we're not interested in replicating them back to us.
I saw the following on MSDN:
You can't replicate or use a standby/read-only database as a publisher. Some system procedures will need to be created into that database which in a read-only mode is prohibited.
Is there anyway to have those system procs created in a "helper" database, leaving the published database in standby/read-only status at all times? Alternatively, is there an altogether better approach to this scenario?