{"id":38498180,"url":"https://github.com/usrecnik/ddlfs","last_synced_at":"2026-01-17T05:56:56.687Z","repository":{"id":192082114,"uuid":"100517816","full_name":"usrecnik/ddlfs","owner":"usrecnik","description":"Filesystem which represents Oracle Database objects as their DDL stored in .sql files","archived":false,"fork":false,"pushed_at":"2025-05-08T11:39:55.000Z","size":14606,"stargazers_count":35,"open_issues_count":3,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-08T12:37:18.721Z","etag":null,"topics":["ddl-scripts","filesystem","oracle","sql-files"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usrecnik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-16T18:00:04.000Z","updated_at":"2025-05-08T11:39:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"837ee4ae-3b03-48aa-ae80-56d87023d186","html_url":"https://github.com/usrecnik/ddlfs","commit_stats":null,"previous_names":["usrecnik/ddlfs"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/usrecnik/ddlfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrecnik%2Fddlfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrecnik%2Fddlfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrecnik%2Fddlfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrecnik%2Fddlfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usrecnik","download_url":"https://codeload.github.com/usrecnik/ddlfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usrecnik%2Fddlfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28501350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddl-scripts","filesystem","oracle","sql-files"],"created_at":"2026-01-17T05:56:56.235Z","updated_at":"2026-01-17T05:56:56.682Z","avatar_url":"https://github.com/usrecnik.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ddlfs\n[![GitHub release](https://img.shields.io/github/release/usrecnik/ddlfs.svg)](https://github.com/usrecnik/ddlfs/releases)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/usrecnik/ddlfs/blob/master/LICENSE)\n\n**FUSE filesystem, which represents Oracle Database objects as their DDL stored in `.SQL` files.**\n\n![ddlfs demo](https://raw.githubusercontent.com/usrecnik/ddlfs/master/docs/ddlfs-demo.gif)\n\nInstallation\n------------\n`apt install ./ddlfs-\u003cver\u003e.deb`  \n`dnf install ./ddlfs-\u003cver\u003e.rpm`\n\n### Version 3.x compatibility (beta!)\n\nThis is the first release to support both, Windows (MSVC/Dokan) and Linux (GCC/libfuse3) environments.\n\n* Windows 10, 11\n* Ubuntu 24.04, 22.04 (for 24.04 use `ddlfs-\u003cver\u003e-ubuntu24.deb` package)\n* Debian 12.0\n* Oracle Linux 9\n\nThis release is based on:\n* [libfuse3](https://github.com/libfuse/libfuse) (linux) and [Dokan](https://github.com/dokan-dev/dokany)\n* [Oracle Instant Client 23.6](https://www.oracle.com/database/technologies/instant-client/downloads.html)\n\nUse older releases for systems, which are older than described.\n\nSupported database versions are \u003e= 19c according to MOS 207303.1.\n\n### Version 2.3 compatibility\n\n* Ubuntu 16.4 and 18.4\n* Oracle Enterprise Linux 6.0 and 7.5\n\nOlder/other versions might need to compile from source (due to different libc and fuse versions).\n\nSupported Oracle Database versions are 10g, 11g, 12c, 18c.\n\nUsage\n-----\n`mount -t fuse -o username=\u003cusername\u003e,password=\u003cpassword\u003e,database=\u003chost\u003e:\u003cport\u003e/\u003cservice\u003e ddlfs \u003cmountpoint\u003e`  \nor  \n`ddlfs -o username=\u003cusername\u003e,password=\u003cpassword\u003e,database=\u003chost\u003e:\u003cport\u003e/\u003cservice\u003e \u003cmountpoint\u003e`\n\nIn the latter, you can optionally use `-f` flag to run filesystem in foreground (especially useful with `loglevel=DEBUG` :-) )\n\nWhen mounted, following directory tree is available under mountpoint:\n\n* `\u003cschema\u003e`\n  * `FUNCTION`\n  * `JAVA_SOURCE`\n  * `MATERIALIZED_VIEW` _(read only)_\n  * `PACKAGE_BODY`\n  * `PACKAGE_SPEC`\n  * `PROCEDURE`\n  * `TABLE` _(read only)_\n  * `TRIGGER`\n  * `TYPE`\n  * `TYPE_BODY`\n  * `VIEW`\n\nEach folder has `.SQL` file for each object of specified type (parent folder) in database. For example, folder `\u003cschema\u003e/VIEW/`\nhas one `.SQL` file for every view in this schema.\n\nIf you write to those files, filesystem will execute DDL stored in the file on file close (thus, you can edit database objects\nvia this filesystem). Filesystem keeps a local copy on regular filesystem while the file is open (between open and close calls).\n\nIf you delete such `.SQL` file, a `DROP \u003cobject_type\u003e \u003cobject_name\u003e` is issued.\n\nIf you create new file (e.g. using `touch` utility), a new object is created from template - e.g. for views, it is\n`create view \"\u003cschema\u003e\".\"\u003cobject_name\u003e\" as select * from dual\"`.\n\nAll files have last modified date set to `last_ddl_time` from `all_objects` view. All files report file size 0 (or whatever\nnumber is set for `filesize=` parameter); except for those that are currently open - those report their actual, correct, file size.\n\nOne special file exists, `ddlfs.log`, which contains log of every executed DDL operation along with possible errors and\nwarnings (e.g. indicating on which line syntax error occured). You can `tail -F` this file - just use capital `-F`, because this file\nonly exists in-memory and is rewritten in cyclic manner.\n\n\nMount Options\n-------------\n\nThis section describes mount options specific to\nddlfs. Other generic mount options may be used as well; see **mount** and **fuse** for details.\n\n\n**`database=`**`host:port/service`  \nOracle EasyConnect string, used to connect to database. Use `/` to connect to local instance using bequeath protocol.\n\n**`username=`**`string`  \nUsername used to connect to database specified by `database` parameter.\nSpecify `/` to use os authentication (like in `sqlplus / as sysdba`).\n\n**`password=`**`string`  \nPassword used to connect to database specified by `database` parameter.\nSpecify `/` to use os authentication.\n\n**`schemas=`**`string`  \nSchema or list of schemas, separated by `:`. Those are schemas of which objects are \"exported\" as `.sql` files. You may specify (multiple) partial schema name(s) using `%`\nsign, e.g.: `APP_%:BLA_%`, which would match all schemas with names starting with either `APP_` or `BLA_`. It defaults '%' (to show all schemas).\n\n**`pdb=`=**`string`  \nIf you use os authentication, you'll be connected to `CDB$ROOT` by default in multitenan environment. This setting, if specified,\nwill cause **ddlfs** to issue `alter session set container=\u003cpdb\u003e;` right after logon.\n\n**`userrole`=**`string`  \nYou can specify role such as `SYSDBA` or `SYSOPER` here.\n\n**`loglevel=`**`[DEBUG|INFO|ERROR]`  \nDefines verbosity used for stdout messages. Default value is `INFO`.\n\n**`temppath=`**`/tmp`  \nWhere to store temporary files - offline copies of DDL statements while their files are open.\n`/tmp` location is used by default. All files created by **ddlfs** have names prefixed by `ddlfs-\u003cPID\u003e` in this folder.\n\n**`keepcache`**  \nLocal temporary files (created in `temppath=` folder) are deleted on umount by default. Specify this mount option to\nkeep those temp files intact after umount. This has performance benefits when using `filesize=-1`.\n\n**`dbro`**\nUsing this option will assume that database is opened as `READ ONLY`. That means that we can read\nany object just once and never check if it has changed on database, because due to database\nbeing open in `READ ONLY` means it cannot change. You can use this option even if database\nis *not* in `READ ONLY` mode - this is useful for tools which can benefit from such a \"snapshot\"\nview and increased performance (e.g. git \u0026 mercurial).\n\n**`filesize=`**`0`  \nAll `.sql` files report file size as specified by this parameter - unless if file is currently open; correct file size\nis always returned for currently open files. Using default value `0` (or not specifying this parameter) should be OK for\nmost cases, however, some applications refuse to read files with zero length and only read files up to returned file size.\nIf you use such application with `ddlfs` specify this parameter to be `-1`, which will cause ddlfs to *always* return correct file sizes. This\nhas a bit of performance penalty as `ddlfs` must read contents of every object of specified type in order to list their correct file sizes (`ls -l`).\nPossible alternative is to set this parameter to any value larger then any database object, e.g. to `10485760`, this is 10mb, which should be\nenough in most cases). Note that this may also confuse some applications.\n\n**`volname`=**`DOKAN`  \n(Windows only) Name of Windows Volume. It is what Explorer displays next to drive letter, e.g. `X: (MY_PROD_DB)`.\n\nTips for VIM\n------------\nIf you are using VIM editor to edit files mounted with this filesystem, then you will wan to put following to your `.vimrc`.\nThis is because you can only store `.sql` files containing valid DDL on this filesystem (`~backup` and `.swp` files are not .sql files)\n\n```\n\" The first line removes the current directory from the backup directory list (to keep the ~ backups out of your\n\" working directories). The second tells Vim to attempt to save backups to ~/tmp, or to /tmp if that's not possible. \"\nset backupdir-=.\nset backupdir^=~/.vim/tmp,/tmp\n```\n\n```\n\" For Unix and Win32, if a directory ends in two path separators \"//\" or \"\\\\\", the swap file name will be built from\n\" the complete path to the file with all path separators substituted to percent '%' signs. This will ensure file name\n\" uniqueness in the preserve directory.\nset directory=~/.vim/swapfiles//\n```\n\nVersion Control\n---------------\nYou can use this filesystem with version control software such as Git or Mercurial. For best\nperformance try to use following mount options (and (re)mount before each `git add` \u0026 `git commit` cycle):\n\n`ro,dbro,username=/,password=/,database=/,userrole=SYSDBA,schemas=%,filesize=-1,keepcache,temppath=/vbs/ddlfs/_cache/`\n\nSubversion won't work because it wants to create `.svn` subfolder in *every* folder. Problem is that ddlfs only\nsupports storing of DDL in `.SQL` files. (Git and Mercurial only require one folder bellow mountpoint and that's all)\n\nCompiling on Linux\n------------------\n1. Download Oracle Instant Client (Basic + SDK Package):  \nhttp://www.oracle.com/technetwork/database/database-technologies/instant-client/overview/index.html\n\n2. Files will probably be named something like  \n2.1. instantclient-**basic**-linux.x64-18.3.0.0.0dbru.zip  \n2.2. instantclient-**sdk**-linux.x64-18.3.0.0.0dbru.zip\n\n3. Extract both files to the _same_ location, which is specified in `Makefile` (on line which starts with `LD_LIBRARY_PATH=...`)\n\n4. Run `make clean all` from `./src/` folder.\n\nCompiling on Windows\n--------------------\n\nBefore you can build on Windows, you need to install the following:\n\n* Visual Studio 2022 (Desktop development with C++)\n* Dokan (https://dokan-dev.github.io/, I used version 2.2.0.1000)\n  * Select Development (Headers and Libs, Symbols) besides \"Dokan Core\".\n* Oracle Instant Client (basic+sdk) and put it besides ddlfs folder (e.g. `C:\\Users\\test\\repos\\instant_client_23_6`)\n* run `dotnet tool install --global wix` (only needed for building ddlfs-bundle.exe install package, I've tested with 5.0.2+aa65968c version)\n  * run `wix extension add -g WixToolset.BootstrapperApplications.wixext` (needed to create installer bundle of stuff just described)\n\nfinally, you can run:\n\n```\nnmake -f Makefile.win\nnmake -f Makefile.win release\n```\n\nThe first command produces `ddlfs.exe` and the second one creates .msi package and bundles it with everything else together into `ddlfs-bundle.exe`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusrecnik%2Fddlfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusrecnik%2Fddlfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusrecnik%2Fddlfs/lists"}