SQL queries from a Citadel database

We are retrieving data with third-party package SQL queries from a Citadel database. Certain queries for some object members will not return data, but the SQL search application software returns an "error". An analysis of the error from the SQL end does not find problem on SQL side. I suspect corruption of Citadel database. The link to database is good, as most tags do return a value as expected. 
This problem occurred at the time of re-location of the database to a replacement computer.  Any ideas on how to fix such a problem?

Can you give an example of the "bad" SQL statement and a good one?
Ryan Shi
National Instruments

Similar Messages

  • Extracting SQL Queries from Crystal Reports

    I am trying to find a way or a utility to be able extract SQL queries from Crystal reports into a text file for documentation purposes.  These queries are not in the repository, they were entered into each of the reports when the reports were being built and I can't find a way to extract them.  Any ideas/suggestions?

    Hello,
    CR doesn't have the ability, and I don't recall if this has ever been asked previously. Great suggestion for the Idea Place tab in the up right corner of this page.
    If you find a developer it's quite simple to get:
                // log onto the server and then get the SQL.
                rptClientDoc.DatabaseController.LogonEx("van-w-13-dwilli", "xtreme", "sa", "pw");
                GroupPath gp = new GroupPath();
                string tmp = String.Empty;
                rptClientDoc.RowsetController.GetSQLStatement(gp, out tmp);
                // show the SQL but easy enough to save the SQL text to a file.
                MessageBox.Show(tmp, "Data Source Set and SQL Statement", MessageBoxButtons.OK, MessageBoxIcon.Information);
    Of course you need to open the report first, lots of samples on how to...
    Thank you
    Don

  • How to find SQL queries from listerner log

    Hi,
    I have a question related to Oracle listener log. I've tried searching on this forum but couldn't find any threads on this
    Let me give a background on this. There are plenty of MSaccess databases which connect to Oracle database via ODBC link. I need to find out all the data items (Oracle tables / columns) that are referenced in the MS access applications. One way of doing that is open all MS access code components and look out for the ODBC links and extract the data items. This will be time consuming as there are several MS access databases (~450).
    I am wondering is there is way to find the data items from Oracle logs. The only information available to me now is the listener logs. A sample record id given below. Is there any way to obtain the SQL queries that was used from the lister log.
    08-MAR-2007 15:31:30 * (CONNECT_DATA=(SID=opr11a)(CID=(PROGRAM=MSACCESS.EXE)(HOST=PC12111)(USER=andrew.King))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.111.200.2)(PORT=1921)) * establish * opr11a * 0
    Any help in this regard is much appreciated
    Database version - Oracle 8i
    Thanks
    Moorthy
    Edited by: user8879184 on 20-Jul-2010 04:58

    user8879184 wrote:
    I need to find out all the data items (Oracle tables / columns) that are referenced in the MS access applications. I do not understand what you need. You want names of _"Oracle" tables/columns_ which refers MS Access *"Application"* ??

  • Want to execute SQL Queries from Textfile

    I have a text file full of a bunch of sql queries, of the format:
    select something1, something2
    from someplace
    select something3, something4
    from someplace2
    select something5, something6
    from someplace3
    I want to execute these queries one at a time and then after each one executes, I will do something with the resultset. Question is, how do I pull each query from the text file one at a time and execute? I was doing this by using java.util.Scanner and java.lang.StringBuilder where I would scan one line at a time and then check to see if the line is empty, otherwise I append the line to the StringBuilder. If the line is empty, I process whatever is stored in the StringBuilder. The problem with doing this is that it does not preserve the newline from the text file, so I get queries that look like:
    "select something5, something6from someplace3"
    which of course are invalid. Does anyone know a better way to build SQL queries / statements from a text file? How do I get the newline or carriage return character?

    Just replace newline by space?

  • SQL Queries from Java to Access

    Does anyone know why it is that when i send a SQL query from a Java class to Access using the equals ( = ) function, it works fine, but when i send a query using the LIKE function, it does not work?
    If i manually copy and paste the LIKE query from Java into an Access query, the query works fine yet when i send it from the Java class, it does not work.
    An ideas would be most welcome

    Access uses a different token for the %-sign (a * I believe). When you want to do a 'like-query' through JDBC, you have to use the %-sign:
    LIKE '%text_to_search%'

  • JTable: RFC on good practice (SQL queries from cell editor)

    I usually add/remove/edit JTable data from an external panel. But in this scenario, my client would like to be able to click on the first column of an empty row and enter a product number. Within the cell editor, I must make an SQL query to the database in order to determine if the product number is valid and if so, use part of the SQL data to populate other cells of the current row (like product description).
    My problem is that this just doesn't seem right! Isn't the cell editor executed on the only Swing thread? Also, if the product number is not valid, I correctly implement the stopCellEditing() method but for some reason, you can still navigate the table (click on any other cell or press the TAB key, etc)... weird!!
    Does anyone have a good practice on how to perform the SQL query in a better place and force a cell to be selected until you enter a valid number or press the CANCEL key?
    I was looking at implementing the TableModelListener's tableChanged(...) method but I'm not sure if that would be a better place either.
    I personally would edit outside of the table, but good practice seems hard when the requirement is to edit from a cell editor!!
    Any suggestion would be greatly appreciated!
    Thanks!

    maybe you could write an input verifier for the column that does the query and rejects invalid entries.
    maybe you could send the query off in a worker thread.
    as far as making the table so you can't select any cells, hmm. not sure.
    you could disable
    .setEnabled(false);the table until the query comes back, something like that.

  • How to embed PL/SQL queries in HTML in Database App Development VM?

    I'm reading "Learning Oracle PL/SQL" and this book tells me that if I can install apache httpd and modplsql I can embed queries in HTML.
    How do I do this in Database App Development VM?
    Do I already have apache httpd installed? Is it already started?
    If not, how do I start it?
    What am I getting when I point my firefox browser to http://localhost:1158/em? I'm getting a nice web page that is prompting for username and password. What username and password do I use? oracle/oracle did not work!
    What does this web site do? Administer the database server?
    I already tried to use "yum install emacs" as I mentioned in Re: How to Install emacs, openssh and start oracle database and get a connect? and it appears that the repository for "yum" is not correct.
    "yum install httpd" does not work either.
    When I tried "sudo yum install httpd" it says
    "Sorry, user oracle is not allowed to execute '/usr/bin/yum install httpd' as root on localhost.localdomain."
    I get the same message for "sudo yum isntall emacs".
    Thanks
    Siegfried

    user8816970 wrote:
    I'm reading "Learning Oracle PL/SQL" and this book tells me that if I can install apache httpd and modplsql I can embed queries in HTML.
    How do I do this in Database App Development VM?
    Do I already have apache httpd installed? Is it already started?
    If not, how do I start it?
    What am I getting when I point my firefox browser to http://localhost:1158/em? I'm getting a nice web page that is prompting for username and password. What username and password do I use? oracle/oracle did not work!
    What does this web site do? Administer the database server?
    I already tried to use "yum install emacs" as I mentioned in Re: How to Install emacs, openssh and start oracle database and get a connect? and it appears that the repository for "yum" is not correct.
    "yum install httpd" does not work either.
    When I tried "sudo yum install httpd" it says
    "Sorry, user oracle is not allowed to execute '/usr/bin/yum install httpd' as root on localhost.localdomain."
    I get the same message for "sudo yum isntall emacs".
    Thanks
    Siegfriedhttp://www.oracle.com/pls/db112/search?remark=quick_search&word=psp

  • Queries from Client regarding Database design

    1. Is it advisable to use IDENTITY [(seed, increment)] to generate the sequence number in a table for concurrent user in Microsoft SQL Server 2012?
    2. Is it advisable to use SCOPE_IDENTITY () to get the latest identity number during concurrent user in Microsoft SQL Server 2012? 
    3. Kindly help us select the best solution from the following for creating reference  in Microsoft SQL Server 2012
    Primary key integer data type with IDENTITY [ (seed , increment) ]  to generate a sequence of number
    Code/ Composite primary key varchar data type
    4. Kindly help us to select best solution from the following  to store hierarchy data
    Single table with ID and parent ID as a column
    Multiple table for each entity and a mapping table

    >2. Is it advisable to use SCOPE_IDENTITY () to get the latest identity number during concurrent user in Microsoft SQL Server 2012? 
    Here is an alternate solution:
    http://www.sqlusa.com/bestpractices2005/outputidentitycapture/
    Can you post the DDL for the tables?  Thanks.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Tracing SQL Queries from an Application.

    I read the info on here.
    http://www.psoug.org/reference/traceanalyzer.html_
    I have been able to use this guide to analyze traces.
    I installed DBMS_SUPPORT package on my XE database. I need to know, how can I run a trace from my front-end application and get it analyzed, using trace analyzer.
    I have got trace files, by using DBMS_SUpport. I have been successful in running tkprof on them.
    I need to trap the values of the bind variables that are being sent by the front-end application.
    Any suggestions would be welcome.
    Thanks.

    End to End Application Tracing can identify the source of an excessive workload, such as a high load SQL statement, by client identifier, service, module, action, session, instance, or an entire database. This isolates the problem to a specific user, service, session, or application component.
    Oracle provides the trcsess command-line utility that consolidates tracing information based on specific criteria.
    The SQL Trace facility and TKPROF are two basic performance diagnostic tools that can help you monitor applications running against the Oracle Server.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/sqltrace.htm#i19083

  • Sql queries from internal tables based on context node

    Hi experts,
    I want to select from my inetrnal table which is based on the context node, the rows which do not appear in another internal table based on the context node.
    I have this data:
    data lt_item_level type table of wd_this->element_item_level INITIAL SIZE 0.
    data lt_item_level_cp type table of wd_this->element_item_level INITIAL SIZE 0.
    data lt_po_items TYPE table of wd_this->element_po_items INITIAL SIZE 0.
    I want to do this:
    select * into CORRESPONDING FIELDS OF TABLE lt_item_level_cp from lt_item_level WHERE lt_po_items-po_number NE lt_item_level-item_number.
    But i get an error:
    "LT_ITEM_LEVEL" is not defined in the ABAP Dictionary as a table,
    Is there a way to do it with select or should i loop over my internal tables?
    thank u very much!!

    hi,
    You cannot use Select queries on internal table.  do like this :
    loop at itab into wa where wa-F1 NE wa-F2.
    append wa to itab1.
    endloop.
    Here itab1 will have all the records as per your requiement.
    I hope it is clear.
    Edited by: Saurav Mago on Oct 26, 2009 5:37 PM

  • Cant extract historical data from Citadel database

    When using the simplest VI's to extract historical data from the Citadel database, I get error messages :
    using "Get Historical Tag List.vi"
    CIT_OpenDatabase.vi
    error code - 0x8abc0010
    Using "Read Historical Trends.vi"
    CIT_ReadTrace.vi
    error code - 0x8abc0010
    I am using dsc version 6.0, and have already tried to upgrade to ver. 6.0.2. This did not go well, and I had to return to ver. 6.0 (reinstalling NT and everything else) to make my system run again.

    Download and install the latest release of Logos from ftp://ftp.ni.com/lookout/logos. Logos is the backbone drivers for the Citadel database. The most recent releases of Logos addresses issues that are similar to this.

  • Citadel database missing trace

    Once again we have a problem.
    Client is running 6.1 (Build 27).  Missing data from a few objects for 2 and a half months!  Suddenly reappears. No machine down tme, no errors, just gone.  Tried to rebuild database, no luck.
    This is becoming a problem, as much as it would pain me to move to a new software platform we may have to at this point.  Constant database corruptions cannot happen when the clients need these reports for internal and other health type agencies.  
    Citadel is a platform that simply is not reliable.  6.2 show the same errors as well.
    Example problem.  Tanks record current, high and low values that are trended.  The low and high disappear but current stays.  And all of the points for the pump (control, monitor and status) are gone ont he same dates.  Then suddenly reappear later with no system restarts at all.
    EDIT: We know the system was working, we log onto spreadsheets as well, the data is correct in there. But the report system is automated in lookout, not an excel type program.
    Thanks, again,
    Mike
    Message Edited by Mike@DTSI on 06-19-2009 01:27 PM
    Mike Crabtree - Lead Developer
    Destek of Nevada, Inc. / Digital Telemetry Systems, Inc.
    (866) 964-6948 / (760) 247-9512

    Got some screenshots
    1 - This is one week view from today (07/02-07/08).  The green line (the logical connection for the Control Bit (\\.\ServerWell4\BC)) shows data as being in the database for the hypertrend.(The gold and dark red lines are other wells, which have the same issues.)
    2. This is the SQL pull using the datatable object.  Pulls from the Citadel database.  Looking at the days 07/01-07/08 it shows 0 for everything, but as you see in the last pic, hypertrend sees the data.  The SQL string:
    SELECT MATH_ETM(TO_DISCRETE("TCWDSCADA/Server/Well4/BC")), MATH_starts(TO_DISCRETE("TCWDSCADA/Server/Well4/BC")), MATH_stops(TO_DISCRETE("TCWDSCADA/Server/Well4/BC")), MATH_ETM(TO_DISCRETE("TCWDSCADA/Server/Well4/BM")), MATH_starts(TO_DISCRETE("TCWDSCADA/Server/Well4/BM")), MATH_stops(TO_DISCRETE("TCWDSCADA/Server/Well4/BM")), MATH_etm(TO_DISCRETE("TCWDSCADA/Server/Well4/BS")), MATH_starts(TO_DISCRETE("TCWDSCADA/Server/Well4/BS")), MATH_stops(TO_DISCRETE("TCWDSCADA/Server/Well4/BS")) FROM IntData WHERE LocalTime BETWEEN '2009-7-2' AND '2009-8-2' and IntInterval ='1'
    BC=Control, BM=Monitor, BS=Status.  The reason we pull the LocalTime from 2 days into month and after the month is because the citadel database returns values from the days previous.  Its wierd stuff.
    July shows all 0.  April has 2 days (04/01-04/02) 
    Well 4 in this example runs everyday.  weekends, weekdays, everyday.
    DBFolderT and SysfolderT have no remote connections except for the remote property is linked to a datatable field.  the datatable is only loaded on system start, or manually which doesnt happen for this system. 
    Thanks again
    Mike
    Mike Crabtree - Lead Developer
    Destek of Nevada, Inc. / Digital Telemetry Systems, Inc.
    (866) 964-6948 / (760) 247-9512

  • Invokin SQL*Loader from a stored procedure

    I try to invoke SQL*LOADER from within a database package by using external C procedure (the procedure calls the system() C function) but the loader generates the following error in its log file :
    SQL*Loader -523: error -2 writing to file (STDERR)
    and no data is uploaded.
    I have tried to use system() from within database procedures to execute OS commands and it works. Does anyone know what is the problem with using system() to execute "sqlldr <parameters>"? Is there some other way to call the loader from within a stored PL/SQL procedure?
    Thank you very much for your help.
    Aneta Valova
    null

    Hi
    What is your task and why you are trying to invoke SQL*Loader from strorage procedure or package? Maybe the redirecting of stderr will resolve your problem but thik is it the best way to do your job.
    I am not sure, that invoking other executables from Oracle instance is good idea.
    Regards
    null

  • Connect to MS-SQL Server from a Oracle 10g running under Solaris

    Hi,
    I have the following problem. I want to access a MS-SQL server from an Oracle database (10g Enterprise licence) that is running on Solaris.
    After googling a while, the following questions arise:
    - Is it correct that the Oracle Transparant Gateway for the SQL Server is not available on Solaris platforms (but only on Windows)?
    - Is it right, that the second possibility to solve this problem is to use an SQL-Server odbc driver for Solaris and access the SQL-Server over ODBC? And: Is this feature included in the Enterprise licence?
    - If yes, which driver is good and cheap ;-)?
    - Is there any other way to solve this problem?
    Thanks
    Aron
    Message was edited by:
    user583720

    I believe the Transparenet Gateway for SQL Server is available on Solaris. The problem is that you need a Unix based ODBC driver which you will also need to pay for.
    We had this same problem and decided to run a windows based Heterogeneous Services gateway and routed through it instead of using the SQL Server transparent gateway. The Heterogenous severives gateway is NOT an add on product (as is Transparent Gateway). The drawback would be performance as I would expect the native MS SQL transparent gateway to perform better, but in our case it worked acceptably.

  • Retrieving SQL queries used in BO reports using BO Java SDKs

    Hi,
    Is it possible to retrieve SQL queries generated by Canned Reports? I have 200+ reports saved in my local system and i need to retrieve SQL queries from them, this is required for documentation purpose. Please let me know if it is possible thru BO java SDKs.

    This is the code I am using to retrieve the SQL values.
    IEnterpriseSession boEnterpriseSession = null;
                  boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( boUser, boPassword, boCmsName, boAuthType);
                   // Get the Report Application Factory service from Crystal Enterprise
                   IReportAppFactory rptAppFactory = (IReportAppFactory)boEnterpriseSession.getService("", "RASReportService");
                   // Get the InfoStore service from Crystal Enterprise
                   IInfoStore boInfoStore = (IInfoStore)boEnterpriseSession.getService("", "InfoStore");
                   // Retrieve the report by name from Crystal Enterprise
                   IInfoObjects boInfoObjects = boInfoStore.query("Select SI_ID From CI_INFOOBJECTS Where SI_NAME = '" + reportName + "'");
                   // Open the report into a Report Document object
                   ReportClientDocument rcd = rptAppFactory.openDocument((IInfoObject)boInfoObjects.get(0), 0, Locale.ENGLISH);
                   System.out.println("SQL query \n \n");
                   System.out.println(rcd.getRowsetController().getSQLStatement(null, ""));
    I am a newbie and I dont understand where the error lies.. Please help me out.
    regards,
    nitin
    When run the code gives  the following errors
    com.crystaldecisions.sdk.occa.managedreports.ras.internal.ManagedRASException: Cannot open report document. --- 0x80004005
    Unspecified error
    cause:com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: 0x80004005
    Unspecified error---- Error code:-2147467259 Error code name:failed
    detail: 0x80004005
    Unspecified error
         at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ras.internal.RASReportAppFactory.openDocument(Unknown Source)
         at com.hcl.BO.retrieveSql.RetrieveSQL.main(RetrieveSQL.java:44)
    Caused by: com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException: 0x80004005
    Unspecified error---- Error code:-2147467259 Error code name:failed
         at com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwReportSDKServerException(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.s.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.if(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(Unknown Source)
         ... 4 more
    I am a newbie and

Maybe you are looking for

  • Installed iOS6 and wifi no longer connects

    I have an iphone 4S and I installed iOS6 and i have now fond I can no longer connect to wifi networks. My first attempt to fix was to use reset network settings but this has not helped at all. Is ther a bug or a does someone know of a fix?

  • Rounding error between FI and CO-PA

    Dear All, We are currently in the process of migrating our NZ business on to our SAP application of ECC6. In CO-PA the Operating Concern Currency is set to AUD and in addition Company Code Currency has also been activated. When a billing document is

  • Tiger & Maximum Hard Drive Size?

    Hello, I have an older Mac tower - 733/2gb ram with an eSATA mod. Is there any limitation on the size or kind of hard drive I can install internally? Until now I've used up to 250gb, I'd like to install something greater than 500gb. Thanks for the he

  • How do I open a video download I purchased from The Teaching Company in iTunes?

    How do I open a download video from The Teaching Company in iTunes?

  • Get today's date?

    I have an XML dataset that shows a schedule of events.  My page uses a yui calendar widget to get the events for specific selected days.  On load, the page shows all "events" that are listed in the XML file.  I am trying to set up a filter that will