recentpopularlog in

kme : sqlite   39

SQLite Describe Table
<code class="language-sql">pragma table_info('albums');</code>
sqlite  sql  newbie  dba  solution 
23 days ago by kme
sqlite - Compile Python 3.4 with sqlite3 - Stack Overflow
There is also the option of pre-linking your custom Python build with your own-built sqlite3. (I had the same issue: the custom python was using the system-provided sqlite3, completely ignoring the sqlite3 I built).

Prefix your configure and make commands with:
<code class="language-bash">LD_RUN_PATH=$HOME/opt/lib configure LDFLAGS="-L$HOME/opt/lib" CPPFLAGS="-I$HOME/opt/include" …
LD_RUN_PATH=$HOME/opt/lib make</code>

so that the built python3 by default is linked to your sqlite3. This worked for me.
python  fromsource  sqlite  errormessage  linkererrors  solution 
september 2019 by kme
charles leifer | Compiling SQLite for use with Python Applications
<code class="language-python">>>> import sqlite3
>>> sqlite3.sqlite_version
'3.25.0'</code>
python  sqlite  fromsource  reference 
september 2019 by kme
python - Is it possible to open a locked sqlite database in read only mode? - Stack Overflow
SQLITE_OPEN_READONLY flag - look into this. Probably only part of the C API, which Python's sqlite3 won't necessarily support.

This is the solution I ended up using:
You could try just copying the database file (e.g., with the system utility cp) and using that snapshot for reading purposes
python  sqlite  concurrency  database  locking  errormessage  maybesolution 
june 2019 by kme
Python SQLite: database is locked - Stack Overflow
Got this message when trying to use my 'ffhist' Python script while Firefox was open.
python  sqlite  dba  database  locking  errormessage 
june 2019 by kme
Where Are My Saved Passwords in Chrome - AskCyberSecurity.com - https://askcybersecurity.com/
It's a SQLite3 database
Your Google Chrome password file is located on your computer at C:\Users\$username\AppData\Local\Google\Chrome\User Data\Default. Your sites with stored passwords are listed in a file names Login Data
passwords  security  chrome  passwordmanager  sqlite 
may 2019 by kme
Sqliteman - sqlite developer/admin tool
tl;dr: use http://sqlitebrowser.org/

Source code is here () and binaries are here (https://sourceforge.net/projects/sqliteman/files/).

If this guy's legit, dev needs to get his shit together, because it's sketchy when things point all over the place, he's asking for money transferred via IBAN, and there hasn't been an update since 2010.
sqlite  gui  qt  dba  utility  software  crossplatform  sketchy 
november 2017 by kme
database - Import csv into sqlite with autoincrementing primary key - Stack Overflow
An empty field in a CSV file is just an empty string, which is not valid for an INTEGER PRIMARY KEY column.

Import into a temporary table without that column, then copy the data over with:

INSERT INTO Allegiance(CharacterID, Title) SELECT * FROM TempTable;
sqlite  sql  newbie  syntax  solution 
june 2017 by kme
sqlite - How to import a tsv file with SQLite3 - Stack Overflow
There is actually a dedicated mode for importing tab separated files:

sqlite> .mode tabs
sqlite> .import data.tsv people

Also if you include a header row in your tsv file, you can let sqlite automatically create the table. Just use an unused table-name during import and change the tsv file to:

name param1 param2
Bob 30 1000
Wendy 20 900
sqlite  importexport  tabdelimited  csv  solution 
june 2017 by kme
ownCloud 7.0.3 stable problems due to missing shareKey (sqlite3, SQLSTATE[HY000]: General error: 5 database is locked) · Issue #12428 · owncloud/core · GitHub
With ownCloud 7.something on CentOS 6, I got errors like this, which resulted in files showing up in the "Not Synced" list in the ownCloud activity log.
Error PHP Session has been closed - no further changes to the session as allowed at /usr/share/owncloud/lib/private/session/memory.php#80 2017-05-25T03:42:26+00:00
Fatal remote An exception occurred while executing 'UPDATE "oc_filecache" SET "size"=? WHERE ("size" <> ? ) AND "fileid" = ? ': SQLSTATE[HY000]: General error: 5 database is locked 2017-05-25T03:42:26+00:00


The problem could've been any number of things (like the pdo_sqlite PHP module throwing some kind of "missing symbols" errors, possibly related to this bug: https://bugs.php.net/bug.php?id=48614), but following the instructions at [1] and [2] seem to have eliminated this problem for me. Maybe SQLite just wasn't up to the task when transferring a shit-ton of small files all at once?

[1] https://doc.owncloud.org/server/7.0/admin_manual/configuration/database_configuration.html
[2] https://doc.owncloud.org/server/7.0/admin_manual/maintenance/convert_db.html
owncloud  errormessage  sqlite  mysql  solution 
may 2017 by kme
ubuntu - Building Python and more on missing modules - Stack Overflow
The moral of the story is don't do a 'make && sudo make install' without checking the output of 'make' first. I was missing 'sqlite-devel' on a CentOS 6 system, and ended up with no 'sqlite3' module, and really weird errors from SQLAlchemy that made me think all kinds of things were wrong.
Python build finished, but the necessary bits to build these modules were not found:
_bsddb _curses _curses_panel
_tkinter bsddb185 bz2
dbm gdbm readline
sunaudiodev _sqlite3
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
python  sqlite3  sqlite  library  errormessage  solution 
february 2017 by kme
python - What are sqlite development headers and how to install them? - Stack Overflow
Failed to install pysqlite with 'pip', but this got me a little farther:
For me this worked (Redhat/CentOS):

$ sudo yum install sqlite-devel
pip  python  sqlite  library  errormessage  sortof  solution 
february 2017 by kme
dumblob/mysql2sqlite: Converts MySQL dump to SQLite3 compatible dump
Using 'mysqldump' is no joke. SequelPro didn't work (at least with default options).
mysqldump --skip-extended-insert --compact [options]... DB_name
sqlite  conversion  dba  script  importexport  mysql  solution 
february 2017 by kme
What are the performance characteristics of sqlite with very large database files? - Stack Overflow


We are using DBS of 50 GB+ on our platform. no complains works great. Make sure you are doing everything right! Are you using predefined statements ? *SQLITE 3.7.3

Transactions
Pre made statements

Apply these settings (right after you create the DB)

PRAGMA main.page_size = 4096;
PRAGMA main.cache_size=10000;
PRAGMA main.locking_mode=EXCLUSIVE;
PRAGMA main.synchronous=NORMAL;
PRAGMA main.journal_mode=WAL;
PRAGMA main.cache_size=5000;

Hope this will help others, works great here
dba  sqlite  database  performance 
january 2017 by kme
SQLite CSV import won't create a table automatically - Database Administrators Stack Exchange
The '.import' command isn't present (or isn't complete) in older versions of SQLite--maybe anything older than 3.15 won't have it.
sqlite  solution  dba  annoyance 
october 2016 by kme

Copy this bookmark:





to read