0
votes
0answers
6 views

Diffrent column for different conditions when joining

I have MySQL database with two tables, relation is one to many. One table is product table, sample data: +----+----------+ | id | name | +----+----------+ | 1 | product1 | | 2 | product2 | ...
0
votes
1answer
5 views

SQL agent jobs appear as job id only

SQL Server 2005, I'm seeing about 100 'jobs' in the SQL Agent>jobs node in SSMS. They appear as hexadecimal strings not with their real names: If I query msdb..sysjobs, I see a much smaller list of ...
1
vote
1answer
16 views

Inconsistent MySQL query execution times

We run tests on two servers: one in production [Old Server] and the other one in tests [New Server]. Both tests used the same database. [New Server] Dedicated MySQL 5.6.17 server on Ubuntu 14.04 ...
0
votes
0answers
11 views

How to move 200 materialized views without having to re-create in the new home

I am moving a database with 200 materialized views into a new server. All of them are 'fast refresh' materialized views , means they have corresponding materialized view logs, in this case sitting on ...
0
votes
0answers
3 views

Mongo large chunks will not split

I had a 3 shard set up, and ran out of capacity, so I added 3 more shards. (Each shard is a replica set). But the data isn't spread across the cluster evenly. I have my chunkSize set to the standard ...
0
votes
1answer
16 views

Determining Homogeneity by Common Foreign Keys

I manage a MySQL database of ten or so tables. In higher code, I have a list of primary keys belonging to entries of some table A. These A entries have foreign keys to entries in another table B. The ...
1
vote
0answers
16 views

Conceptual model vs Logical model vs Physical model

I'm doing a work about database, and now I need to show three different images, one image with the conceptual model, other with logical model and other with physical model of a database. I'm looking ...
1
vote
2answers
70 views

Joins between linked servers are dangerous, so can we just load the data into a local table before doing the join?

I was just reading the following article which states that it's a worst practice to do JOINs between two linked servers. The only alternative I can see is to get the necessary data from both linked ...
1
vote
1answer
21 views

mysql server cannot launch in windows 7

I have been using MySQL as a windows service successfully on my windows 7 machine for perhaps a year. It has always worked fine. Here are the steps which I think caused it to no longer launch: ...
1
vote
1answer
37 views

Change rowguidcol property to a different column

In my SQL Server 2008 database, I have a table with two uniqueidentifier columns. CREATE TABLE MyTable ( Col1 uniqueidentifier rowguidcol not null, Col2 uniqueidentifier not null, ...
2
votes
1answer
24 views

WHERE attribute having two relation lines in the same SQL

I have a database designed with tree tables: checklist (id, name) tag (id, name) checklist_tag (checklist_id - FK, tag_id - FK) Running this SQL: SELECT cc.id as checklist_id, cc.name as ...
3
votes
3answers
31 views

Adding non-nullable NEWSEQUENTIALID() column to existing table

In SQL Server 2008, I am adding a non-nullable column to an existing table, and want to make the default NEWSEQUENTIALID(). ALTER TABLE MyTable ADD MyColumn UNIQUEIDENTIFIER NULL CONSTRAINT ...
0
votes
0answers
16 views

Lookup tables with long lookup values?

If I have a table with long lookup values, like 50 characters for example, is it better to put those in a descriptive column and come up with shorter names for the actual values, possibly to show in a ...
2
votes
1answer
36 views

Conditionally join table

I'm new to database design and have designed a database that seems fine for the application but looks like it has a major red flag to me. I have a master table which is then joined to another table ...
4
votes
1answer
55 views

Incorrect result when you execute a query that uses WITH RECOMPILE option in SQL Server 2012

I just read the Brent Ozar Weekly Links email (July 28th Edition), and noticed the "Kendra's Link" talking about "Fix: Incorrect result when you execute a query that uses WITH RECOMPILE option in SQL ...
0
votes
0answers
10 views

Middleware management admnistration [on hold]

Iam working in domain middleware management in my company. Which is the combination of technologies weblogic, IBM websphere, IIS, 10g, and ERP. which is the best i have to choose as my primary ...
0
votes
0answers
15 views

Apache mod_authn_dba with Oracle on Windows

How can I configure Apache to authenticate against Oracle dbms? According to [1][http://www.helicontech.com/articles/connect-mod_dbd-with-databases/] "Oracle database is natively supported. No ...
0
votes
1answer
34 views

Case always returns null?

I have a subquery that gets the DATEDIFF of two dates. However the first case always returns null yet the actual sub query returns dates?! CASE WHEN [date1] > [date2] THEN ...
1
vote
0answers
10 views

Spatial Index ignored when using additional non-spatial conditions

Why does SQL Server ignore my spatial index when I use additional conditions? If I add an INDEX hint it will use the correct index, and runs a lot faster. I would like to avoid using the hint if ...
0
votes
1answer
13 views

Problem with MySQL Cluster in practice

I am researching MySQL cluster. For the purpose, I do a demo with 4 virtual machines. I have some problems in practice. Topology My topology contains four nodes Node 1: management node, ip address ...
1
vote
1answer
21 views

In MySQL how do I grant a user access to a read replica only?

I have some users that I want to grant read only access to my database so I setup a replica server, but I don't want to grant them access to the master. I'd assume that this is a common use case, but ...
1
vote
1answer
18 views

Missing the pg_ctl package in Postgres 9.3 installation

I have installed postgresql 9.3 on ubuntu 14.04 using "apt-get install postgresql". Everything was going well until I discovered that I do not have access to the "pg_ctl" commands. Installing the ...
0
votes
2answers
53 views

Reading Data from SQL Server database

I want to read data from each cell of database. If the corresponding value is encountered then I have increment a variable count for that corresponding variable. Consider the following table Ques1 ...
0
votes
1answer
22 views

Parent/Child table design?

Lets say I have a table to hold Tasks and then I have a table to hold Sub Tasks, is it better to break Tasks and Sub Tasks into separate tables or keep them both in the same table with a possible ...
0
votes
0answers
9 views

Procedure with return value on SQLAnywhere16

I want to create a procedure, which is returning the type of a column. I've tried so far: CREATE OR REPLACE PROCEDURE __get_columntype(@tableName varchar(255), @columnname varchar(255)) RESULT ...
0
votes
0answers
15 views

Oracle dbms_datapump removes dumpfile after succesful import

I'm working on a PLSQL script to import a Oracle datapump dumpfile using the dbms_datapump package. Each time the script has succesfully imported the contents of the dumpfile I notice that the ...
0
votes
0answers
12 views

Import xml data into postgresql table [on hold]

I've got xml file with data : <teryt> <catalog name="TERC" type="all" date="2014-01-01"> <row> <col name="WOJ">02</col> <col name="POW"/> <col name="GMI"/> ...
0
votes
0answers
5 views

Data Migration or Sharded Cluster to new Cluster

We have Sharded Mongo Cluster. However some documents are sharded and others are unsharded. We are planning to migrate these databases to new cluster. Please update if there is any process or steps ...
0
votes
0answers
11 views

utf8mb4 in SQL Server Express

We have some web applications based on databases using utf8mb4 as character set and utf8mb4_Standard as collation. We saw that we can use any character we want with this setting. In SQL Server ...
0
votes
0answers
5 views

MongoDB syncingTo change

I have a 3 members replica set version 2.6.1 with following configuration "_id" : 0, "host" : "10.125.16.22:30000", "priority" : 2 ...
0
votes
0answers
49 views

1 TB Database import, best options? [on hold]

Friends, We have received 1 TB external hard drive with 750 GB MS SQL server zipped backup file in it from our client. We need to import this database at our end and then write programs to retrieve ...
0
votes
1answer
27 views

Select IDs according to CSV file

I have a CSV file with IDs of rows. I want to use that to make a SELECT statement selecting the IDs within that CSV file. There is 1 million rows and I want to select about 95,000 of those. I want ...
3
votes
1answer
37 views

Sql Server Management Studio login prompt will never forget other sql user than SA

When I login to a database, using some other user than SA, that username will stick the next time I login. If I then input the username SA and password and logs in, the next time I open the login ...
1
vote
1answer
37 views

Fixing an error 9004 without taking the database offline

My database (SQL Server 2008 r2) is running fine but I’m getting the following error in my event log. Error: 9004, Severity: 23, State: 6. An error occurred while processing the log for database ...
0
votes
1answer
57 views

Need to get the first 15 rows from 200k rows of data fast [on hold]

I have 3 tables with a lot of data (each one has 100k rows). I used UNION to get data from that. It takes more than 5 seconds as wait time in server to load the first page. I need only 15 rows from ...
2
votes
2answers
44 views

Help reading deadlock XML

Even with reading the Bart Duncan blog about reading deadlocks I still struggle with this. I have included the XML from a particular deadlock. <?xml version="1.0" encoding="utf-8" ?> - ...
2
votes
4answers
61 views

Large table with historical data allocates too much of SQL Server 2008 Std. memory - performance loss for other databases

Based on this question and the answers given: SQL 2008 Server - performance loss possibly connected with a very large table I have discovered memory allocation problem with SQL Server 2008. ...
0
votes
0answers
18 views

Best Practice for database design (storing images to a database) [duplicate]

I am currently developing a webpage for a real estate (using Java server faces) ,so it is essential to store images connected to its house. I am using mysql workbench and I really have a hard time ...
1
vote
2answers
28 views

Store n:m data with most n:1 tuples

I have these tables: create table data ( id int identity not null, ref int not null ); create table reference ( refid int not null ); with ~2 million rows in data and ~200k rows in ...
0
votes
2answers
35 views

Transaction Log Shipping across multiple SQL Server versions

I'm lead to believe that TLS is only appropriate/supported across the same versions of SQL Server. What I'm trying to do is to maintain a reporting (read only) version of a production transactional ...
0
votes
2answers
26 views

Get the table affected by the query

How I can get the table which is affected by the query? Example Update cust Set name = 'john' Where custid = '4001' Output: cust ___________________________ Insert into emp(fname, lname) ...
0
votes
1answer
34 views

Oracle Triggers - Before Update and Before Insert - Separate or Combined?

I'm running Oracle DB 9i. I have a table with various constraints to ensure data integrity. In addition to the constraints, I have triggers on BEFORE INSERT and BEFORE UPDATE to ensure that ...
0
votes
0answers
16 views

wp db issue, need help selecting table values

Hey I am trying to figure out how to select only those items that have same ID but different values in another column. it's Wordpress database structure. My table sample would look something like ...
0
votes
1answer
18 views

Get the most present elements from many fields

Here is my table: id|item0|item1|item2 --+-----+-----+----- 1 | 10 | 12 | 12 2 | 12 | 68 | 13 3 | 15  | 13 | 10 I just want to get the most present number of all itemX columns. The query ...
0
votes
1answer
24 views

MySQL Syntax Error When Creating a Trigger

I am trying to create a trigger but I am getting a syntax error and I am not really sure why I am. CREATE TRIGGER Section_Insert AFTER INSERT ON Section -> FOR EACH ROW BEGIN -> INSERT ...
0
votes
0answers
7 views

How does memcached bucket behaves when fully loaded?

What is the default ttl of a key in memcached bucket? Also, what happens when a bucket is full? I created a 256MB RAM Bucket and tried to overload it by sending infinite set queries till error is ...
-1
votes
2answers
40 views

SQL Server 2012 Browser Service doesn't appear [on hold]

I've installed SQL Server 2012 and Management Studio Express. I attached the database that belongs my previous Project in Visual Studio. But I am having SqlException Error , I think the reason of the ...
1
vote
1answer
34 views

Why does adding a column to a MySQL table take incredibly long?

I am using MySQL version 5.6 and I have a database that is in total around 110 GB in size. One of the tables, "outputs" is 49 GB in size. I tried to add a simple BOOL column to the outputs table with ...
0
votes
0answers
20 views

Should I separate my preferences table?

I have a hobby site where users can find other hobbyists of similar interest. Each user can set a series of preferences that get saved into user_prefs. Right now there are 4 types of preferences, an ...
1
vote
1answer
39 views

Cluster Size Configurations for SQL Server at RAID Level

I was reading the below two articles (one of which I posted) and one recommends to use a RAID cluster stripe size of 256k while the other recommends to use 64k. There is a big difference between the ...

15 30 50 per page