I would advice keeping all the data in the same database as that makes maaging the databases like backup etc. easy. Else if you want to stick to the multiple database option, you can definately store the common data in a common database and then acess the tables using notation [Common DB Name].[Table Owner].[Table Name]. As far as stored procedures are concerned, I would recommend keeping copy of same in all databases as using three part concvention as mentioned above will make the stored procedures creepy and bad performing. Gaurav
G
Gaurav Bindlish
@Gaurav Bindlish
Posts
-
Multiple SQLServer databases -
Using ADO, how to detect a table exists..Run the Query -
Select name from sysobjects where name like 'Pxhsinv' and type = 'U'
If this query gives some record in the resultset, the table is present else not. Gaurav -
if elseWrite Query like this-
Select ISNULL([K1] + ';', '') + ISNULL([K2] + ';', '') + ISNULL([K3] + ';', '') AS AllK FROM TEST
Ofcourse I am using the property of SQL that sum of a NULL string with another string is NULL. So if any of the K1, K2 or K3 field is NULL, [K1] + ';' will give NULL. HTH. Gaurav -
Need to Export Records to Remote TerminalThese are the steps in script that u'll be needing- - BCP out the data into a text file. - FTP the file to the remote location. - Insert the file in remote database using remote stored procedure. - Delete the records from source database. Hope this helps. Gaurav