The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
54 views

Space usage when copying

Short version Copy table took up more space than I expected or tested Why would that be? Could it be the replication / binlog? If so, what then is written to the binlog during this query: INSERT ...
3
votes
2answers
149 views

Moving database objects to another database without wizard

I have several databases on production and i have also test environment. I don't have permission to do backup and restore operations. Actually i am using wizard to generate scripts (schema + data) and ...
5
votes
2answers
574 views

Scripting the copy of SQL Server production database to test environment

We are introducing continuous integration on our project and we decided to automate the refresh of our test database instance with fresh production data. I'm currently looking for the best way to go ...
1
vote
0answers
53 views

postgres \copy file to RDS timeout

Postgres version 9.3, hosted on Amazon RDS. I have a messages table with 10G of data. I connected the database using psql on the EC2. Then used \COPY (select * from messages) TO '/tmp/messages.csv' ...
0
votes
1answer
36 views

Exporting / copying a database with phpMyAdmin

I have a database on a hosting website so I am using phpMyAdmin to experiment with it, before I change anything I would like to make a copy of it or download it and look at it through MS Access or a ...
-1
votes
3answers
177 views

Pasting data from Excel table takes very long [closed]

I use SQL Server Management Studio 2012 to import data from Excel sheet to a table on SQL Server. I use the most straightforward way that I just Ctrl+C a table in Excel and Ctrl+V in table edit window ...
1
vote
0answers
43 views

Does psql print command results to standard error?

I am running COPY command through psql 9.1.15 as a cronjob to append data in csv file to table1: psql -q -h $DB_HOST -d $DB_NAME -p $DB_PORT -U $DB_USER <<EOF copy table1 from ...
0
votes
1answer
70 views

Errors importing data using COPY comand at postgresql 9.3.5

I am trying import a database table to Postgres 9.3.5 database server using COPY command as follows: COPY comment (generatedid, id, "timestamp", message, bugreport_id, personcontainer_id) FROM ...
-2
votes
1answer
242 views

How to use variable value inside copy function [closed]

I want to send data to .csv file using COPY function in Postgres. But I am using anonymous block so my table name should be value of variable. COPY (SELECT cname.portal from user) To '/tmp/out.csv' ...
1
vote
1answer
32 views

Instant File Initialization on Backup drive

I know IFI (Instant File Initialization) is good to have enabled on SQL Servers. How about backup archive locations? We backup our DBs to a local SSD drive (so it backs up quickly), then throughout ...
1
vote
1answer
970 views

Select into existing table where ID is in another table [closed]

I have one table containing ~35k IDs (TableC), one table that features multiple columns (TableA), amongst others the ID from the before mentioned table and a third empty table, featuring the same ...
0
votes
1answer
23 views

Copy every entry from TableA to TableB where the ID is in a textfile containing a list of IDs

I have a text file (or an xls) with a 35k lines, each containing a single ID. I'm required to copy every entry of TableA to TableB where the ID is in said list. Would it be best if I'd create a new ...
0
votes
0answers
40 views

How can I copy a database from Sql Server to Azure Sql Database?

The local database has settings that Azure will not accept and that we must keep in the local copy. I tried using SSDT and with that I could publish to a new database on my local Sql Server a schema ...
2
votes
1answer
66 views

Copying database to different hard disk

Total noob at database administration here, excuse my ignorance. I have a server running a Rails application that's using PostgreSQL. The database is saved on drive /z/, which seems to have filled ...
0
votes
0answers
35 views

MySQL: migration huge tables between two databases

Hello guys (and sorry for my English). I have 2 DB's - DB1 (staging) and DB2 (production), each day some contend added/changed in some tables in DB1 and should be moved to DB2. Right now it works ...
0
votes
0answers
321 views

Restore from copy of SQL Server backup file produces invalid data error

We have an instance of SQL Server 2008 R2 SP2 sitting in a DMZ. When I back up one of its databases to a drive local to that server, then run a RESTORE VERIFYONLY against the backup file, it declares ...
1
vote
3answers
567 views

Postgres inherit indexes for partitioned tables

I have a table with approximately 60 million rows that I have partitioned by state into 53 sub-tables. These tables "inherit" the big table like so: CREATE TABLE b2b_ak (LIKE b2b including indexes, ...
0
votes
1answer
1k views

Escaping delimiter in postgresql

I am trying to import data into postgres. Data fields are comma separated, strings may contain commas, in which case those are escaped: Data structure: create table v (a varchar); Data file: bus ...
1
vote
1answer
67 views

What is the fastest way to clone/copy oracle databases on the same machine?

I want to clone oracle databases on the same machine and I need to change user etc. from e.g. PROD to DEV. For that I use expdp/impdp, but this tends to be slow with increasing database size. I need ...
0
votes
1answer
598 views

Change permissions of postgres copy to exported file

I have asked this question on SO but perhaps that was the wrong location. Apologies for double posting but the question may have a better audience here. The original question is: ...
3
votes
1answer
477 views

Copy database and clear down data (including linked tables) older than N days

I have a sizable production database (140GB) on MS SQL Server 2012, which I'm trying to automatically download to our development environments on a periodical basis (every week or on demand). I'm not ...
0
votes
0answers
223 views

Copying a table with its structure, indexes, and associated triggers?

I have studied this post on Stack Overflow: Fastest way to copy a table in MySQL. But no answer is copying everything like the table's structure, data, indexes as well as associated triggers. Is it ...
0
votes
1answer
74 views

PostgreSQL: How does the implicit index work when using “COPY” for loading bulk rows into a newly created table?

What I know for fast loading bulk rows into a new table is: Create the table(without creating the index) Use "COPY" to load data from a file into the table Create the index What if I added a ...
0
votes
1answer
99 views

I need to copy data from remote Postgres server that has limited disk space and limited connectivity to a server

I have a remote Postgres server recording some data every second. the server has very less space like 6-7 GB, currently I write data to a remote VM server but due to poor connectivity the applications ...
0
votes
3answers
565 views

SQL Server: unable to copy database

I'm trying to create a dev database so I don't create triggers and such on the production database. I use the right click -> Taks -> Copy, followed the wizard and the process starts. After maybe a ...
0
votes
1answer
64 views

Save dataset within another table best practice

I want to save one dataset within another table, this dataset should be persistent. For example Table1: FIELDS (A,B,C) Table2: FIELDS (D, DuplicateTable1) I can think of 2 possiblities: Have ...
1
vote
3answers
5k views

How to create new table with same constraints and indexes?

I am Creating a new table with Primary Key Constraints and a Non Clustered Index in that table. I know, I would like to create another table with same structure and values as well keys and indexes ...
1
vote
0answers
121 views

How to copy a subset of SQL objects across databases within a transaction?

We already have a .dtsx package to copy a subset of tables (about 20) from one database to another (at least once in every month). It is using "Transfer SQL Server Objects Task". However this does not ...
0
votes
2answers
301 views

SQL Server 2008 - How to schedule a copy of view to another database?

I am a Sharepoint admin and need to copy the log data in database to another temp database for analysis. The data is stored in a view ([WSS_Logging].[dbo].[RequestUsage]). There is a column [LogTime] ...
3
votes
2answers
1k views

Does a MyISAM table locks if I copy it while MySQL is running? (READ DISCLAIMER)

DISCLAIMER: I'm very aware this is not supposed to be done, but time consistency between tables aren't a concert here and Im trying whatever pops in my mind right now to have alternatives for ...
3
votes
2answers
5k views

What is a good way to copy data from one Cassandra ColumnFamily to another on the same Keyspace (like SQL's INSERT INTO)?

Trying to find a way to easily transfer all the rows from a Cassandra ColumnFamily/Table to another. The COPY command, as I understand, is a good option. However, as it dumps all the data to .csv on ...