Tag Info

New answers tagged

0

Another answer that I can think of, if you have enough space on disk, is to do the pre-processing outside of the database. You can use a large-file comparison tool that do not require the files to be on memory (or even program your own quick script, I do not see it too complicated) and then generate a patch-like syntax, so you can, from that, generate a ...


1

Given the clarifications on your comment, I would recommend 2 options: Use LOAD DATA INFILE IGNORE to load the data directly from the filesystem. This will insert new domains and not touch the "old" ones, but it will not delete the ones that are removed. On the bright side, it will reduce IO a lot. Go for your approach: use LOAD DATA INFILE on a new table, ...


0

The following LOAD DATA sentence loads the CSV file, ignoring the first line and inserting into the desired fields, but changing the format of the Date and Time columns into a proper datetime type: mysql> LOAD DATA INFILE '/tmp/alarms.csv' INTO TABLE alarms COLUMNS TERMINATED BY ',' IGNORE 1 LINES (@Date, @Time, ALARM_01, ...


1

Assuming you took a copy of the whole data directory including pg_xlog, pg_clog, global, base, etc, then you can simply ensure that PostgreSQL 9.3 is installed and: postgres -D /path/to/data/directory -c "port=5433" then in another terminal use pg_dump to dump the database(s) from the database running on port 5433 with (eg) pg_dump "dbname=mydb ...


2

Use this on Windows (three nested double quotes): exp system/password_for_system@dev file=c:\fooadmin.dmp full=yes imp """sys/password12345@dev as sysdba""" FROMUSER=FOOADMIN TOUSER=FOOADMIN file=c:\fooadmin.dmp In general imp would work as intended with sys account, it is just not recommended. But exp with sys account could possibly produce inconsistent ...


0

If you have mixed data, where some are double quoted and others are single, another option would be to load the complete data into a column and have a computed column in the same table that is running a function to strip out the unwanted characters from the source column. something like this: create table [xxxx] ( originalcol varchar(50) null, [$$derived] ...


0

To dump a database mysqldump -u root -p databasename > databasename.sql Dumping particular table alone then this would apply mysqldump -u... -p... mydb t1 t2 t3 > mydb_tables.sql


2

At the end of the import/export wizard you have the option to save your SSIS package (yes that's what the wizard uses behind the scenes). Save your package to a file then open it in SQL Server Data Tools. Go into the data flow and open the source. In the "Error Output" tab you will see an option to ignore failure (for truncation specifically or errors in ...


1

OK, spurred on by RolandoMySQLDBA's comment (I didn't know what to look for earlier), I was able to solve this. Ultimately, I used this blog post to recover the table data from the .frm files. Then, I used the technique here to import the ibd data.


1

Set the text delimiter in the flat file reader properties to the double quote.


1

Store the running time as an integer in total seconds. For display purposes you can convert the number of seconds into a string in hours:minutes:seconds format or whatever display format you choose.


0

The DatePart function will extract a specified part of a date/time field. The following example extracts the hour from the current time. =DatePart("h", Now()) Here is a link with more information on the function.


1

What finally solved my problem was: turning archive mode off disallowing connections disabling triggers and constraints truncating all tables performing imports ( attemp of creating existing objects fails but data is inserted ) re-enabling triggers and constraints turning archive mode back on allowing connections back



Top 50 recent answers are included