SQL server, data retrieval in real time?

Hi, I am trying to write a simple java program that will connect to a SQL database and retrieve inputted data. Ideally, I would like it to be outputted in some format, possibly string.. XML, it really doesn't matter to me. I really would like it to be in real time though (ie. when new data is inputted, the data is immediately outputted to the screen). Could someone point me in a direction? I am not really that good with programming, some sample code would be helpful. Thank you in advance.

Well, to start with, the programmer at the user interface end, can tweak their code a little, but in reality, you are not going to impact the function of the DB very much unless you have adm rights in the DB and can do opimizations on it according to what your users need--such as indexes and physical ordering data.
That said, your going to JDBC to connect to the DB or the JDBC/ODBC bridge. Look up the form and optimizations of sql select queries for your choosen DB.

Similar Messages

  • Access SQL Server data at time of Windows OS Boot Process

    It is possible to access SQL Server data at time of Windows OS Boot Process and before login into Windows.
    if anybody any idea on this.
    If you think my suggestion is useful, please rate it as helpful.
    If it has helped you to resolve the problem, please Mark it as Answer.
    Varinder Sandhu www.varindersandhu.in

    No, you need to identified before accessing to SQL Server. It is like you try turn on electric cooker before you open the door.
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Failure Installing SQL Server Data Tools 2012 on Windows 8.1

    I am trying to install SQL Server 2012 with SQL Server Data Tools on my laptop with Windows 8.1 standard edition.  It fails each time when it gets to the SSDT installation with the same 1935 error, other features still install.  The error
    text is as follows:
    The following error has occurred:
    SQL Server Setup has encountered an error when running a Windows Installer file.
    Windows Installer error message: An error occurred during the installation of assembly 'Microsoft.VC80.CRT,version="8.0.50727.4053",publicKeyToken="1fc8b3b9a1e18e3b",processorArchitecture="amd64",type="win32"'. Please
    refer to Help and Support for more information. HRESULT: 0x80073715.
    Windows Installer file: F:\1033_ENU_LP\x64\setup\x64\SharedManagementObjects.msi
    Windows Installer log file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20140220_201634\SharedManagementObjects_Cpu64_1.log
    Click 'Retry' to retry the failed action, or click 'Cancel' to cancel this action and continue setup.
    For help, click: http://go.microsoft.com/fwlink?LinkID=20476&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xDC80C325
    I have disabled any antivirus software that may have been interfering and am not sure what else to try.  Any assistance on how to resolve this error would be greatly appreciated.

    Hello,
    Please read the following article about the cause of that error:
    http://support.microsoft.com/kb/2688946/en-us
    I would like to recommend you the following procedure:
    http://www.sqlcoffee.com/SQLServer2012_0008.htm
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • SQL Server date format

    Hi all,
    I realize that this may be a little bit out of the scope of this forum, but I thought I'd ask anyway.
    I'm trying to figure out how to select a date in the format mm/dd/yyyy from a SQL Server date/time field. I've browsed the internet on this but haven't found any quick/easy way to do this. Can anyone please help me out here?
    Thanks!
    -Stephen Spalding
    Web Developer
    Graybar

    Hi Stephen,
    You can use the convert function in sql to change the format of the date time field.
    select convert(varchar(13),getdate(),101) gives u the current date in mm/dd/yyyy format.
    If you want that in java you can use the SimpleDateFormat class to change the format.
    import java.text.Format;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    Date currentDate = null;
    Format formatter = null;
    String date = "";
    currentDate = new Date();
    formatter = new SimpleDateFormat("MM/dd/yyyy");
    date = formatter.format(currentDate);
    This should give in the mm/dd/yyyy format.
    But both the results will be in String Format and not datetime.
    Hope this will be useful to you.
    Regards
    Prakash

  • Can we use the AdventureWorks2008R2 data for the real time project.

    Hi,
    In our project we are trying to do the data scrambling on First name, last name and middle name...
    In the regular practice we use to update the names as
    First Name = FN+<PERSON_SNO>
    Last Name = LN+<PERSON_SNO>
    Middle Name = MN+<PERSON_SNO>
    The Problem is the names are not looking realistic, so I thought of applying some logic and updating our PERSON table names based on Person.Person table in adventure works.
    My question is can we use the AdventureWorks2008R2 data for the real time project. Is there any cop right issue.
    Someone please help me solve this issue.
    Thanks
    Karthikeyan Jothi.

    Please read this link content:
    Adventure Works Sample Site
    sqldevelop.wordpress.com

  • SSIS: To run a SSIS package outside of SQL Server Data Tools you must install SCR - DP1 Connections of Integration Services or higher

    We have SSIS installed on a machine that is not part of a cluster but it is accessible by the cluster.
    Our job we have running on the cluster is failing with the following error:
    Error: 2014-01-31 09:14:37.52     Code: 0xC000F427     Source: SCR - DP1 Connections  
    Description: To run a SSIS package outside of SQL Server Data Tools you must install SCR - DP1 Connections of Integration Services or higher.  End Error
    Any advice or information on how to resolve this would be great.
    Many Thanks.

    Hi NessaBella,
    Integration Services service is not a cluster-aware service, and does not support failover from one cluster node to another. Therefore, in a clustered environment, Integration Services should be installed and started as a stand-alone service on each node
    in the cluster.
    Based on the error message, it seems that SSIS is not installed on the cluster node on which the job was running. Although SSIS is installed on a machine that is not part of the cluster and can be accessed by each cluster node, the SSIS service installed
    on a remote server cannot be used a cluster node. So, please install the shared feature SQL Server Integration Services on each cluster node. Besides, if certain packages need to run in 32-bit mode in certain jobs and the SQL Server installed is 64-bit version,
    you also need to install BIDS/SSDT on the cluster node to get the 32-bit runtime of SSIS.
    References:
    Integration Services (SSIS) in a Cluster
    Loading and Running a Remote Package Programmatically
    Regards,
    Mike Yin
    TechNet Community Support

  • Error "To run a SSIS package outside of SQL Server data tools you must install task name used in package of Integration service or highter.

    Hello Team,
    I am trying to execute a SSIS package from web page. When i try to do that i am getting following error.
    "To run a SSIS package outside of SQL Server data tools you must install <task name used in package> of Integration service or highter."
    In my machine Integration Services are installed and its service is also in running state.
    Please help me on this.
    Thanks,
    Ramesh
    Thanks, Ramesh Arige

    The SSIS package developed using SSIS 2008 Server R2 and Integrations Services 10.0 is exists in my machine. Is this wrong configuration, please help me on this.
    I am using the below code copied from CodeProject
    Thank you so much for responding.
    Ramesh
    Thanks, Ramesh Arige
    Which way are you using from the provided blog? Using 1) C# Code or 2) C# and Stored Procedure?
    Cheers,
    Vaibhav Chaudhari
    MCP, MCTS, MCSA (SQL Server 2012)

  • RMAN in active data guard with real time apply ON without a catalog DB

    I would like to know whether I can take RMAN backups (both level 0 & incremental) in active data guard with real time apply ON without a catalog database. version is 11.2.0.3.2. Will it make difference in the control file of standby syncing with primary? Can I use these backups on primary to restore and recover the database(including control file backup)?

    Thank you very much msberg. Could you please answer the below queries as well?
    Should I cancel Real Time Apply before starting RMAN?
    Will it make difference in the control file of standby syncing with primary? Is it possible to use these backups on primary to restore and recover the database(including control file backup)? If possible, how will I do that?

  • System Center 2012 R2 install: SQL server Data file and log file

    This might be a dumb question, but I can't find the answer anywhere.  
    I'm installing a new instance of  System Center 2012 R2 on a new server, I'm stuck on the SQL Server data file section.  Everytime I put in a path, it says that tne path does not exist.  I'm I supposed to be creating some sort of SQL Server
    data file and log file before this installation, I didn't get this prompt when installing System Center 2012 SP1 or hen I upgraded from System Center 2012 SP1 to System Center 2012 R2
    My SQL is on a different server
    Thank you in advanced

    Have you reviewed the setup.log?
    On a side note, why would you put the database file on the same drive as the OS? That defeats the whole purpose of having a remote SQL Server. Why use a remote SQL Server in the first place.
    Jason | http://blog.configmgrftw.com

  • Mapping between oracle data types and ms sql server data types

    hello
    i need mapping between oracle data types and ms sql server data types
    where can i find them ?

    read this
    http://download.oracle.com/docs/cd/E10405_01/doc/appdev.120/e10379/ss_oracle_compared.htm

  • How to convert MS SQL Server data to XML data using Java

    Hi all!
    How do I generate XML document for SQL Server data using java / jsp.
    Thanks in advance

    http://www.fdsapi.com

  • SQL Server Data Tools – Business Intelligence for Visual Studio 2013 (SSDT BI) and SSIS on SQL Server 2012

    This great blog entry titled
    SQL Server Data Tools - Business Intelligence for Visual Studio 2013 (SSDT BI), link below, highlights the lack of support for SSIS projects using SQL Server 2012, VS 2013 and SSDT BI for VS 2013. I see there is a new version
    on SSDT BI for VS 2013 (12.0.2430.0, File Name: SSDTBI_x86_ENU.exe, Date Published: 10/27/2014) link below.
    Does this version support SSIS projects using SQL Server 2012 using VS 2013 and SSDT BI for VS 2013?
    http://blogs.msdn.com/b/analysisservices/archive/2014/04/02/sql-server-data-tools-business-intelligence-for-visual-studio-2013-ssdt-bi.aspx
    http://www.microsoft.com/en-us/download/details.aspx?id=42313

    Hi cjrinpdx,
    According to the picture, it seems that we can use SSIS 2012 support is not included in SSDT-BI for VS 2013. And based on the previous versions, SSIS always different from SSRS, SSAS.
    SSDT-BI for Visual Studio 2012 supports versions of SQL Server as follows:
    SSAS project can target SQL 2012 or lower
    SSRS project can target SQL 2012 or lower
    SSIS project can target only SQL 2012
    The following blog is for your reference:
    http://blogs.technet.com/b/dataplatforminsider/archive/2013/11/13/microsoft-sql-server-data-tools-update.aspx
    Since I have no environment to test this at this moment,
    I recommend you that submit the feedback at
    https://connect.microsoft.com/SQLServer/. 
    Thank you for your understanding.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • The February 2015 release of SQL Server Data Tools is now available for download

    We'd like to announce the availability of the latest February 2015 release of SQL Server Data Tools.
    This update is now available for Visual Studio 2012 and 2013. For Visual Studio 2012, use the SQL > Check for Updates tool inside Visual Studio. For Visual Studio 2013, check the Visual Studio update channel (Tools > Extensions and Updates > Updates)
    for this update.  Alternatively, administrative installs are available via the link below.
    Get it here:
    http://msdn.microsoft.com/en-us/data/hh297027
    What’s New?
    Support for the latest Azure SQL Database V12 features
    Improved Cross-Platform Schema Comparison
    New advanced publish options
    Fixes for customer reported issues
    For more details, see the SQL Server Data Tools team blog:
    http://blogs.msdn.com/b/ssdt/archive/2015/03/03/sql-server-data-tools-and-data-tier-application-framework-update-for-february-2015.aspx

    While we are investigating this issue, you can revert to the November release with the links below.  You will need to uninstall your current SSDT.MSI and then run the installer from these ISOs.
    Visual Studio 2012 versions:
    SSDT_11.1.41025.0_BR.iso
    SSDT_11.1.41025.0_CN.iso
    SSDT_11.1.41025.0_DE.iso
    SSDT_11.1.41025.0_EN.iso
    SSDT_11.1.41025.0_ES.iso
    SSDT_11.1.41025.0_FR.iso
    SSDT_11.1.41025.0_IT.iso
    SSDT_11.1.41025.0_JA.iso
    SSDT_11.1.41025.0_KO.iso
    SSDT_11.1.41025.0_RU.iso
    SSDT_11.1.41025.0_TW.iso
    Visual Studio 2013 versions:
    SSDT_12.0.41025.0_BR.iso
    SSDT_12.0.41025.0_CN.iso
    SSDT_12.0.41025.0_DE.iso
    SSDT_12.0.41025.0_EN.iso
    SSDT_12.0.41025.0_ES.iso
    SSDT_12.0.41025.0_FR.iso
    SSDT_12.0.41025.0_IT.iso
    SSDT_12.0.41025.0_JA.iso
    SSDT_12.0.41025.0_KO.iso
    SSDT_12.0.41025.0_RU.iso
    SSDT_12.0.41025.0_TW.iso

  • Association rule in SQL Server Data Mining

    I have been working on a problem on association rules in SQL Server Data Tools (Visual Studio 2008) for quite a while but have not yet been able to figure out the solution.
    The problem is: I have a table named Sales_history in my SQL database. This table has following columns: CustomerID, ItemID, Month (from May2012 to April 2013), QtyShipped. I am looking to find association between Items and i want to provide recommendation
    to the Customer (In this case CustomerID) based on their purchases.
    Note: there are around 630 customers and about 34000 products in my table. 
    My approach:
    I marked History_Table as both Key and nested. And in the Key, i checked CustomerID as input and Key whereas in nested, i checked ItemId as Key, input and Predict. 
    When i run the model, i get a solution but i am not sure if i am configuring it right. Also i am not sure how i can write prediction join query to generate Item recommendations . I am really struggling with
    this problem, eagerly waiting for the reply. Thank you.

    Hi Tatyana,
    Thank you so much for your reply. I have now been able to create the data mining model using association rule and by writing a DMX query, i am able to generate the item recommendations to be given to customers for items they have purchased. However, i have
    noticed one thing that in the DMX query, it gives the same item recommendation for any item i put inside the query. 
    Also, if i put any item in the DMX query from the generated list of recommended items, the output of that query also shows the item that is inputted inside the query.
    Here is the query, that i am writing to generate item recommendations
    SELECT predictassociation (CrossSellingModelV3.[Ztb Customer Item v3],INCLUDE_STATISTICS,5)
    FROM CrossSellingModelV3
    NATURAL PREDICTION JOIN 
    (SELECT
    (SELECT '17IS56126' as m )
    AS Ms)
    AS t
    What can be the possible reason behind this? Is this something related to the kind of data i have? In my data, there are 632 distinct customers and 34000 distinct products. 
    If i execute this query in management studio.
    select customer_CD, COUNT(Item_CD) from ztb_Sales_History
    group by customer_CD
    order by 2 desc
    the output shows that  there are some customers who have bought just 1 item and also there are customers who have bought 2400 items. i mean the range is very high. 

  • Access SQL-Server Data from Oracle 10gXE

    Hello,
    I want to access sql-server data from oracle 10g XE. I need the same functionality provided by Sql-server by Linked Servers, by which we can query on any data source(oracle, Excel, Access).
    do, Oracle 10gXE provide us with same functionality ???
    any pointers ???

    Yes, it does work with Express Edition.
    Here is a thread from the XE forum with examples.
    Re: Database Link to MS Access
    They refer to a MS Access database, but the procedure is the same.
    Doug

Maybe you are looking for

  • 5th gen Ipod not showing in Itunes

    Just got a Imac and am trying to connect my 30 gig Ipod video, which I have been using with my sony VAIO. I have read several postings about converting the Ipod over to a mac format. However, the problem I am having is that my Ipod shows up in the fi

  • PageMaker InDesign CS4 in Mac OS X?

    A client has asked me to convert a PageMaker 6.5 document to PDF that I last worked on in 1999! That document was split into 5 files. I have been able to successfully open 4 of the 5 files in InDesign CS4. However, InDesign crashes each time I try to

  • Windows installer malfunctio​n

    Hi......I have a Toshiba Satellite P505-A8980.  When I try to download a program from the internet, I get an error window as shown in the attachment. I found that if I create a new user, the download downloads just fine. I really do not want to start

  • Computer refuses to shut down/log off

    I have a MacBook running the latest version of OS X and it's exhibiting some very peculiar behavior. As the title suggests, it refuses to shut off or allow users to log off, furthermore, some applications don't open or work properly. I ran a verify d

  • Delete query not working ?

    hi all, this delete query is not working for me. Could you please help me and tell me ho to resolve this ? The error i get when executing this query is "ORA-00903: invalid table name". The table name is correct I fail to understand why does it show i