0
votes
0answers
5 views

Is there a standard mechanism for moving data to a remote database?

I have my application installed in data centers across the world, performing various functions, with each data center having its own local database for the application. Certain reporting data is ...
0
votes
0answers
7 views

Calculate sum of a whole column in IBM Datastage without any grouping

I have a table in oracle with salary as one of the columns. I want to calculate the sum of this salary column. It is pretty simple in SQL sum(salary) but I have made some dimensions and facts using ...
0
votes
0answers
8 views

Why would I not specify ROWLOCK to get rid of page locks?

I have a query that goes something like this: SELECT TOP (1) * FROM MyTable WITH (UPDLOCK, READPAST) ORDER BY SomeColumn ASC; This answer says that it's hard to say for sure but it will probably ...
0
votes
0answers
8 views

How to import large sql file in postgres?

Trying to import sql file around 8GB using these commands sudo -u postgres psql yourdb -f my_file.sql sudo -u postgres psql yourdb < my_file.sql sudo -u postgres cat my_file.sql | psql yourdb ...
1
vote
3answers
30 views

500 databases or 1 database with 500 tables or just 1 table with all the records?

I currently have an application that is used by a single end customer. For ease of discussion assume the application only needs a single database table for all records. I now need to support ...
1
vote
1answer
10 views

Slow Query with LIMIT

We have this query: SELECT "messages".* FROM "messages" WHERE "messages"."account_id" = 1 AND "messages"."status" = 'unread' AND (created_at >= '2014-04-24 01:00:00.000000') ORDER BY id DESC It ...
0
votes
0answers
26 views

Why does this query take 32 sec to execute?

I keep my history records in one table and my pertinent data in another. I want to grab only the files from myfiles that currently have a given status recorded in statuses (ie, the latest status is ...
1
vote
1answer
13 views

Transforming a relation to 3NF

I'm trying to transform the following relation to 3NF but can't figure it out. The relation is (a student can only have 1 major): STUDENT (StuID, StuName, Major), Primary Key = {StuID} I tried the ...
0
votes
0answers
9 views

SQL Server Replication Snapshot Agent login fails

I have setup TRANSACTIONAL REPLICATION from ServerA to ServerB ServerA = Primary Server = SQL Server 2008 R2 Enterprise ServerB = Secondary Server = SQL Server 2008 R2 Standard Edition. I ...
0
votes
0answers
11 views

Size of Postgres database growing

Our Postgres database is currently at about 68G of size and growing at a rate of 6G/month. I am investigating ways how to scale the database. Would be nice if someone can give some advices as I am ...
0
votes
0answers
5 views

Trying to connect to AWS RDS from an AWS EC2 instance

I am trying to connect to an AWS RDS instance from an AWS EC2 instance. I ssh into the AWS EC2 instance, and then issue the following command: mysql -h xxxxxx.ciy4oapkpytm.us-east-1.rds.amazonaws.com ...
1
vote
1answer
27 views

Merge Problems SQL Server

I'm trying to create a procedure that will take the values from a temporary table, and load them into another table. The second table has a composite unique constraint across its three columns (Not ...
0
votes
1answer
16 views

Replication not updating XML Schema collection

So the problem I'm facing is that replication from our Main instance to our Data Warehouse instance is failing because it isn't picking up XML schema updates. Thus, when it tries to bulk copy the data ...
0
votes
1answer
20 views

MySQL slave stuck at 'System lock' most of the time, high CPU usage

Let me describe what we are facing now: We have a MySQL Master-Slave, Row Based Replication setup and at the moment, the slave is stuck with a perpetual System Lock. The Master is an active server ...
0
votes
2answers
33 views

Can I permanently lock a MySQL table to prevent inserts

I have a complicated situation where I would like to prevent inserts into a MySQL table, but keep it open for edits/updates to existing data. Can this be done? I've searched around here, but could not ...
0
votes
0answers
8 views

Why would a MySQL 5.6 slave's AUTO_INCREMENT value be different from the 5.1 master's?

I have a MySQL 5.6.21 slave that is replicating from a MySQL 5.1.73 master, and I noticed that for two of the tables, the 5.6.21 has slightly ahead AUTO_INCREMENT values than the 5.1.73. I have ...
1
vote
2answers
27 views

Primary Key choice on table with unique identifier

I'm reconsidering my choice of Primary Key on a table, and would like some input. Some context: We are building a REST API, where clients access "Assets" identified by a GUID. So, the table for ...
1
vote
2answers
78 views

WITH Clause UNION Issue

WITH [ProgressInvoicesPeriodCost] AS ( SELECT ProgressInvoices.ProjectId , ProgressInvoices.PeriodId , SUM(ProgressInvoiceDetails.TotalThisInvoice) AS TotalThisInvoice ...
0
votes
1answer
21 views

The most important oracle database performance metrics [on hold]

Team, I need to collect the top most 10 important Oracle database related metrics from Oracle OEM. Can somebody help me define them? I could not find document that list the metrics for oracle ...
0
votes
0answers
12 views

How do I find duplicate values in multiple columns over different rows?

I have a database with a table of games (some columns omitted): gameid hometeam awayteam `date` Sometimes games are added with the same home and away teams, but on a different date that is just 1 ...
0
votes
0answers
10 views

Creating SSL certificates for a MongoDB replication set

So I figured out my issues regarding connecting a node to a node or a client to a node in my replication set and now I'm trying to figure out how to bring this together so that all of my nodes can ...
0
votes
0answers
29 views

No-SQL Datebase Design for restaurant app

I've been working with SQL Datebases all my life and I am now trying to get into No-SQL world. I am a looking for a piece of advice on whats the best practice in order to achieve this. Suppose I have ...
0
votes
1answer
14 views

Does mysql rand() internal working use time to produce randomness?

I have some records in a table and i am viewing each record at a time.Its not important that i read the records one after the other sequentially so i am using rand() like select quantum_qubits from ...
0
votes
0answers
26 views

Don't know how to transform complex attribute into relational table

INTRODUCTION AND RELEVANT INFORMATION: The following example illustrates the problem I face: Animal has a race, which can be a cat or a dog. Cat can be either Siamese or Persian. Dog can be a German ...
0
votes
2answers
32 views

How To Ignore SQL Update Notification

I have a very weird situation. One of our SQL Servers has a software update notification pending for Microsoft SQL Server 2008 R2 Service Pack 1 (KB2528583). However, this server is already at SP2. ...
1
vote
1answer
20 views

Copy related records from 3 tables to another 3 tables and maintain the relationship between them

I have 3 tables that sore orders, order items and order item comments . I need to copy the data for one order to 3 new tables that have the same structure and maintain the relationship. the order will ...
3
votes
1answer
159 views

Does the SQL Server backup process use a buffer cache?

When a full database backup command is executed: Does the backup process use only the memory that has been assigned to the SQL Server (instance)? Does the backup process "flush out" the page ...
0
votes
1answer
21 views

One to many size and performance

Is it worth to create a inverted relationship in order to have faster searches? My entity has 10 possible values on the Many side of the mapping, most of the time the 10 will be selected. Let's call ...
0
votes
0answers
38 views

Seeing multiple CXPACKET blocks when trying to load data from a INSERT SELECT

We are trying to load data and are getting multiple CXPACKET waits. The activity monitor says "running" however, it appears nothing is happening. I am selecting close to 5 million rows which I ...
0
votes
2answers
11 views

Creating a MySQL db from an Informix database

There is an existing database that was created in Informix. I would like to export it and then import it into MySQL. I tried to export it using dbschema and it created the dbase.sql file and several ...
1
vote
1answer
21 views

List with all visible meta data in AFTER UPDATE trigger

I have the following issue - something is updating particular table columns when such update is not allowed. I was not able to find the object (searching in T-SQL and ASP code, server jobs), so I ...
4
votes
0answers
28 views

Is there a way to suppress DBCC TRACEON/OFF messages in the Error Log?

We have quite a few dataloading processes that run throughout the day all day long. These processes are setting the 610 flag on for their connection then turning it off when they are done. Because ...
0
votes
0answers
8 views

Header is added when exporting column of type image with BCP to files

I export a column of type image to files using this command: EXEC master..xp_cmdshell 'BCP "SELECT file_name FROM file_table WHERE id = 11 " queryout "C:\bcpdir\test.xml" -T -N' In SQL Management ...
0
votes
1answer
30 views

Using pivot on datetime

I have the following table: Date,Type 2012-01-25 13:48:00.000,1 2012-01-25 13:49:00.000,2 2012-01-26 13:48:00.000,1 2012-01-26 13:49:00.000,2 I tried the pivot function to get this layout: 1,2 ...
0
votes
1answer
14 views

How to group by on two fields and count

CREATE TABLE IF NOT EXISTS `usuarios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user1` varchar(255) DEFAULT NULL, `user2` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT ...
5
votes
3answers
134 views

Corrupted mdf file causing the backup job to fail

We have ran into a problem with one of our SQL server 2008 databases. It appears that something is corrupted in its datafile and this has caused our daily DB backup jobs to fail. The last successful ...
0
votes
0answers
25 views

Combine 3 tables

I have 3 tables, they have in common row index, date, profile. These 3 tables each have partitions based on profile. I need to combine the data from those tables to produce a report at the moment I ...
0
votes
2answers
11 views

Using concat inside a stored procedure parameters

I have a stored procedure and function that accepts a varchar as a parameter and i have this code where i am using concat function in the parameters of such function and stored procedure. DELIMITER ...
-4
votes
0answers
26 views

personal database [on hold]

Normalize each of the following datasets by splitting them into multiple tables where repeating fields are placed into a separate table with a foreign key. For each dataset, show how many tables ...
0
votes
1answer
10 views

create federated copy of a table?

From the MySQL documentation : The basic structure of this table should match that of the remote table, except that the ENGINE table option should be FEDERATED and the CONNECTION table option ...
0
votes
1answer
30 views

How to check SQL database files for physical fragmentation?

I search the Internet and did not find clear explanation if I have to try defragmenting physical database files when my DB resides on SAN. I understand that there are tools and procedures inside some ...
0
votes
0answers
36 views

Query performance issues

I need help in improving the performance of the following query. It has the purpose to select one record out of a group of records with an identical ID (doublettes). Rules are that Date2 must be the ...
1
vote
1answer
19 views

How to change table with innodb/myisam engine to federated

In my.ini I added [mysqld] federated When I type in a shell show engines; I get this result: But when I try to change one of this tables which are on innodb engine to federated I get an error. ...
0
votes
0answers
13 views

Migrate database from server old to new server with centos [on hold]

I want to migrate to disclose new database that works with CentOS operating system to work on network
2
votes
3answers
123 views

Transaction Isolation level different threads massive number of Writes

I have a lot of threads that writing to DB some data in two tables. tbl_raw_data and tbl_parsed_data where tbl_parsed_data have foreign key to tbl_raw_data. I also need the writing to be superfast. ...
0
votes
0answers
10 views

first query on my table takes apx: 0 sec but taking too much time on or after 3 to 4 query

I have the following table in mysql database: CREATE TABLE `chronologicallists` ( `sno` int(250) NOT NULL AUTO_INCREMENT, `empSno` int(11) NOT NULL COMMENT 'Employee Serial Number', ...
0
votes
0answers
10 views

How to use SQLite3 in VB.Net 2013

I downloaded sqlite3 amalgamation source code from http://sqlite.org/2014/sqlite-amalgamation-3080700.zip I tried to compile sqlite3 amalgamation code with Visual Studio 2012 as Win32Project2 named ...
0
votes
1answer
19 views

update column without auto timestamp update

Hello everyone I have got a product stock table with a time-stamp column so the so any updated to that row will update the time stamp ,I'm happy with this setting but sometimes I want to update the ...
0
votes
0answers
20 views

What are correct database structure, variable names, types?

Here is my database ERR diagram I'm new to this and I'm creating a database for the following: Question and answer website The user will interact with only one question at a time. The user can ...
0
votes
1answer
22 views

Difference between FIND_IN_SET and LIKE

is there a difference in behavior or performance in choosing FIND_IN_SET over LIKE for a operation that looks like: SELECT * FROM my_table WHERE column_1 LIKE %string% vs SELECT * FROM my_table ...

15 30 50 per page