SQL and database file

Hello.(sorry for my english)
I have a legacy system , ported to opencobol that uses Berkeley DB. I can successfully open the database files using java both in windows and linux. However i want to create a web front end for the application.
Data is stored using strange cobol structures (most numbers are stored as text or 4 bits per digit) and other fancy stuff.. so custom parsers should be written. (dont rember BDB classes name for that)
I have been reading the documentation of Berkeley DB 12 hours totaly today but couldnt find answers to some questions...
Is it possible to attach the database to dbsql.exe (sqlite) server ?? I tried to do "attach "..pathtofile" as NULL ,but i get multiple databases specified and not supported and other stupid messages....
I think that what i tried propably doesnt make sense as collumns arent specified and nothing is in order this thing to work ..It is a simple Key value database.
So i am a little stucked here.
The only solution i can think is to synchronize with a relational Database. But i dont have triggers or nothing that helps....
Note that i want one way synchronization. The "other way" will have very limited tasks.
It seems to me that checking every x minutes if something changed using a cursor is a demanding task. So i am wondering.. Is there a way to track changes???
Thank you :)
Edited by: 843912 on 12 Μαρ 2011 7:13 μμ

Hello,
I am not sure I completely understand your question. If you are asking about importing
and exporting data from a Berkeley DB database into an Oracle DB Table in Berkeley DB
releases prior to 5.*, then this can be done with the Oracle OCI interface. If I am
misunderstanding the question, please let me know.
Thanks,
Sandra

Similar Messages

  • Flash and database files

    Solaris 8 10/02
    Archive a netra 20 running Solaris 8 10/02 - The archive create work great. However,
    when I tried to install it on another system (boot - install tape) with the same hardware configuration. The sparse Sysbase database files are expanded and no longer file on the partition that was created.
    Any ideas?
    thanks

    Thanks again Barney...
    I make a new version of this app every 3 months and I have just created one this week (after updates) and it works fine once burnt onto a CD.
    This is what makes me think that the OS is now looking at the older .dat files differently after the updates. Could it be a security issue that they may have been trying to resolve??
    It is also PC compatible and all the old CD-ROMs still work fine on PC's.
    Thanks again for your help.

  • ONS defaults text and database files

    Hi,
    im trying to understand the difference between the ONS 15454 defaults which can be loaded and saved as a text file (Node > Provisioning > Defaults), versus the database backup and restore option (Node > Maintenance > Database), which can also be used to restore the defaults via the defaults.db that comes with the ONS 15454 CD.
    Are both required txt and db file required to restore defaults ?
    Do they contain the same info ?
    thanks
    Mark

    Hi,
    1. Default DB on the CD is to restore back to factory settings. As if you just received the Chassis from Cisco.
    2. Database backup is your current Node information data backup. This will restore your provisioning(circuits) and Node information back to the node. This can also be used to get a new chassis to be identical to another chassis.
    regards
    Moses

  • SQL and Spool File: low performance  (Oracle 8)

    Hi,
    I've got some difficulties with the spool function: it works very slowly when I have to write on a file.
    In details, a shell script starts the PL/SQL procedure, which starts the spool function that produces a file.dat .
    Oracle solves the query and sends out the data immediately. This with 850 million of records for a 20gb final file. The total time to write this file is 8 hours.
    May it be a solutions with could to improve this file writing procedure, trying not to use the spool function, like a C program which could work on the memory? In this way it could take fewer time.
    Thank you for your suggestions and solutions.
    A

    Oracle RDBMS does not write to the spool file. The client does (SQL*Plus in this case).
    SQL*Plus uses standard kernel calls.
    To open/create the file and write data to it:
    - open call with flags O_WRONLY|O_CREAT|O_TRUNC (see open (C System Call) - Code Wiki)
    - write call to file descriptor (see write (C System Call) - Code Wiki)
    These are standard calls supported by all modern kernels (Unix, Linux, Windows, OS/X, etc). The performance of which is entirely dependant on how fast the kernel can service the call. Which in turn is dependant on the speed of the file system on which these calls operate.
    Speeding up a spool type process typically means using async I/O (called overlap I/O in the Windows kernel). The approach being to fetch the next set of data from the database cursor, while writing the previous fetch's data to spool file, at the same time.
    Of course, better and faster hardware can also improve the performance of the I/O subsystem and make such a spool process faster.

  • SQL and Excel File

    HII,
    I am trying to develop an SQL query that will produce an Excel File that can be posted on a WEB site for x amount of transaction.
    I would like to know which ways are there in which I can do this tast.
    If anyone has a suggestion that would be greatly appreciated.
    Thanks
    Pankti

    Hii Justin,
    I was just reading up on UTL_File package althought I am still unable to conclude as to how am I to go about using this method. I hope you don't mind I am a bit new to this enviorment so I have lots of question. Let me explain in detail: I have columns x, y, and z in a perticular table. I want to develop an SQL query which will give data in Excel file.
    How do I use the UTL_File method to acchive this task??

  • How to create a .mdf SQL Server database from a Data-Tier Application file that has data?

    This is a noob question, though I do use SQL Server databases all the time with Entity Framework when I code in C# using Visual Studio 2013.  The development environment is found below at [A].  I am trying to make a clone of a SQL Server 2008 R2
    database (.mdf)  that exists online.  I can read, connect and work with this database in Visual Studio 2013, but I wish to make a local copy of the database, as an .MDF file.  Somewhere in my notes I have a way of creating a local copy from
    an online database when using Visual Studio but I forgot how (it seems, reviewing my notes, that it deals with ADO.NET which is deprecated in Visual Studio 2013 these days, or so it seems).  So I'm looking for another way.  What I did was create
    (or export) a "Data-Tier Application File" from the online SQL Server database, with data, and it seems to have worked in that this Data-Tier Application file exists on my hard drive and seems to have data in it ("SQL Server Replication Snapshot"
    is the format it seems).  It contains skeleton code to create a database, but when I tried to execute it with SQL Server 2014 Management Studio, I got a bunch of errors.
    So my question is:
    1) Can I somehow create a .MDF SQL Server Database from an Data-Tier Application file that has data?  What tool do I use?  I saw this link, http://social.technet.microsoft.com/wiki/contents/articles/2639.how-to-use-data-tier-application-import-and-export-with-a-windows-azure-sql-database.aspx 
    and it relates to Azure, but is there a tool for C#Visual Studio 2013, standalone?
    2) If there's an easy way to create a .mdf SQL Server Database file from an online file, within SQL Server Management Studio?  I don't think so, since it would require Administrator permissions on the online server, which I don't have. I have permission
    to read, update, delete the online database file, but strangely not to download it (the service I use has a tool for backup, but not for download).
    3) same question as 2), but for Visual Studio 2013?  I don't think so, since I notice none of the templates even mentions ADO.NET anymore, but instead they go with Entity Framework.  Using EF I can of course do anything I want with the online database
    (CRUD), but it remains online.  Maybe there's a switch to make a local copy?  I guess I could write a short program to suck all the data out of the online database and put it into a new, duplicate database having the same tables, that I create on
    my localhost, but my question here is if there's an easier way than this, maybe a tool or command I can run from inside Visual Studio?
    Any advice on any of the above questions is appreciated.
    Thank you,
    Paul
    [A] Microsoft Visual Studio Professional 2013
    Version 12.0.21005.1 REL
    Microsoft .NET Framework
    Version 4.5.51641
    Microsoft Web Developer Tools 2013   2.0.40926.0
    SQL Server Data Tools   12.0.30919.1
    Microsoft SQL Server Data Tools
    Windows Azure Mobile Services Tools   1.0
    Windows Azure Mobile Services Tools

    Thanks but these links are too general to help.
    "2. what do you mean by online file?" - I mean the SQL Server database file is on a remote web server that I rent from, but I am not the administrator of.  I can access my database using SQL Server Authentication, but nothing more.
    Paul
    What do you mean by too general? It explains on how you can use data tier application to create and deploy databases
    May be this will help you to understand better
    http://www.databasejournal.com/features/mssql/article.php/3911041/Creating-Data-Tier-Applications--in-SQL-Server-2008-R2.htm
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Catproc.sql and catalog.sql files

    I am using oracle 10g recently i have runned two files catproc.sql and catalog files by connecting to sys
    after running those files in sys when i select
    select * from tab;
    no rows were returned
    1) these files will show any eeect on data base
    2)From toad when i connect to data base in toad it is showing all the tables in sys user
    is there any effect of running those files

    933900 wrote:
    I am using oracle 10g recently i have runned two files catproc.sql and catalog files by connecting to sys
    after running those files in sys when i select
    select * from tab;
    no rows were returned
    1) these files will show any eeect on data base
    2)From toad when i connect to data base in toad it is showing all the tables in sys user
    is there any effect of running those filesHave you created database newly? so you ran catalog.sql & catproc.sql?
    Of course you can able to see from TOAD but not from SQL, its weird.
    Can you post
    SQL> select * from dba_registry;
    Also any errors from alert log file, when you ran These scripts? if so post here.

  • Can I recover a damaged SQL Server 2008 database with the undamaged .mdb and .ldf files?

    Their original SQL Server was 2008, with SP unknown, but installed on D: and C: drives.  The power spike corrupted their O/S on the C:
    drive and someone reinstalled both the O/S and the SQL Server, which is now SQL 2008, SP4.  They have intact files for all system databases, both .mdb and .ldf.  Is there some way they can reconnect with the user databases using the intact copies
    of the previous system databases? I have heard that if the SQL Server is stopped, previous Master and Msdb .mdb and .ldf files moved into place and the server restarted, that any previous user database .mdb and .ldf files can be accessed by the SQL server.
    Is this the case, or are there details missing?

    Hello! try this steps
     1 Open your SQL Server Management Studio console. This application shortcut is available in the SQL Server directory in the Windows Start button.
    2  Enter the system administrator user name and password. SQL Server's administrator user name is "sa." This account is required for privileges to restore the database. If your restoring on a host provider server, use the administrator user name
    and password they supplied for your account.
     3 Right-click your database name and select "Attach." In the new window that opens, click the "Add" button to open a dialog box.
     4 Select your MDF file and press the "Ok" button. It may take several minutes to restore the database if it is a large file. Once the process is finished, browse your tables to verify the data. The database is now restored.
    If nothing helped try to use: 
    https://www.youtube.com/watch?v=1cbOYdvBW2c

  • How can I create an csv/excel file using pl/sql and then sending that file

    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.

    968776 wrote:
    How can I create an csv/excel file using pl/sql and then sending that file to a clients site using pl/sql?
    I know how to create the csv/excel file but I can't figure out how I would get it to the clients site.You are trying to do it at a wrong place..
    Whay do you want database (pl/sql) code to do these things?
    Anyhow, you may be interested in :
    {message:id=9360007}
    {message:id=9984244}

  • Try to do my first XML Schema in SQL Server 2012 Mangement Studio(SSMS2012)-How to execute the xsd and xml files in SSMS2012?

    Hi all,
    I learmed the basic stuff of XML, DTD, DOM, etc. long time ago. Now, I came back to resume my XML journey and try to learn the XML Schemas, XPath and XQuery. I have Microsoft SQL Server 2012 Management Studio (SSMS2012) in our computer network. From
    Page 221 of the old Book "Beginning XML 2nd Edition" written by David Hunter, et.al., (published by Wrox), I copied the name5.xsd and name5.xml :
    <?xml version="1.0"?>
    <schema xmlns=http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.wrox.com/name" xmlns:target="http://www.wrox.com/name"
    elementFormDefault="qualified">
    <element name="name">
    <complexType>
    <sequence>
    <element name="first" type="string"/>
    <element name="middle" type="string"/>
    <element name="last" type="string"/>
    </sequence>
    </complexType>
    </element>
    </schema>
    <?xml version="1.0"?>
    <name
    xmlns=http://www.wrox.com/name"
    xmlns:xsi="http://www.wrox.org/2001XMLSchema-instance"
    xsi:schemaLocation="http://www.wrox.com/name name5.xsd"
    title="Mr.">
    <first>John</first>
    <middle>Frizgerald</middle>
    <last>Doe</last>
    </name>
    How can I execute these two files in my SSMS2012 for doing my first XML Schema trial?
    Please kindly help, advise and respond.
    Thanks in advance,
    Scott Chang

    Hi Eric Zhang, Thanks for your nice response.
    1) I saw the CREATE XML SCHEMA COLLECTION (Transact-SQL) and tried  its first example "Create XML schema collection in the database" in my SQL Server 2012 Management Studio (SSMS2012):
    -- Create a sample database in which to load the XML schema collection.
    -- Copied this set of code stsments from Microsoft Library (ms176009)
    -- ColesMS12_20a.sql (saved in C:/Documents/SQL Server Management Studio)
    -- 19 March 2015 1145 AM
    CREATE DATABASE SampleDB
    GO
    USE SampleDB
    GO
    CREATE XML SCHEMA COLLECTION ManuInstructionsSchemaCollection AS
    N'<?xml version="1.0" encoding="UTF-16"?>
    <xsd:schema targetNamespace="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
    xmlns ="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
    <xsd:complexType name="StepType" mixed="true" >
    <xsd:choice minOccurs="0" maxOccurs="unbounded" >
    <xsd:element name="tool" type="xsd:string" />
    <xsd:element name="material" type="xsd:string" />
    <xsd:element name="blueprint" type="xsd:string" />
    <xsd:element name="specs" type="xsd:string" />
    <xsd:element name="diag" type="xsd:string" />
    </xsd:choice>
    </xsd:complexType>
    <xsd:element name="root">
    <xsd:complexType mixed="true">
    <xsd:sequence>
    <xsd:element name="Location" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType mixed="true">
    <xsd:sequence>
    <xsd:element name="step" type="StepType" minOccurs="1" maxOccurs="unbounded" />
    </xsd:sequence>
    <xsd:attribute name="LocationID" type="xsd:integer" use="required"/>
    <xsd:attribute name="SetupHours" type="xsd:decimal" use="optional"/>
    <xsd:attribute name="MachineHours" type="xsd:decimal" use="optional"/>
    <xsd:attribute name="LaborHours" type="xsd:decimal" use="optional"/>
    <xsd:attribute name="LotSize" type="xsd:decimal" use="optional"/>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>' ;
    GO
    -- Verify - list of collections in the database.
    select *
    from sys.xml_schema_collections
    -- Verify - list of namespaces in the database.
    select name
    from sys.xml_schema_namespaces
    -- Use it. Create a typed xml variable. Note collection name specified.
    DECLARE @x xml (ManuInstructionsSchemaCollection)
    GO
    --Or create a typed xml column.
    CREATE TABLE T (
    i int primary key,
    x xml (ManuInstructionsSchemaCollection))
    GO
    -- ////The following code statements are not used in order to create SampleDB
    -- Clean up
    ---DROP TABLE T
    ---GO
    ---DROP XML SCHEMA COLLECTION ManuInstructionsSchemaCollection
    ---Go
    ---USE Master
    ---GO
    ---DROP DATABASE SampleDB
    It worked and I got the following results:
    1 4 NULL sys 2009-04-13 12:59:13.390 2012-02-10 20:16:02.097
    65536 1 NULL ManuInstructionsSchemaCollection 2015-03-19 11:47:17.660 2015-03-19 11:47:17.660
    http://www.w3.org/2001/XMLSchema
    http://schemas.microsoft.com/sqlserver/2004/sqltypes
    http://www.w3.org/XML/1998/namespace
    http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions
    But, I don't undertand (i) what SCHEMA COECTION is, (ii) what <xsd:schema targetNamespace=.....</xsd:complexType> are, (iii) How I can specify my "project specific" schema in the Microsoft SCHEMA COLLECTION to check my xml file.
    2) I dived in the XQuery programmimng in SSMS2012 in the last few weeks. I used the examles of Ad-Hoc XML File Query by Seth Delconte (in
    httpS://www.simple-talk.com/content/print.aspx?article=1756) in my SSMS2012. They worked. But I don't understand the (i) Importing XML data using a function, (ii) Using the XQuery contans()
    function to find substrings, (iii)Efficiency comparisons in the article.
    Please kindly help me in enlightening me to resolve the difficulties listed in 1) and 2).
    Thanks,
    Scott Chang

  • Steps to move Data and Log file for clustered SQL Server

    Hi guys 
    we have Active'passive SQL 2008R2 cluster environment.
    looking for steps to move Data and log files from user Database  and System Database for  SQL Server Clustered Instance. 
    Currently Data and log  files resides on same drive for user and system Databases..
    Thanks
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach A.Shah

    Try the below link
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/468de435-3432-45c2-a50b-23519cd2686e/moving-the-system-databases-in-a-sql-cluster?forum=sqldisasterrecovery
    -Prashanth

  • Create a visual web part which get data from excel sheet and import it into sql server database in sharepoint 2010 (development)

    Hi,
    I want to create a visual webpart which will read data from excel sheet and import it in to sql server database.(using sharepoint development)
    I want to do it using visual webpart.
    Please help to solve the issue.
    Thanks in advance!
    Regards
    Rajni

    Hi  Rajni,
    Microsoft.Office.Interop.Excel assembly provides class to read excel file data, in your web part solution, reference the assembly, and following blog contains samples about how to read the excel file data,
    and import it to SQL  database.
    1.Create a Visual Web Part Project:Create
    Visual Web Parts in SharePoint 2010
    2.Read the excel workbook by using SPFile class:
    http://alancejacob.blogspot.in/2012/06/read-data-from-excel-file-and-insert-in.html
    http://stackoverflow.com/questions/14496608/read-excel-file-stored-in-sharepoint-document-library
    3.Export the excel workbook to SQL Server:
    http://www.c-sharpcorner.com/UploadFile/99bb20/import-excel-data-to-sql-server-in-Asp-Net/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • Error 26 when executing sql. File opened that is not a database file. My Easy System Cleaner will not work on Foxfire. What to do?

    I have the Easy System Cleaner. It worked through Internet Explorer. But when it comes to Mozilla Foxfire. It stops.
    The message is:
    error executing sql. Error 26. File opened that is not a database file "select[sql] from sqlite_master where [type]="table' and lower (name)='mos_cookies' " File is encrypted or is not a database.
    What should I do. And where do I look to solve this problem.
    I need to use my Easy System Cleaner...I paid for it!
    [email protected]

    How do I fix this error

  • How to recover database without controlfile and redo files?

    Hi all,
    If I just have datafiles using hot backup saving in another machine, and all files in current database were lost including data files,control files and redo log files .
    How can I recover database just using hot backup datafiles? without control file, without redo files.
    Your help is greatly appreciated.

    alter database backup control file to trace
    SQL> alter database backup controlfile to trace;
    Go to udump folder in oracle home folder check the trace file copy these lines
    CREATE CONTROLFILE REUSE DATABASE "O10G1” NORESETLOGS NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 454
    LOGFILE
    GROUP 1 'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\REDO01.LOG' SIZE 10M,
    GROUP 2 'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\REDO02.LOG' SIZE 10M,
    GROUP 3 'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\REDO03.LOG' SIZE 10M
    -- STANDBY LOGFILE
    DATAFILE
    'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\SYSTEM01.DBF',
    'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\UNDOTBS01.DBF',
    'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\SYSAUX01.DBF',
    'E:\ORACLE2\PRODUCT\10.1.0\ORADATA\O10G1\USERS01.DBF'
    CHARACTER SET WE8MSWIN1252
    Change the new database name “abc
    ” and REUSE replaced by SET and NORESTLOGS replaced by RESTLOGS above lines.
    Save as C1.sql
    C:\ set oracle_sid=instance name
    C:\>sqlplus /nolog
    SQL*Plus: Release 10.1.0.2.0 - Production on Tue Apr
    11 06:44:28 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    SQL> connect / as sysdba;
    Connected to an idle instance.
    SQL> startup nomount
    pfile='C:\oracle\product\10.1.0\admin\jeeno\pfile\jeenoinit.ora'
    ORACLE instance started.
    Total System Global Area 171966464 bytes
    Fixed Size 787988 bytes
    Variable Size 145750508 bytes
    Database Buffers 25165824 bytes
    Redo Buffers 262144 bytes
    SQL> @c1.sql
    Control file created.
    SQL> alter database open resetlogs;
    Database altered

  • Splitting large sql database files

    Hi
    I have large sap sql server data files having size in 40 GB/ 3 data files. Is there any way to split those data files into smaller size  .
    Thanks and Regards
    Jijeesh

    Hi Jijesh,
    There is a way of splitting files without hampering performance, I have done this on a production system without loss of performance.
    All data files in MSSQL belong to a FILE Group, suppose there are 4 datafiles in your database each of 4GB, assume all files belong to the same filegroup.
    file1.mdf
    file2.mdf
    file3.mdf
    file4.mdf
    and you want to split each into 2 GB datafiles here is what you do.
    (Before starting Take Complete Offline backup of your database by stopping SAP and performing a full offline backup of all data and log files.
    This operation technically could be performed with SAP Up and running , however its safer to keep database idle when doing a reorg, so stop SAP instance and do the following.)
    1.We select the file file1.mdf
    2.Add 2 new files to the same filegroup as file1.mdf and name them as file1a.mdf and file1b.mdf of size 2GB each.
    3.RESTRICT growth on all rest files (file2.mdf, file3.mdf and file4.mdf) by unchecking the Auto grow option.
    4. Open the SQL Analyser and give the command:
    <b>         USE '<SAP SID>' ;
             GO
             DBCC SHRINKFILE 'file1.mdf'  EMPTYFILE;
             GO
    </b>
          The above mentioned commands will empty the contents of 'file1.mdf' and restribute the data to other files in its FILEGROUP.
    Now we have restricted growth by TURNING OFF growth on 'file2.mdf' , file3.mdf and file4.mdf.
    The command will distribute data to the new files created by us file1a.mdf and file1b.mdf.
    When the command has completed, you can safely remove the file1.mdf
    5. Perform steps 1-4 for all the remaining files file2.mdf and file3.mdf and file4.mdf.
    After doing the above operation run a CHECK DB using DBCC CHECKDB , this will ensure that your database integrity is checked and everything is okay.
    Now run Update statistics to ensure that your performance will not be hampered.
    Regards,
    Siddhesh

Maybe you are looking for