Tag Info

Hot answers tagged

5

Look into BCP or BULK INSERT, both of which can share format files. Quick math based on pure guesses, since no hard details are given: 13 numeric columns, pretend they're 6 bytes each on average = 13*6=78 bytes. 5 VARCHAR columns, pretend they're an average of 300 bytes each based on the "largest" being VARCHAR(1000) per the original question = 5*300 = ...


5

I would use Bulk insert. If you have a delimited file, it should be pretty easy. http://msdn.microsoft.com/en-us/library/ms188365.aspx A sample looks like this BULK INSERT dbo.MyTable FROM 'c:\test\test.txt' WITH ( FIELDTERMINATOR ='|', ROWTERMINATOR =' \n' ); EDIT: Based on the given requirements (the file cannot ...


4

This won't work. Don't even try feeding mysqldump output directly into psql. You'll need to dump schema and data separately, convert the schema either by hand or with a tool, load the converted schema into PostgreSQL then load the dumped data. mysqldump's compatibility flags are moderately useful for dumping data but pretty useless for dumping schema ...


3

It turns out that the Import wizard ( because it is considered like a Bulk Insert or BCP ) is disabling replication triggers on the tables they are loading data to, which prevents Merge Replication from detecting new records. This article: Bulk loading data into a merge replicated table explains this with more details. One workaround is to use the ...


3

You can use a variant of the technique described in Using merge..output to get mapping between source.id and target.id and by Adam Machanic in Dr. OUTPUT or: How I Learned to Stop Worrying and Love the MERGE. You use merge and capture the generated ID with the XML fragment that belongs to that ID in a table variable and then use that table variable when ...


3

Below are general recommendations and your milage may vary depending on you workload running and your IO subsystem, server hardware configuration, etc. At SSIS level, you can look into below things to speed up data read and data load : Fast Parse Option along with its limitations. Use the SQL Server Native Client 10.x OLE DB provider for an In-Memory, ...


3

As mentioned in the comments above, your time would be much better spent using SSIS for this task. Here's a recent video post that discusses handling multi-line record data files much like yours. Since you're okay with spinning your wheels, let's try to find an answer anyway--if you have the data in a single row, you have somewhere to start. My next step ...


2

Your best option (considering your limitations) is probably using OPENROWSET with a FORMAT FILE Take a look at those links: Use a Format File to Bulk Import Data You can use the BCP utility once locally to Create a Format File I prefer the XML Format Files


2

This doesn't sound like a PostgreSQL problem. Damaging your filesystem in that way looks relatively beyond the ability of a mere user-level process. I would suggest looking elsewhere including: Physical disks Hard drive array management Filesystem drivers Failing CPU or failing RAM There is very little room for ownership corruption of this sort in the ...


2

You can add a where clause to each table to filter rows exported: http://www.dba-oracle.com/t_export_where_clause_selective.htm However your referential integrity will not be maintained by this method, because the export is done per-object and filters are applied in the same way. You will need to either be very precise in how you define each where clause, ...


2

Indexes are not disabled in InnoDB using DISABLE INDEX (from http://dev.mysql.com/doc/refman/5.1/en/alter-table.html): For MyISAM tables, key updating can be controlled explicitly. Use ALTER TABLE ... DISABLE KEYS to tell MySQL to stop updating nonunique indexes. Then use ALTER TABLE ... ENABLE KEYS to re-create missing indexes For InnoDB, you're stuck ...


1

I wasn't clear where you want the transformed id_estado inserted, so I chose "state" as a destionation. You can modify accordingly: insert into courrier_city (country, state, created, modified) select "VE", if(is_estado<10, concat("VE0.",is_estado),concat("VE.",is_estado)), now(), now() from zoom_city You will probably want to modify the example ...


1

After some careful thought and some experimentation, the AccessDatabaseEngine.exe installed on the server is probably part of the problem. There are actually two versions 32 bit and 64 bit. On my computer 64 bit, I have the 32 bit version of Office installed. The SQL Server on my computer is 64 bit. When I attempt to use openrowset with the same OLEDB ...


1

Connect using mysql cli: mysql -u <username> -p<pass> db_name The following command will show you the imported tables: show tables; Then, access the data: select * from <table_name>; where *table_name* is one of the tables in the show tables' output.


1

I see two solutions. I did not test them but I hope they are userful. In contrast to table mode export both user mode and tablespace mode export take care of the dependencies between tables so that the tables are imported in the right order. Both methods import the production table stuctures to dev. Tablespace mode export/import in ORacle 8i or 9i can be ...


1

I strongly recommend doing a dump and reload. Don't put tablespaces on removable media, it doubles your chances of data loss. If either the main database on the main disk or the removable media fails / is lost, your data's gone. A tablespace cannot be read without the database it's from.


1

SubQuestion 1: I don't know of any way to get rid of the 23 byte header. There is also a 24 byte header on the page. http://www.postgresql.org/docs/8.3/static/storage-page-layout.html SubQuestion 2: This guide should help. As suggested, increasing maintenance_work_mem is advised, but also increasing checkpoint_segments should help (to reduce the frequency ...


1

I have dealt with questions like this in both directions Mar 20, 2013 : How can I determine the size of a dump file prior to dumping? May 21, 2012 : How large will a MySQL database be relative to the dump file? Your question is a little different because you did not give anything about the target MySQL Instance (what Storage Engine will be used, which ...


1

Since you are using mongoimport to do these upserts without --upsertFields, it will be using the _id index to do the upsert (see the note in the docs). That means that it will be scanning that index, and if you are including the _id field in the json dump that should be fine in terms of that particular search as long as that index is in memory. If you are ...


1

If you want access to all data (ie, all tables in all schemas), you would need to grant dataaccess. db2 grant dataaccess on database to user winuser1 If you only want winuser1 to access just the 100 tables in the schema you are referring to, then unfortunately, there is no easy way, you would need to grant SELECT on each table. That being said, it can be ...


1

There's probably an error occurring somewhere in the process, because that would cause exactly what you're seeing. Here's why: When you define a view, the views or tables referenced by that view must already exist: mysql> CREATE VIEW broken_view AS SELECT some_column FROM nonexistent_table; ERROR 1146 (42S02): Table 'test.nonexistent_table' doesn't ...


1

Since you are trying to avoid SSIS and BCP: If you don't have a deep-seated hatred of MS Access, you might want to take a brief look at it. It has a pretty slick flat-file import wizard. I prefer it over SSIS for small one-time (manual) jobs with flat-files. MSAccess can link directly into SQL Server (or equiv) tables and import directly into the server ...


1

This may depend on where you generated the CSV file. If the CSV file was generated on a Windows machine, there could be some character set issues See https://code.google.com/p/sequel-pro/issues/detail?id=1629 See the following URLs as SequelPro's character set problems are not new ...


1

The link below is from oracledistilled.com and goes through Enterprise Manager >> Data Movement. It is very well explained with good screen shots and walks through Cloning i.e. another function under 'Data Movement' >> 'Export Export to File'. Under host credientials the normal user is the O/S oracle user (as already suggested by Alex Poole above). ...



Only top voted, non community-wiki answers of a minimum length are eligible