Tag Info

Hot answers tagged

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 ...


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 = ...


3

imp is an operating system command, not an SQL*Plus command, so it should be run from the OS shell command line. If you insist on running it from SQL*Plus you need to use the SQL*Plus host command to send imp to the host OS for execution.


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 ...


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

Full disclosure.. I am the author of the following program. Give it a try and let me know what you think. I have tried many applications including the excel add-in from MySQL, but was not satisfied with them, so I wrote my own. The current version of my program is slow (just like the MySQL add-in), doesn't support international characters, and doesn't ...


2

To answer my own question - the answer is NO - the imp command cannot create the user for me.


2

I imagine the unescaped * character in your password is causing problems in the shell. Escape it and you should be ok.


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

What you want is nearly impossible, no one can know if you want to import '1' as a characters string, n decimal integer, a base-2 integer, an hex integer, a float, a blob, a "boolean", ... You can try heuristic programs, or import them all as strings and run an analysis program like SELECT... ANALYZE TABLE();. It would be easier if the csv had the datatypes ...


1

The column default for daqa_report_id would have to be: nextval('jira_tickets.daqa_id_seq'::regclass) Not: 'jira_tickets.daqa_id_seq'::regclass That would just fetch the OID for the sequence object from pg_class, which is converted to a meaningless, static bigint number. pgAdmin has nothing to do with this. But just use the pseudo data type bigserial ...


1

First, make sure this chunks/datafiles are from Windows OS too. Isn't compatible read a datafile froma different plataform (windows VS Unix VS Linux) You cannot just move the chunks/datafiles and expected the engine just re-adapt to new path. There internal pointers at theirs configurations where the path is saved and need some administration steps to ...


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

Thanks. I have imported dmp file by following steps.. Command to open SQLPLUS In Command Prompt: C:> sqlplus / as sysdba Clear Screen: SQL> Clear Screen 1- First create a new user by SQL> Create user TestUser1 identified by test; -- (test is password) 2- Grant Privilages to new created user TestUser SQL> Grant dba, IMP_FULL_DATABASE, ...


1

So after a little more searching I found the answer :) Here is how this needs to be done. mysql -uroot -xxx! -f main < sq2.sql > /var/www/log.txt &


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

Yes, the "switch or option" that would allow you to do this is the one your host doesn't want to change. If there were a way for a user to simply work around resource limits, there wouldn't be much point in resource limits. It's not obvious from the documentation, but the source code makes it fairly clear that this is a limit on the number of queries you ...


1

Try it and see. You'll find that it works perfectly. Now, if you want to insert data ignoring duplicates, that's another problem entirely.


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

Your table is owned by USERGOD, but you are importing as DIGITALNOISE. Yes, you have the IMPORT FULL DATABASE, but you are not doing a full import. Using FROMUSER/TOUSER is one solution. Performing a full import by adding the FULL=Y option is another.


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

If you've already started the import, you can execute this command in another window to see the current size of your databases. This can be helpful if you know the total size of the .sql file you're importing. SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY ...



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