Synchoronize two database at day End

Hi,
I have two databases one is live and other is the previous copy of live database(both have same structure), I want to synchronize both databases at day end(say one time a day), how Can I do this, Where I get information for this,
Thanx, Khawar.

If the database is on a SAN, you can always split the mirror at the end of the day.
You can also create a physical standby database, put it in managed recovery mode once a day, and leave it open for read only access for the rest of the day.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • How can i compare two databases and their tables

    i have a text.txt file then
    i will insert it into db_header and db_details
    db_header has tbl_pcountheader with fld_Rack_No(char) PK and fld_DateAdded(date) PK
    db_details has tbl_pcountdetails with fld_Rack_No(char) PK, fld_Barcode(char) PK and fld_Quantity(int)
    then i will lookup in db_products
    db_products has tbl_products and tbl_barcodes
    tbl_products has fld_ItemCode
    tbl_barcodes has fld_Barcode and fld_ItemCode
    now i want to make a prompt contains
    Rack No: Date:
    Counter No:
    Barcode | Item Code | Item Description | Quantity
    how can i fill up this by comparing db_details and db_products?
    Private Sub bt_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_upload.Click
    If saveCheckBox.Checked = False Then
    MsgBox("Please click the box to continue.")
    Return
    End If
    If lb_file.SelectedItem Is Nothing Then
    MessageBox.Show("Please select a file.")
    Exit Sub
    End If
    ' Obtain the file path from the list box selection.
    Dim filePath = lb_file.SelectedItem.ToString
    ' Verify that the file was not removed since the Browse button was clicked.
    If System.IO.File.Exists(filePath) = False Then
    MessageBox.Show("File Not Found: " & filePath)
    Exit Sub
    End If
    ' Obtain file information in a string.
    Dim fileInfoText As String = GetTextForOutput(filePath)
    'LookUP db_header, db_details and db_products
    Dim cs As String = "Database=;Data Source=localhost;" _
    & "User Id=root;Password=1234"
    Dim conn As New MySqlConnection(cs)
    Dim ds As New DataSet
    Dim da As New MySqlDataAdapter
    Dim cmd As New MySqlCommand
    Dim dt As New DataTable
    Dim stm As String = "SELECT tbl_pcountheader.fld_Rack_No, tbl_pcountheader.fld_DateAdded, tbl_pcountdetails.fld_Barcode, tbl_products.fld_ItemCode, tbl_products.fld_ItemDesc, tbl_pcountdetails.fld_Quantity FROM db_header.tbl_pcountheader INNER JOIN db_details.tbl_pcountdetails ON db_details.tbl_pcountdetails.fld_Rack_No = db_header.tbl_pcountheader.fld_Rack_No INNER JOIN db_products.tbl_barcodes ON db_details.tbl_pcountdetails.fld_Barcode = db_products.tbl_barcodes.fld_Barcode INNER JOIN db_products.tbl_products ON db_products.tbl_barcodes.fld_ItemCode_fk = db_products.tbl_products.fld_ItemCode GROUP BY tbl_pcountheader.fld_Rack_No, tbl_pcountheader.fld_DateAdded ORDER BY tbl_pcountheader.fld_Rack_No"
    ds = New DataSet
    Try
    conn.Open()
    da = New MySqlDataAdapter(stm, conn)
    da.Fill(ds, "tbl_pcountheader")
    DataGridView1.DataSource = ds.Tables("tbl_pcountheader")
    Dim headers = (From header As DataGridViewColumn In DataGridView1.Columns.Cast(Of DataGridViewColumn)() _
    Select header.HeaderText).ToArray
    Dim rows = From row As DataGridViewRow In DataGridView1.Rows.Cast(Of DataGridViewRow)() _
    Where Not row.IsNewRow _
    Select Array.ConvertAll(row.Cells.Cast(Of DataGridViewCell).ToArray, Function(c) If(c.Value IsNot Nothing, c.Value.ToString, ""))
    Using sw As New IO.StreamWriter("c:\report.txt", append:=True)
    sw.WriteLine(String.Join(",", headers))
    For Each r In rows
    sw.WriteLine(String.Join(",", r))
    Next
    End Using
    ds.WriteXmlSchema("Sample.xml")
    Dim cr As New CrystalReport1()
    cr.SetDataSource(ds)
    CrystalReportviewer1.ReportSource = cr
    CrystalReportviewer1.Refresh()
    Catch ex As MySqlException
    MsgBox("Error: " & ex.ToString())
    Finally
    conn.Close()
    End Try
    ' Show the file information.
    Dim PrintPrompt As String
    PrintPrompt = MsgBox(fileInfoText, MsgBoxStyle.YesNo, "ProofList")
    If PrintPrompt = vbYes Then
    'fileInfoText.print()
    If saveCheckBox.Checked = True Then
    ' Place the log file in the same folder as the examined file.
    Dim bakFolder As String = System.IO.Path.GetDirectoryName(filePath)
    Dim bakFilePath = System.IO.Path.Combine(bakFolder, "back-up.bak")
    Dim bakText As String = "Backed-Up: " & Date.Now.ToString & vbCrLf & fileInfoText & vbCrLf & vbCrLf
    ' Append text to the log file.
    'System.IO.File.AppendAllText(bakFilePath, bakText)
    My.Computer.FileSystem.WriteAllText(bakFilePath, bakText, append:=True)
    'My.Computer.Network.UploadFile(bakFilePath, "C:\Documents and Settings\SAPC-TECH\My Documents\back-up file.bak", "", "", False, 1000)
    'My.Computer.FileSystem.DeleteFile(bakFilePath)
    'Form2.Show()
    End If
    'Note: This message box shows that you've uploaded a file and back up it.
    MessageBox.Show("Already backed-up to ")
    Else
    'Me.Close()
    'Application.Exit()
    'End
    End If
    'Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
    'Form2.Close()
    'Me.Close()
    End Sub
    here's my final code that solves my problem.
    i just make the environment of vb into mysql console
    so that i can call all the database that i wanted.

    Private Sub bt_upload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bt_upload.Click
    If saveCheckBox.Checked = False Then
    MsgBox("Please click the box to continue.")
    Return
    End If
    If lb_file.SelectedItem Is Nothing Then
    MessageBox.Show("Please select a file.")
    Exit Sub
    End If
    ' Obtain the file path from the list box selection.
    Dim filePath = lb_file.SelectedItem.ToString
    ' Verify that the file was not removed since the Browse button was clicked.
    If System.IO.File.Exists(filePath) = False Then
    MessageBox.Show("File Not Found: " & filePath)
    Exit Sub
    End If
    ' Obtain file information in a string.
    Dim fileInfoText As String = GetTextForOutput(filePath)
    'LookUP comparison db_details to db_products
    'Dim connString As String = "Database=db_products;Data Source=localhost;" & "User Id=root;Password=1234"
    'Dim conn As New MySqlConnection(connString)
    'Dim cmd As New MySqlCommand()
    'Try
    ' conn.Open()
    ' cmd.Connection = conn
    ' cmd.CommandText = "SELECT Database1.dbo.TableName.ColumnName, Database2TableName.Name, 'The reason why Database 2 isnt defined is the fact that it has been defined in the connection" _
    ' FROM Database2TableName INNER JOIN _
    ' Database2TableName2 INNER JOIN _
    ' WHERE (Database1.dbo.TableName.ColumnName = '')"
    ' cmd.Prepare()
    ' cmd.ExecuteNonQuery()
    ' conn.Close()
    'Catch ex As Exception
    'End Try
    ' Show the file information.
    Dim PrintPrompt As String
    PrintPrompt = MsgBox(fileInfoText, MsgBoxStyle.YesNo, "ProofList")
    If PrintPrompt = vbYes Then
    'fileInfoText.print()
    If saveCheckBox.Checked = True Then
    ' Place the log file in the same folder as the examined file.
    Dim bakFolder As String = System.IO.Path.GetDirectoryName(filePath)
    Dim bakFilePath = System.IO.Path.Combine(bakFolder, "back-up.bak")
    Dim bakText As String = "Backed-Up: " & Date.Now.ToString & vbCrLf & fileInfoText & vbCrLf & vbCrLf
    ' Append text to the log file.
    'System.IO.File.AppendAllText(bakFilePath, bakText)
    My.Computer.FileSystem.WriteAllText(bakFilePath, bakText, append:=True)
    'My.Computer.Network.UploadFile(bakFilePath, "C:\Documents and Settings\SAPC-TECH\My Documents\back-up file.bak", "", "", False, 1000)
    'My.Computer.FileSystem.DeleteFile(bakFilePath)
    Form2.Show()
    End If
    'Note: This message box shows that you've uploaded a file and back up it.
    MessageBox.Show("Already backed-up to ")
    Else
    Me.Close()
    Application.Exit()
    End
    End If
    Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
    Form2.Close()
    Me.Close()
    End Sub
    here's my code wherein i have to compare the two database and save it into .txt file
    i just have to get this items
    Rack No:
    Date:
    Counter No:
    Barcode:
    Item Code:
    Item Description:
    Quantity:
    as a prooflist to be print out.

  • How can I combine two databases, from two computers, to have one combined database of messages?

    My old XP computer recently died and I had to build a new Windows 8.1 machine. While I was down I used a laptop as a temporary replacement. Now my new machine is running fine and receiving e-mail, but I now have two databases--one on the new machine and one on the laptop. Both are based on a recent backup, so they are lengthy--except that the new machine's database has a hole in it for the period I was on the laptop and the laptop's database also has gaps. How can I combine two databases into one that includes the messages from both machines?
    Thanks in advance,
    profsimonie

    Thanks for your reply. My profile folder did not contain any MBOX files. I found them in another folder on another drive. The Import-Export tools simply transferred each folder to the current one as a sub-folder. Then I had to use ctrl-a to select everything in the folder and move them manually to the current folder (such as inbox). Then I could use the other utility you mentioned to remove the duplicates. This had to be done, one folder at a time, to combine each folder. It worked, but I had about thirty-five folders to deal with. The whole process took most of two days to complete. I wish there was a simple way to blend everything together in one action, but I could not find an add-on that would do this.
    Frank Simonie

  • One Listener : two Databases in the same system : is it possible ?

    Hi,
    I am trying to setup a single listener to listen to two Databases running in the same system. We are experimenting a Network Architecture & this is a part of our experiment to see what happens..( most of the documentation I have read point out that running two DBs on a sing le system isn't a good idea..).
    One of the Databases is an Oracle Application Server Infrastructure Metadata Respository ( OraInfra ). The other database has been configured for use with Oracle Content Database ( OraContentDB ) .
    The two databases are up & running successfully - however, the problem is with the listener. The two listener.ora files are as follows :-
    # listener.ora Network Configuration File: C:\oracle\product\10.2.0\OraContentDB\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\oracle\product\10.2.0\OraContentDB)
          (PROGRAM = extproc)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
          (ADDRESS = (PROTOCOL = TCP)(HOST = 152.69.191.100)(PORT = 1522))
      )and
    # listener.ora Network Configuration File: C:\OraInfra\network\admin\listener.ora
    # Generated by Oracle configuration tools.
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\OraInfra)
          (PROGRAM = extproc)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 152.69.191.100)(PORT = 1521))
            (ADDRESS = (PROTOCOL = TCP)(HOST = 152.69.191.100)(PORT = 1522))
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )However, everytime I try to connect via SQLPLUS, I can only connect via the first Listener. If I try to connect via the second listener, I only get this error :-
    SQL> connect scott/tiger@localhost:1522/CONTENTDB
    ERROR:
    ORA-12541: TNS:no listenerCan anyone shed some light on this ?
    Thanks,
    Sandeep

    Hi,
    Thanks to everyone for your time ! Yes, I now have an understanding of the architecture & I am trying to set up my listener...
    Paul, I reconfigured my Listener.ora and started it :-
    SID_LIST_LISTENER =
      (SID_LIST =
        (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = C:\OraInfra)
          (PROGRAM = extproc)
        (SID_DESC =
          (GLOBAL_DBNAME = ORAINFRA.idc.oracle.com)
          (ORACLE_HOME = C:\OraInfra)
          (SID_NAME = ORAINFRA)
        (SID_DESC =
          (GLOBAL_DBNAME = CONTENTDB.idc.oracle.com)
          (ORACLE_HOME = C:\oracle\product\10.2.0\OraContentDB)
          (SID_NAME = CONTENTDB)
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = 152.69.191.100)(PORT = 1521))
          (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )I started the listener from the command line and this si what I see :-
    C:\OraInfra\bin>c:\OraInfra\bin\lsnrctl
    LSNRCTL for 32-bit Windows: Version 10.1.0.4.2 - Production on 16-AUG-2006 10:12
    :38
    Copyright (c) 1991, 2004, Oracle.  All rights reserved.
    Welcome to LSNRCTL, type "help" for information.
    LSNRCTL> start
    Starting tnslsnr: please wait...
    TNSLSNR for 32-bit Windows: Version 10.1.0.4.2 - Production
    System parameter file is C:\OraInfra\network\admin\listener.ora
    Log messages written to C:\OraInfra\network\log\listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=152.69.191.100)(PORT=152
    1)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=152.69.191.100)(PORT=152
    1)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for 32-bit Windows: Version 10.1.0.4.2 - Produ
    ction
    Start Date                16-AUG-2006 10:12:45
    Uptime                    0 days 0 hr. 0 min. 2 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   C:\OraInfra\network\admin\listener.ora
    Listener Log File         C:\OraInfra\network\log\listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=152.69.191.100)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))
    Services Summary...
    Service "CONTENTDB.idc.oracle.com" has 1 instance(s).
      Instance "CONTENTDB", status UNKNOWN, has 1 handler(s) for this service...
    Service "ORAINFRA.idc.oracle.com" has 1 instance(s).
      Instance "ORAINFRA", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    LSNRCTL>It didn't look suspicious to me I had a peek at the Listener.Log :-
    TNSLSNR for 32-bit Windows: Version 10.1.0.4.2 - Production on 16-AUG-2006 10:12:43
    Copyright (c) 1991, 2004, Oracle.  All rights reserved.
    System parameter file is C:\OraInfra\network\admin\listener.ora
    Log messages written to C:\OraInfra\network\log\listener.log
    Trace information written to C:\OraInfra\network\trace\listener.trc
    Trace level is currently 0
    Started with pid=3308
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=152.69.191.100)(PORT=1521)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))
    TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE
    16-AUG-2006 10:12:45 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=)(USER=balajsub))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=168821762)) * status * 0
    16-AUG-2006 10:12:46 * service_died * 1183The message "service_died" looked fishy & I tried to conect :-
    C:\OraInfra\bin>sqlplus /nolog
    SQL*Plus: Release 10.1.0.4.2 - Production on Wed Aug 16 10:18:26 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    SQL> connect scott/[email protected]:1521/ORAINFRA.idc.oracle.com
    SQL> Connected
    SQL> connect scott/[email protected]:1521/CONTENTDB.idc.oracle.com
    ERROR:
    ORA-12537: TNS:connection closedI now understand that the Listener is trying to open a connection to the Database - but, I am not sure why the connection dies with with the ORA-12537 error. It looks like the error is somewhere deeper in the TNS Layer...
    Can you throw some light on this as well ?
    Regards,
    Sandeep

  • Trigger in a join table between two database

    Hi an Happy new year
    I have two database, one is dedicated to security and the second for my multitenancy application
    In this two databases one have tables USER, USER_JOIN_USER_ROLE and USER_ROLE
    the second, USER (where fields are differents), USER_JOIN_USER_ROLE and USER_ROLE
    the two join table must be the same and USER_ROLE are the same in the two databases.
    I plan to use a trigger to replicate from the  application database to the security one, I already use triggers to Replicate USER and set the differents fields.
    I'm new in triggers using.
    My user replication trigger seems like that
    CREATE TRIGGER [dbo].[USER_REPLICATION]
    ON [dbo].[DM_USER]
    AFTER INSERT
    AS
    BEGIN
    DECLARE @EmployeeId int = (SELECT FKEmployee FROM inserted)
    DECLARE @Login nvarchar(50) = (SELECT LoginUser FROM Inserted)
    DECLARE @Password nvarchar(50) = (SELECT PasswordUser FROM Inserted)
    DECLARE @Tenant int = (SELECT IdCompany FROM TEST_MULTI.dbo.DM_COMPANY WHERE IsTenant = ''Y'')
    DECLARE @CompanyId int = (SELECT ExtIdCompany FROM TEST_MULTI.dbo.DM_COMPANY WHERE IsTenant = ''Y'')
    DECLARE @LegalEntityId int = (SELECT FKLegalEntity FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
    DECLARE @LastName nvarchar(255) = (SELECT LastNameEmployee FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
    DECLARE @FirstName nvarchar(255) = (SELECT FirstNameEmployee FROM TEST_MULTI.dbo.DM_EMPLOYEE WHERE IdEmployee = @EmployeeId)
    DECLARE @EMail nvarchar(255) = (SELECT EMail FROM inserted)
    SET NOCOUNT ON;
    INSERT INTO DM_SECURITY_MASTER.dbo.DM_USER(LoginUser, PasswordUser, FKCompany, TenantId, LegalEntityId, LastName, FirstName, Email)
    VALUES (@Login, @Password, @CompanyId, @Tenant, @LegalEntityId, @LastName, @FirstName, @EMail)
    UPDATE [TEST_MULTI].[dbo].[DM_USER] SET ExtIdUser = (SELECT IdUser FROM [DM_SECURITY_MASTER].[dbo].[DM_USER]
    WHERE LoginUser = @Login
    AND PasswordUser = @Password
    AND FKCompany = @CompanyId
    AND TenantId = @Tenant
    AND LegalEntityId = @LegalEntityId
    AND LastName = @LastName
    AND FirstName = @FirstName
    AND EMail = @EMail)
    WHERE IdUser = (SELECT IdUser FROM Inserted)
    END
    but I cannot figure how to use a trigger to update a collection and not find anything on it, any help welcome
    I use Windows Identity Foundation in my code and update or insert can set multiple rows

    Hello and thanks for help.
    The trigger i give as example already works fine but Fanny Liu is for sure better than mine and I will try it. Users insertions are not multiple, only one user can be inserted at the same time
    My question was most on using triggers to update a collection via a Join table between my user and users roles
    I wrote it Yesterday for INSERT
    USE [TEST_MULTI]
    GO
    /****** Object: Trigger [dbo].[USER_ROLE_INSERT_REPLICATION] Script Date: 01/03/2014 10:56:36 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:
    -- Create date: 2014/02/01
    -- Description: Replication INSERT on MASTER DATABASE
    -- =============================================
    ALTER TRIGGER [dbo].[USER_ROLE_INSERT_REPLICATION]
    ON [TEST_MULTI].[dbo].[DM_USER_JOIN_USER_ROLE]
    AFTER INSERT
    AS
    DECLARE InsertCursor CURSOR FOR (SELECT FKUser, FKUserRole FROM inserted)
    DECLARE @UserId int, @UserRoleId int
    OPEN InsertCursor
    FETCH NEXT FROM InsertCursor INTO @UserId, @UserRoleId
    WHILE @@FETCH_STATUS = 0
    BEGIN
    DECLARE @UserMasterId int = (SELECT ExtIdUser FROM TEST_MULTI.dbo.DM_USER WHERE IdUser = @UserId)
    IF NOT EXISTS(SELECT * FROM DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE WHERE FKUser = @UserMasterId
    AND FKUserRole = @UserRoleId)
    INSERT INTO DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE (FKUser, FKUserRole) VALUES (@UserMasterId, @UserRoleId)
    FETCH NEXT FROM InsertCursor INTO @UserId, @UserRoleId
    END
    CLOSE InsertCursor;
    DEALLOCATE InsertCursor;
    And for DELETE
    USE [TEST_MULTI]
    GO
    /****** Object: Trigger [dbo].[USER_ROLE_DELETE_REPLICATION] Script Date: 01/03/2014 10:57:58 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    -- =============================================
    -- Author:
    -- Create date: 2014/02/01
    -- Description: Replicate DELETE on MASTER DATABASE
    -- =============================================
    ALTER TRIGGER [dbo].[USER_ROLE_DELETE_REPLICATION]
    ON [TEST_MULTI].[dbo].[DM_USER_JOIN_USER_ROLE]
    AFTER DELETE
    AS
    DECLARE DeleteCursor CURSOR FOR (SELECT FKUser, FKUserRole FROM deleted)
    DECLARE @UserId int, @UserRoleId int
    OPEN DeleteCursor
    FETCH NEXT FROM DeleteCursor INTO @UserId, @UserRoleId
    WHILE @@FETCH_STATUS = 0
    BEGIN
    DECLARE @UserMasterId int = (SELECT ExtIdUser FROM TEST_MULTI.dbo.DM_USER WHERE IdUser = @UserId)
    DELETE FROM DM_SECURITY_MASTER.dbo.DM_USER_JOIN_USER_ROLE WHERE FKUser = @UserMasterId AND FKUserRole = @UserRoleId
    FETCH NEXT FROM DeleteCursor INTO @UserId, @UserRoleId
    END
    CLOSE DeleteCursor;
    DEALLOCATE DeleteCursor;
    It works fine
    Thanks for help, I will mark it as answered

  • Run two databases on Linux

    Hi all... i installed a program called "Cognos 8" in Linux this program needs run two databases at the same time, so i have the two databases but i can't have two running atthe same time, how i can do this???, because when i run one, i have to declare it in the .bash_profile, and when i run the other, i have to declare again and reboot the server. So i want to know how i can run the two at the same time...
    Thanks and everybody have a nice day¡¡¡¡¡

    Do you mean does it run in a browser on Ubuntu or do you want to run the application server on Ubuntu ?

  • Ipod Shuffle suddenly emptied after two to three days not use..

    I had a problem which is my ipod shuffle suddenly emptied after two to three days i left in my room. What's the problem actually can be turn be like this since it's the first time i through it..please send me an email regarding this at [email protected] Thank You!

    Okay, and thanks for re-posting your photos. I have to agree that it definitely does look like crimping and would expect any continuity checks run on it to show an open or two. That would certainly explain your symptoms, but it's not the answer for all such cases, i.e., BLD, being reported here.
    I've now purchased two 'broken' Shuffle's on eBay, both coming off of M$ systems and reporting the blinkies. The first was Alive on Arrival and is still living happily on a daughter's eMac. The second was totally dead, with no reaction at all to anything I did; it's now disassembled, with no evidence of your crimping on the ribbon cable, while I mull over buying an LI battery and getting someone to solder it in for me.
    In your place I'd certainly be taking my evidence to Apple and pointing out that, at the end of the day, it was just a matter of pure luck that it managed to last as long with this defect as it did. I think you should be able to convince them to give you some sort of satisfaction on this, but appreciate your desire not to go through the bother of it.

  • Using RMI to synchronize two databases

    Hello
    I have studied Java for some time, but never had
    the opportunity to work in a "real project", but
    now I have something to do...
    I have the following situation: two offices
    of a company, the central one running SQL Server
    database and other running Oracle, must change
    information, reading data from Oracle and saving in
    SQLServer and vice-versa. The programs should be
    running all day, checking at specified periods of
    time if there is some information to be updated
    in any database.
    The offices are phisically far, so it should be
    used Internet to make the connection (both sites
    are connected to Internet 24h).
    I was wondering on using the Java RMI technology
    to achieve this. I have read the official Sun
    documentation about RMI and some articles, and I
    found it very interesting, and pretty easy to
    implement.
    But I have some "real world" questions:
    - Is RMI the ideal solution for this problem, or
    there is some newer or more adequate one?
    - At first it would be a small amount of data
    to be synchronized, but if it grows a lot or
    more offices are to be connected, is RMI performance
    good? (is it quick?)
    - About security - is RMI secure? I mean, I think
    the server program should be listening a port in a
    IP address open to ALL the internet... How safe is
    the user authentication, or this is responsability of
    the application?
    - What is the relationship between RMI and proxies,
    firewalls etc? Are they compatible?
    - XML is something to think about using for this
    application, or it have nothing to do to the job?
    The initial option was using a Microsoft solution
    to make this application :(, but I would be very happy
    if I could use Java ;) , but I have to have the
    adequate technical base to suggest it...
    So, any help would be very welcome!
    Luis Cabral

    Here's a set of (some) answers based on my experience (which is NOT synchronizing two databases, but on synchronizing sets of files across a tree of file servers.)
    Hello
    1. It sounds like two databases must be cross-synchronized. You didn't say what the platforms were, but if they are mixed, then java is a positive choice.
    2. Java rmi is fine for doing this kind of work. However I can't give you any performance guarantees. You probably need to get some fine requirements and write some model programs.
    3. YOU are responsible for security. RMI gives you connectability; you have to develop some kind of cross-authentication procedure as part of you application.
    4. To work over the internet, you will have to develop some way through firewalls.
    o If the two sites use "Virtual private networks", then both the security issue and the firewall issue are mostly solved for you.
    o Otherwise, and maybe even with vpn, you will have to do a little bit of work to use fixed port numbers. (The way rmi works is that there is a listener at a fixed port which will let a remote program "look up" a local object; after that, communication takes place object-object over a randomly-assigned port.) It takes about a dozen lines of code to make this work.
    5. I don't think XML has anything to do with this problem. It MAY help you if you have serious data conversion issues. I hear it's a pig.
    Finally, an application item that may or may not be an issue: Two databases, two platforms == possible character set conversion problems.

  • How to configurate system for two database under one server

    Hi Friends,
    I installed abd created A database by oracle 10GR4 in window 32 bit 2003.
    it works.
    Then i created other B database by DBCA under this server.
    When I shutdown immediate database.
    it works well. But I can not startup mount ot startup A database again,
    I got below message as
    SQL> startup mount;
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn't exist
    SQL> startup;
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn't exist
    SQL> startup;
    ORA-24324: service handle not initialized
    ORA-01041: internal error. hostdef extension doesn't exist
    From EM, I saw as
    A listen Status Up
    LISTENER
    Oracle Home          
    C:\oracle\product\10.2.0\db_1\BIN
    Location          
    C:\oracle\product\10.2.0\db_1\BIN\network\admin
    BUT agent connect Status          
    Failed
    Details          ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach)
    A database instance down
    Host     salerpt.net
    Port 1521
    SID SALERPT
    Oracle Home C:\oracle\product\10.2.0\db_1\BIN
    Also I try to connect as
    SQL> connect sys/salel@salerpt as sysdba;
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    Form EM, I saw listen start up.
    Then I stop it. then restart it
    I can saw B db listen and can not see A db listen.
    also
    I saw that other B database works.
    My listen info as***************
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = C:\oracle\product\10.2.0\db_1\BIN)
    (PROGRAM = extproc)
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = SALERPT.NET)(PORT = 1521))
    I check physical, two database use one common bin directory .
    I do not have any experience to handle two database under one oracle server.
    How to check and configurate DB server system?
    Thanks for help.
    Edited by: user589812 on Jan 4, 2009 8:17 AM

    Jim,
    Before starting the database A, did you set ORACLE_SID=A from command line? You can run as many instances you want from single server provided you enough memory, processing power. Also try starting your instances usign window services and check and post some lines from alert.log for database A.
    tnsnames.ora entry
    DATABASE_A =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = salesrpt.net)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = DATABASE_A)
    DATABASE_B =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = salesrpt.net)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = DATABASE_B)
      )Regards
    Edited by: OrionNet on Jan 5, 2009 10:55 AM

  • One instance and two databases?

    Hello, I've installed oracle database on my server. I've read a lot of documentation to learn the basic concepts.
    Ok, I have a question. I have read that one instance only can manage ONE database. Is it true? If it's true, how on earth I can create two database? for example, I want to create database-one and database-two.
    I would create these with CREATE DATABASE command. How does Instance know if I want to access to database-one or database-two. How I indicate it in initilitation parameter file of my instance?
    In sumary, Can one instance works with two databases?

    Look at the following output. If I do not set my ORACLE_SID variable, the 9.2.0.7 client connects to the 9.2.0.7 database instance. If I set my ORACLE_SID , the same 9.2.0.7 client now connects to the 10.2.0.1 database (the database specified in the ORACLE_SID variable).
    C:\>set ORACLE_SID=
    C:\>sqlplus kkishore/kkishore
    SQL*Plus: Release 9.2.0.7.0 - Production on Mon Jul 17 09:27:55 2006
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    SQL> exit
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    C:\>set ORACLE_SID=ORA10GR2
    C:\>sqlplus kkishore/kkishore
    SQL*Plus: Release 9.2.0.7.0 - Production on Mon Jul 17 09:29:31 2006
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> disconnect
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL>Message was edited by:
    Kamal Kishore

  • Hyperion- Can it Connect to two database at a time

    Hi All,
    I am new to Hyperion Reporting and Analysis. Kindly help me in the following Scenario.
    Consider two database 'A' and 'B'
    I want to create a report from tables from Database "A" and "B"
    How to do that.
    Kindly Help me out
    Thanks in advance
    Regards
    Gatha

    For Interactive Reporting there are a couple options.
    1. Us the OBIEE BI Server and model your semantic layer with the connections. The Product is designed for Federated Queries.
    2. Build within Client
    - Query 1 for Database A
    - Query 2 for Database B
    - Qyery 3 using local results build the data model from Query Results A and B - Joined appropriately
    3. Depending on the Database - SQLServer, Oracle, DB2 etc you could connect to multiple DB within one OCE - You will need to look at Mark Ostroff's tips and tricks guide from previous Hyperion Conference for how to do it.
    Hope this is Helpful
    Wayne Van Sluys
    TopDown Consulting

  • Error message when posting invoice : Day-end closing not defined

    Hi,
    In our training environment we migrated from FAGLFLEXT to FMGLFLEXT and activated fund management.
    Now when posting an invoice the system provides an error message: "FQ252 Day end closing not defined".
    There is no configuration related to F845 but we are prevented from posting the document due to this error message.
    Any idea of where this could come from and of what need to be done to prevent this from happening?
    Rgds
    Sophie

    Hi Sophie,
    Can you check if you have entries in either PSO43 or PSO43USER tables (can be accessed via F8O2 transaction)?
    Regards,
    Eli

  • Creation of two databases in oracle 11g on linux

    HI,
    I need to create two databases in oracle 11g on linux.
    how to set SID'S in .bash_profile and change the init.ora file.
    pls anyone let me know
    thanks
    srinivas

    If you have different databases on same node you could choose to not set ORACLE_SID in shell init file but use instead interactive oraenv Oracle script to set the right ORACLE_SID.
    Please read Configuring the Operating System Environment Variables in http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/em_manage.htm#ADMQS12369
    To create easily a database (ie without using your own scripts) try to use DBCA that will automatically take care of database initialization file: http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/install.htm#BABEIAID
    Edited by: P. Forstmann on 5 août 2011 12:01

  • Need help in merging two database

    Dear All,
    Can any one please let me know the methodology/Best practices for merging two databases.
    We are having two oracle Database A and B, the data from
    Database A has to be migrated to Database B using PL/SQL scripting.
    it will be a great help,Thanks in advance!

    Hi,
    Use the DB Links and try to use the "MERGE" that is better.
    you can clone it right, almost you are getting the same data from A to B and then you are going to Update is I am correct. Does the "B" consist the data, If yes then you can't clone on exiting DB, As i said above go for DB links and write custom scripts as per your requirement.
    Refer for DB links
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/ds_admin.htm#sthref4108
    - Pavan Kumar N

  • I want to connect two database in Oracle

    Dear All
    I want to connect two database in Oracle ver-10.2.0.1.0 ,And fetch data from 2nd table.
    OS - XP Pro.
    Regards,
    Parwez

    Configure remote DB in TNS first.
    Create DB link.
    CREATE {PUBLIC} DATABASE LINK "DBLINKNAME"  CONNECT TO "remoteuser" IDENTIFIED BY "remotepwd" USING 'REMOTEDBTNSALIAS';Query remote tables using
    select * from remotetable@DBLINKNAME;

Maybe you are looking for

  • Default values for the controlling area and language

    Hello I have a query. I need to set default values for the controlling area and language in the screen "find account assignment data 1" Is it possible to do so? Thanks. Jayawant Gokhale

  • I cant restore mi iphone 5s, i have "error 1669" or "2005" please help meeeee

    few days ago i lost the signal of my phone by 2 min and the signal come back after 2 min again lose the signal and i decided to upgrade to 7.1.1 and i cant restore the iphone (5s) apple send an alert "error 2005" or "error 1669" please help me i dont

  • Videos in real 5.1 (ac3), not aac 5.1

    Hello, I want to find out, how Apple play video files with Dolby Digital in the iTunes Store. I think, the video format is mp4, but how they put 5.1 in this format to play it with Apple TV? I want my Videos in real 5.1, too. I have a video converter,

  • Lens Correction Problem

    I'm using a Nikon D3 and Nikon professional lenses which are all recognised by the Photoshop CS5 (12.04) lens Correction function when inputting RAW images. But... If I process any of my RAW files through Photomatix (saving as JPG) and then open them

  • Heterogenous Transport Management System

    Hi All Some one can help us with the doubt concerning with the Transport Management System with a Heterogenous Systems. We want to know if it is possible and what we need to do to have the next landscape: DEVELOP System with IBM Server with AIX 5.3 O