1
vote
2answers
92 views

WITH Clause UNION Issue

WITH [ProgressInvoicesPeriodCost] AS ( SELECT ProgressInvoices.ProjectId , ProgressInvoices.PeriodId , SUM(ProgressInvoiceDetails.TotalThisInvoice) AS TotalThisInvoice ...
0
votes
1answer
26 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
19 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
15 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
1answer
37 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
15 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
1answer
38 views

Don't know how to transform variable entity 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
38 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
22 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
167 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
0answers
27 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
1answer
44 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
13 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
30 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
1answer
13 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
31 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 ...
1
vote
1answer
16 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
180 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
27 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
14 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 ...
1
vote
1answer
17 views

Is it possible to automate the creation of multiple FEDERATED tables in MySQL?

From the MySQL documentation on creating tables for to access data on a remote MySQL server using the FEDERATED storage engine: The basic structure of this table should match that of the remote ...
0
votes
1answer
33 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
37 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
127 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
11 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
12 views

How to use SQLite3 in VB.Net 2013 [on hold]

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
23 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 ...
0
votes
1answer
38 views

SQL database disaster recovery in a second datacenter using storage

I have the following: Data Center (1) has a set of two Microsoft SQL database servers. They are clustered using MSCS and shared NetApp storage FAS3250 system. This provides me with local ...
1
vote
1answer
30 views

Stop on error in PL/SQL developer or Oracle SQL Developer

At this time I am using TOAD to apply SQL*Plus scripts and there is an option to stop on the first error. After it I can fix the script and apply the remaining part. Due to license issues we can't ...
1
vote
1answer
26 views

Foreign Keys to tables where primary key is not clustered index

I'm focusing on SQL Server here, but I think this is a database agnostic question, really. I have a table whereby a Guid is logically the primary key. However, uniqueidentifiers apparently make ...
0
votes
0answers
4 views

Whats the best practice when using Amazon Redshift as a cache

I have tested Amazon Redshift as a cache. So I save data by a key. But with the time the cache becomes slower and slower. Once I do a VACCUM on the database it get backs to the speed. But should i run ...
2
votes
1answer
60 views

How to solve SIDs mistmatching in SQL or orphaned users?

I moved and restored a database from a backup into another SQL Server 2008R2 about a year ago. I wasn't aware of the concept of orphaned users. From what I understood, is that we can end up having ...
0
votes
1answer
13 views

Accuracy of mysqldbcompare vs other tools like pt-table-checksum

I was curious to hear what everyone's experiences are with using mysqldbcompare vs pt-table-checksum( from Percona Toolkit ) to find the differences between two MySQL databases. I have heard that ...
0
votes
0answers
13 views

How to install Slony for 64-bit PostgreSQL 9.3 on Windows?

I have installed 64-bit version of PostgreSQL 9.3.5 from EnterpriseDB installer. Now I want to install Slony-I through Application Stack Builder, but it offers only 32-bit version of Slony, ...
2
votes
0answers
42 views

work/cache table issues, heavy inserts with heavy reads

we have a work table that stores availability of products. This table is updated with millions of inserts every night and medium amounts of inserts throughout the day. during the updates, we delete ...
0
votes
0answers
10 views

mysqldbcompare shows checksum fail but row differences passes between MySQL 5.1 and 5.6 databases

I have started to try using mysqldbcompare to help me compare two databases(one is MySQL 5.1.73 and the other MySQL 5.6.21) that are each about 5 gigs with lots of tables, but the databases are ...
0
votes
1answer
39 views

Invalid object when selecting from temporary table

I'm creating a temporary table called #PrevStatus. I've confirmed that the create statement is correct. When I run, exec (@TableQuery) which contains the table create statement and then right ...
0
votes
1answer
17 views

Issues with self signed certificates, SSL and MongoDB

Note: As specified in my comment I've figured out a solution to this issue regarding a single client/mongo connection. The next step is to figure out a solution for a replica set involving this fix. ...
1
vote
1answer
48 views

What should I monitor on the SQL Server machine? [on hold]

I need to create some alerts, logging jobs and monitors on a machine that is going to run SQL Server 2012 Standard for an ERP system. The OS will be Windows Server 2008 R2 Standard/Datacenter (if it ...
0
votes
0answers
14 views

I cannot add oracle listener with windows server 2008 r2 [on hold]

how to fix It failed in the execution of "Srvctl.bat". Details of error
0
votes
1answer
13 views

MongoDB replica set - no election after primary node failed

For testing I killed the primary node of my two-node replica set while the cluster was under heavy write load. I was expecting the secondary node would take over after a few seconds, but this isn't ...
0
votes
0answers
13 views

MongoDB status says all 3 replica are secondary

I've been testing usage of the replica set feature in MongoDB. This morning I tried connecting to the DB, and found that I wasn't capable of doing so. I consoled in to get the rs.status() and got ...
0
votes
1answer
36 views

Index file - size changed

I realised today that my index file(which is about 250GB) is smaller than yesterday for about 7GB. Everything, I done in the meantime, was index rebuild. Is it possible that index rebuild is the ...
-3
votes
1answer
18 views

Disk space Report for CMS [on hold]

I want to take the disk space report from centralized server with the help of CMS i have to run that query & i want the query for last errorlog report for all the servers in CMS, can i have the ...

15 30 50 per page