In the MindsDB configuration file, there is a permanent_storage location where mindsdb stores some data. Mindsdb documentation specifies that alongside local dir storage it saves some metadata inside the SQLite database. Is there a way to change the sqlite db with another option in our use case prefered would be postgresql?
You can change the default storage option and use different database by adding the new connection string using MINDSDB_DB_CON variable.
An example would be
MINDSDB_DB_CON='postgresql://user:secret#localhost'
Related
I have one scenario to implement: I am reading files in ADLS using ADF and copying into another location. While doing that, I need to capture file names and store in cosmos db. Does anybody has done such scenario, please suggest. TIA.
You can use Get Metadata activity get file metadata such as file name. Using this pattern, you can then push this value to the db collection in cosmos database.
You can use Get Metadata activity to get file names. Then create Azure Function activity and pass your file names to it. Finally, you need generate id property and insert into Cosmos DB container.
I run a couple of PostgreSQL databases (9.3), one of which does not need archiving the other of which I'd rather run in WAL archive mode by can get away with not.
I now have a need for a data which is archived.
As far as I can tell the setting is on an instance basis, so I wouldn't be able to just choose which databases to archive and which not, which would indicate that I will need to create a new PostgreSQL instance.
Am I missing something?
Also, FWIW, will I be able to create database links between databases on the two instances?
Thanks, --sw
You cannot to choose database for archiving - only all (or none) in PostgreSQL instance can be archived. There are not any pother possibility now.
You can send query to other PostgreSQL instance via dblink extension or with Foreign Data Wrappers API. FDW API should be preferred, although dblink has some usage still.
Ive used the Data Comare tool to update schema between the same DB's on different servers, but what If so many things have changed (including data), I simply want to REPLACE the target database?
In the past Ive just used TSQL, taken a backup then restored onto the target with the replace command and/or move if the data & log files are on different drives. Id rather have an easier way to do this.
You can use Schema Compare (also by Red Gate) to compare the schema of your source database to a blank target database (and update), then use Data Compare to compare the data in them (and update). This should leave you with the target the same as the source. However, it may well be easier to use the backup/restore method in that instance.
I followed the following MDSN tutorial:
http://www.asp.net/mvc/tutorials/mvc-4/getting-started-with-aspnet-mvc4/adding-a-model
Then I tried this guide according to my needs and I set up a database GAMES.MDF.
Then, I deleted the database and set it up again, is supposedly work (I can write and read data), but there is no such database in the APP_DATA folder. It seems to exist, but somewhere else on my PC.
I even tried a new project and it did not work, works but not in the library, and it even uses the data I created before. I even deleted the DB from SQL Server Management Studio 2008.
How do I delete it permanently, not to remain any trace of it?
Check for the connection string in the web.config - You'll probably see the file location there.
Your connection string should ideally name the database you want to use. I would not recommend specifying the MDF file, unless you know you are using SQL Express. Source: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f21c0728-935d-492a-baaf-ff2704e3683b/attachdbfilename-option-in-connection-string?forum=sqldataaccess0
Instead, this is how it is done on SQL Server:
initial catalog=MyDatabase
To be sure you are accessing the database you think you are, run this SQL query through your app, using your connection string, and look at the physical file location of your MDF file. This query is handy for knowing which DB is tied to which DB files.
select * from [dbo].[database_files]
As far as actually clearing the DB, this article deals with managing database initializers and seeds. You might be experiencing a problem due to that:
How to delete and recreate from scratch an existing EF Code first database
Outside of EF, SQL deletes databases like this:
use master
drop database MyDatabase
I want to have pre populated db with data for my application.
but i am not sure the best way to that.Do i need to create db at launch and populate data from a file or do i need to have db added into the resources file with data loaded. i want to read & write into the db
Pls let me know your opinions
You can add db file as resource. Add your data to the database file , then add the database to resources.
For reading from database, you can read it directly from resource bundle. If you want to write to database , then you must move the database file to Documents or Library Directory of your application.