Using one user account table across multiple databases but account used as a foreign key

I want to use one user account table from one database and use it across a couple other databases. The problem is that I want some tables to use the primary key from the user account table as a foreign key to access the data when the user logs in. Is this
the right way of going about it? Do I have to create a user account table in all my databases? What is the best practice to handle this problem? Thanks in advance.

You can use Triggers or using replication. 
more info: 
Add Foreign Key relationship between two Databases
SQL Server Replication
Saeid Hasani [sqldevelop]

Similar Messages

  • Joining multiple tables across multiple data sources in MYSQL throws error

    Hi all,
    I have to join tables across multiples MYSQL databases
    eg :
    Table T1,T2 from DB1
    Table T3 from DB2
    Columns from T3 are aggregated ( dimensional column ).
    Hence when i query using oracle answers ( say i have columns from T1,T2 and T3 ) , OBIEE tries to a query DB1 by having NULL for columns in T3
    It uses cast(NULL as INTEGER ) for columns from T3 . But MYSQL throws an error because "cast(NULL as INTEGER )" is not supported by MYSQL.
    I tried executing the query generated by OBIEE manually , if i try giving cast(NULL as SIGNED INTEGER ) , it works.
    pasting the query for reference
    select distinct D1.c2 as c1,
    D1.c1 as c2,
    cast(NULL as INTEGER ) as c3
    from
    (select distinct T87.title_id as c1,
    T59.asin as c2
    from
    print_book_catalog T59 left outer join
    title_authority T87 On T59.asin = T87.asin
    where ( T59.asin = '0345378911' )
    ) D1
    I am not able to find any config file to set this property ( and use signed integer instead of integer ) . Even DBFeatures.INI does not have relevant information.
    Can someobody please help me solve this problem.

    Stijn,
    Thank you for the article link. That was very helpful! It seems that I had a few things off as you do need the "This source should be combined with other sources at this level." checked. In my two table source columns for DATA_SOURCE I defined a literal ('086496' and '085597' for the other) in the Column Mapping tab. I pasted the following in the Fragmentation content, checking the "This source..." box on the Content tab:
    eSIS.SANDBOX4_SCHOOLS.DATA_SOURCE = '086496'
    And pasted the following into the WHERE clause, checking "Select distinct values" on the Content tab:
    sandbox4."".OBIEE.NWOCA_SCHOOLS.SCHOOL_CODE = VALUEOF(NQ_SESSION."SCHOOL") AND sandbox4."".OBIEE.NWOCA_SCHOOLS.DATA_SOURCE = VALUEOF(NQ_SESSION."GROUP")
    This took care of my user's security, utilizing the session variables in the WHERE clause. I am now able to generate reports that only one user can access from one data source and share that same report with another user who can only see data from the other data source.
    Many thanks!!!

  • Outer joins across multiple databases

    I'm trying to join three tables: 2 from data warehouse and 1 from Siebel database in OBIEE. I create the physical and logical joins (no errors or warnings). The model looks like this: Account Address (table 1) -> Account (table 2) -> Siebel Customer Data (table 3)
    I create two queries in Answers:
    (1) Account.Number and Siebel.Address (the query works)
    (2) Account Address.Zip, Account.Number, and Siebel.Address (the query gets the following error):
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42019] Join condition, D901.c3 <> 0, contains predicates that are currently not supported for outer joins across multiple databases. (HY000)
    Can someone help me understand why the join between the two databases works for the first query but when I add a second table it fails?
    thanks...

    Either you can link the Oracle DB into Access (by using File/Get External Data/Link Tables)
    or you have to simulate the join in Java by doing two separate queries and looping through the results.

  • How to execute sql scripts from Powershell across multiple databases

    Re: How to execute sql scripts from Powershell across multiple databases
    I have an tsql script that I want to run across a list of databases. How is the best way to do this in Powershell? Thanks.

    My example below, using just the SMO and not breaking up the batches, the ExecuteWithResults give the following error when the .sql file contains a GO. My script files are as simple as a DECLARE and then a GO.
    WARNING: SQL Script Failed
    The object of type "Microsoft.PowerShell.Commands.Internal.Format.FormatStartData" is not valid or not in the correct sequence. This is likely caused by a user-specified "format-list" comm
    and which is conflicting with the default formatting.
        + CategoryInfo          : InvalidData: (:) [out-lineoutput], InvalidOperationException
        + FullyQualifiedErrorId : ConsoleLineOutputOutOfSequencePacket,Microsoft.PowerShell.Commands.OutLineOutputCommand
    Also, when executing from the ISE, is there a way to force the ISE to release the files. I am having to close the ISE and reopen my script every time I want to make a testing change to the .sql file.
    [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo")
    $scriptspath = "C:\temp\psExecuteSQLScripts\scripts"
    $SQLServer = "fidevc10"
    $SQLDB = "Bank03"
    # Create SMO Server Object
    $Server = New-Object ('Microsoft.SQLServer.Management.Smo.Server') $SQLServer
    # Get SMO DB Object
    $db = $Server.Databases[$SQLDB]
    # Load All SQL Scripts in Directory
    $scripts = Get-ChildItem -Path (Join-Path $scriptspath "*") -Include "*.sql" -Recurse
    # Loop through each script and execute
    foreach ($SQLScript in $scripts)
    $fullpath = $SQLScript.FullName
    # Read the Script File into Powershell Memory
    $reader = New-Object System.IO.StreamReader($fullpath)
    $script = $reader.ReadToEnd()
    # Execute SQL
    Write-Host "Executing $SQLScript on $SQLDB...."
    try
    $ds = $db.ExecuteWithResults($script)
    Foreach ($t in $ds.Tables)
    Foreach ($r in $t.Rows)
    Foreach ($c in $t.Columns)
    Write-Host $c.ColumnName "=" $r.Item($c)
    Write-Host "Complete"
    catch [Exception]
    Write-Warning "SQL Script Failed"
    echo $_.Exception|format-list -force
    Write-Host " " -BackgroundColor DarkCyan

  • Query across multiple databases

    Hi,
    One shot question: is it possible in Oracle to write a query joining two tables from different databases ?
    I used MS SQL, and it was duable there, but I have to port app to Oracle, and I did not manage to do this on oracle.
    I use oracle 9
    Thanks.
    pesq

    1. Create an account on the remote database with permissions to select from the relevent tables.
    2. Create a database link in the local database to connect to the account (step 1.) in the remote database.
    3. Now execute you query in the local database connecting to the tables in the remote database.
    SELECT local_a.col1, local_a.col2, rmt_a.col5
    FROM local_table local_a, remote_table@<name of link> rmt_a
    WHERE local_a.key = rmt_a.key;

  • Can one User in HTMLDB have Multiple Workspace

    Can one User in HTMLDB have Multiple Workspace , If yes Can you suggest some document to check .
    If No as well is it documented any where ?

    Thanks Rosy But I created a User HTMLDB user1
    Now I assigned this user1 to workspace names as workspace1
    When I created another workspace named as workspace2 and if I assign user1 to workspace2 ,
    I don't see user1 in workspace1
    So at a time I can see user1 in either workspace1 or workspace2 ( I am checking this from manage workspace screen )
    Any Idea how can I assign single user in two workspaces .
    When you say , admin account craetion with each workspace
    This is even more simple if u see the ADMIN account created during workspace creation who have the one user for one workspace as well as lots of Workspace u are creating.Thus the Admin have multiple workspace access provision.
    Each admin account is different & works independetly specific to that workspace , so I can have admin for workspace1 & admin for workspace2 both with their individual passwords ( Isn't this true )

  • Our service provider add one digit to all nos. After I update all contacts using one of available programs, contacts are updated but messages received appear with pure phone nos not contact name??any fix

    Our service provider add one digit to all nos. After I update all contacts using one of available programs, contacts are updated but messages received appear with pure phone nos not contact name??any fix

    http://discussions.apple.com/thread.jspa?threadID=2280669&tstart=0

  • HT1937 i used to use verizion network now i switch to Att but can use it my phone still under warranty. can i replace the phone

    i used to use verizion network now i switch to Att but can use it my phone still under warranty. can i replace the phone

    Your Verizon phone will not work on AT&T. If it's under warranty, take it to your nearest Apple Store for warranty service.

  • Multiple websites and applications using one user database

    I've got several applications and websites that will be built around one main application. In a perfect situation users will be able to register once and be able to log into the different applications and websites using that single account. The different
    parts will be:
    Main application (Windows application) that uses the account to get access to it's features and to the server.
    Second application with it's own specific tasks (Also a Windows Application) that uses the account to get access to it's features and to the server.
    Main website which is based on Wordpress. The website has a bbPress forum that would use the account.
    Data server which can be accessed for specific data using the account.
    Most of the data that the users have will be the same for the different applications and websites so to me it seems that having a database for each separate part would complicate things more than having one database for everything.
    My main concern is the Wordpress site and bbPress forum because of the fact that these already have their own account systems.
    What would be a valid approach? Using one of the existing databases from Wordpress or the forums with the risk of having a lot of Wordpress/bbPress specific data with the accounts or making a database especially for the other applications and websites and
    somehow linking those to the website and forum databases? Would the valid approach be secure for use by these different applications and websites?

    Moderators,
    Please look closely, I have already pointed it and you would find that ALL answers which Takken go is from Engsoochean. This is highly not possible its clear favoritism. There are couple of users who are marking ONLY HIS ANSWER and ONLY VOTING HIS POST helpful.
    I am not saying answer is incorrect but question is not relevant to Databse design.
    I have ONLY UNMARKED the answer as I want other moderators to have a look and then they can mark the answer.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • How to use one I-tunes library with multiple windows users (family) on 1 pc

    On our family pc we log in with different accounts. We want to use I-Tunes but all have the same library. I tried to create a library not in the users directory, but in the All Users folder that is accessible for everyone. However, when I import the music in the library for one user and set the same location for another user, I-tunes does not recognize the library. So everyone has to create it's own library.
    What are the best practices to overcome this?

    Keep in mind that what you have done now is you have multiple iTunes libraries accessing the same media folder. Meaning, that each account can have their own ratings, playlists, etc. but more importantly, each account does NOT know what the other account does, so if your daughter adds a CD to her account, it will go into the shared folder, but it will NOT automatically go into your wife's iTunes library. She would have to add it manually. Likewise, if one account deletes music from their library and tells iTunes to remove it to the trash, the other accounts will not know and iTunes will still try to access the file from the shared location even though the file is now trashed.
    Each account has their own database files (.itl files in the iTunes folder) which stores this stuff.
    If you want to have everyone use the exact same library which means the same ratings, playlists, etc. then you need to move the database files into that same location and set each iTunes account to read the same data.
    How to open an alternate iTunes Library file or create a new one
    http://docs.info.apple.com/article.html?artnum=304447
    Patrick

  • Scrollbars w/ one table across multiple tabs

    Please help, I'm stumped on this...
    User has requested that a single table be displayed across multiple tabbed canvases. Problem is that each tabbed canvase contains mulitple record data.
    I can define a scrollbar using the block property pallette and have the scroll bar then display on the first tab. How can I define and display a scroll bar on the second and third tabs?
    In the past, I created a stacked canvas view that replaces the 2nd/3rd tabs. In this instance, the user has requested that the data not be displayed via a stacked scrolling canvas.
    Any ideas?

    You mean the scrollbar does not scroll??
    What is the number of records displayed value of
    your block?
    Your scrollbar should be working when your number of
    records exceed the number of displayed items. Visual
    attributes is for look and feel only.
    Let's say your block number of records displayed is
    5 and you have 10 records the scrollbar is not
    scrolling??
    Regards,
    TonyCorrect. The scroll bar is not scrolling. For the base table block that is spread across three tabs, the number of records displayed is 5. When I execute the query, 6 records are returned. On the first tab, I used the block item property to set up the scroll bar x/y settings and height/width. Within the first tab, the scroll bar is working fine.
    When the second tab is activated (e.g. it is the top most tab page) (w/ the stack canvas overlay scrollbar), the bar appears in the correct position but there is no functionality attached to it. In other words it just appears as a bar like one would find on a bar graph. The bar does not resemble a scroll bar (visually) nor does it operate like one. Ditto for the 3rd tab.
    Do I need to attach a Dummy block with 5 records to each stacked canvas overlay scrollbar in order to have the look/feel and functionality of a scroll bar?
    Thanks,
    Steve

  • Join multiple tables across separate databases

    I needed to perform a join on multiple tables in two separate databases. I am using Sybase ASE 12.5 and jConnect 5.5 JDBC driver.
    Table A is in DB1 and Table B is in DB2. Both DB1 and DB2 reside on the same database server.
    I have set up JNDI bound datasources DS1 for DB1 and DS2 for DB2.
    If the queries involved single tables or multiple tables within the same database, it is simple. But I am not seeing any way where I can perform a join between Tables A and B, which reside in separate databases. The datasources DS1 and DS2 are associated with DB1 and DB2 respectively, so I am not sure if there is anything like performing joins using two data sources.
    One alternative I am facing is using a stored procedure in one database refer the table in the other database, for the join. But I may not be allowed to modify the database; currently, I am allowed to perform READ-ONLY queries.
    So I am looking for any and all options. Please advice.
    Thanks!

    Two choices..
    One find the syntax in DB2 that allows you to do what you want in there. That would often be somelike...
    select a.myfield
    from database1.table1 a, database2.table2 b
    where a.id = b.id
    Obviously the database itself must support this. If it doesn't then you have choice two.
    You extract the data from database1 using java for table1.
    You extract the data from database2 using java for table2.
    You write java code that merges the data from both sources.

  • User Account Authentication across multiple Solaris servers - Best Practice

    Hi,
    I am new to Solaris admin and would like to know the best practice/setup for authenticating user accounts across multiple solaris servers.
    Currently we have 20 - 30 Solaris 8 & 10 servers which each have their own user accounts setup. I am planning to replace these with a similar number of Solaris 10 servers and would like to centralise the user accounts and their authentication.
    I would be grateful for any suggestions on the best setup and any links to tutorials.
    Thanks
    Jools

    i would suggest LDAP + kerberos, LDAP for name lookups and krb5 for auth. provides secure auth + extensable directory for users and other apps if needed. plus, it provides a decent spring board to add other unix plats into the mix since this will support any unix/linux/bsd plat. you could integrate this design with a windows AD env if you want as well.
    [http://www.sun.com/bigadmin/features/articles/kerberos_s10.jsp] sol + ldap+ AD
    [http://docs.lucidinteractive.ca/index.php/Solaris_LDAP_client_with_OpenLDAP_server] sol + ldap (openldap)
    [http://aput.net/~jheiss/krbldap/howto.html] sol + ldap + krb5
    now these links are all using some diff means, however they should give you some ideas as to whats out there. sol 10 comes with suns ldap server and you can use the krb5 server which comes with it as well. many many diff ways to do this. many many more links out there as welll. these are just a few.

  • Updating Database table across multiple SAP systems

    Dear All,
    I am working on a requirement which is described as follows:
    The requirement is to keep a database table in sync across 10 different SAP clients (for production, test systems etc.). So when the database table is modified in source SAP system, it has to be replicated across all the clients and table of other SAP systems.
    So the queries from my side are:
    1. Whether XI should be used here as a middleware or direct RFC calls can do the updation across the SAP systems?
    2. If XI is to be used what would be the recommended approach (ABAP Proxy to ABAP Proxy communication?)
    Hope you can recommend me the best options to achieve this.
    Thanks & Regards,
    Pratik

    it depends on what tables are involved/ what type of data/what transactions cause the update.
    If you know the table names - then database level replication may be an option u2013 many projects do refresh their QA system with production data for a very real test data. If not, a hard disk level mirroring may have to be considered.
    There are other technologies like change pointers in conjunction with distribution model can also be considered - which could trigger idocs that can be sent to the other systems using ALE layer or ALE *** PI/XI

  • Namedquery using same table field multiple times with the use of a label

    Hi all,
    i'm having some trouble with a namedquery. I'm trying to
    use the following namedquery in Toplink to retrive some
    data out of a database.
    select proj.id
    , proj.code
    , proj.name
    , proj.budget
    , proj.status
    , proj.startdate
    , proj.enddate
    , proj.mdr_id projleader_id
    , med_leader.name projleader
    , proj.mdr_id_valt_onder promanager_id
    , med_promanager.name promanager
    , proj.mdr_id_is_account_from accmanager_id
    , med_accmanager.name accmanager
    from uur_projecten proj
    , uur_medewerkers med_leader
    , uur_medewerkers med_promanager
    , uur_medewerkers med_accmanager
    where ( #p_name is not null or #p_search_string is not null )
    and med_leader.id = proj.mdr_id
    and ( proj.mdr_id = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_valt_onder = nvl( #p_name, proj.mdr_id )
    or proj.mdr_id_is_account_van = nvl( #p_name, proj.mdr_id ))
    and (( #p_status is not null
    and substr( proj.status, 1, 1 ) = upper( #p_status ))
    or ( #p_status is null ))
    and ( upper( proj.code ) like upper( '%' || #p_search_string || '%' )
    or upper( proj.name ) like upper( '%' || #p_search_string || '%' ))
    and med_promanager.id = proj.mdr_id_valt_onder
    and med_accmanager.id = proj.mdr_id_is_account_van
    order by decode( substr( proj.status, 1, 1 )
    , 'A', 2, 'T', 3, 'F', 4, 1 ), proj.code desc
    As you all can see the table ‘uur_medewerkers’ is been used trice to
    determine the name for the corresponding ID. I have a Java class with
    the fields for the results and created a Toplink descriptor to map
    the fields to the database fields.
    The problem is that for the 'projleader', 'promanager' and 'accmanager'
    fields the results are null. The reason is probably that Toplink doesn't
    recognize the fields because of the label for the tables.
    Is there a way to make this work?
    Greets, René

    Post Author: quafto
    CA Forum: .NET
    Your query is not too clear so I'll do my best to answer it broadly.
    You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
    You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
    Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
    Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
    Hopefully my comments have given you a few ideas.

Maybe you are looking for

  • After 10.8.4....imagent process memory leak

    I upgraded my MBA to 10.8.4.  I started getting messages that my startup memory was full.  I take a peak at Activity monitor and "imagent" is using 6GB of RAM and my HD has dropped in available space almost 100GB!!! I force quit the process and reboo

  • Ws10000060 and ws10000276

    Hello Folks After an upgrade of EBP 3.0 to SRM 4.0 Server 5 I am experiencing the following problem with the above workflows. The Shopping cart is created and the workflow is triggered. For Ws10000060 no approval is required. This is correctly resolv

  • Hot key(Ctrl+F1) for More field help not working

    Hi all, I am facing a strange problem. When I have run my WD application there will be some UI elements on the browser say one Input field. If I want to check the More information about this input field, I have to make a right mouse click on it and t

  • How to Manage FCE Files

    I recently got an "Out of Memory" message when rendering some audio of an iMovie project I opened in FCE. After scrumaging around I found that I had a bunch of files in the FCE Documents folder: Audio render files,Autosave Vault, etc., so I erased so

  • Group Account Number not available

    We have a new company in the USA, and it uses Chart of Accounts: CANA. The other companies are in Mexico and have another COA, lets say: MEX1. I want to assign to the new American company a Group of Accounts, so in OB13 I assigned in the field "Group