0
votes
1answer
110 views

Postgres recovery.conf options

I am setting up Postgres binary replication. In my slave's recovery.conf, I am suggested to have 2 options. I am wondering if the directory specified in restore_command and archive_cleanup_commands ...
0
votes
2answers
172 views

mysql forbidden database names

I was wondering whether there were a list of forbidden (reserved) database names in mysql. For instance, mysql is obviously one. But is there a determinated list? I don't want to cover 99% in my ...
1
vote
2answers
231 views

Disk write in iotop when doing mysql “Copy to tmp table”

I have just moved servers from a two-server configuration with the application and database server running separately to a one-server LAMP stack. Unfortunately the issue that I have encountered on ...
0
votes
1answer
79 views

Backup live MySQL database

I have a single MySQL database Server version: 5.5.35-cll MySQL Community Server (GPL) ENGINE is MyISAM I use 'mysqldump' to backup and restore the database. Size of the dumpfile is 3GB+ Once a ...
2
votes
1answer
105 views

What Happens when Cartesian Product is applied to Relations with same attribute name

I understand that the Cartesian product(X) operation on two databases does not need to be UNION compatible.So,if there is a same attribute called name in the two relations R and S where name in R is ...
0
votes
0answers
36 views

Advice on designing databases for things like Posts and categories; and general rule of thumbs [duplicate]

I'm creating my own website with a capability to CRUD posts and other related stuff like category, tags and other things (I believe it's similar to the first two mentioned). Posts: (current create ...
2
votes
2answers
517 views

Return ID from partitioned table in postgres?

When I insert a record I need to return the inserted id by RETURNING. The problem is that the table is partitioned and in partitioned table I can't use RETURNING. I run multiple queries at once so I'm ...
3
votes
3answers
331 views

Why does data get corrupted in “large” text files - Reasons to use database

I am just starting to learn about databases and using mysql. I read that databases are more reliable than having large ascii text files and that ascii text files are more prone to corruption as they ...
4
votes
1answer
3k views

MySQL failing and very slow on importing a large file

I have a 47 GB MySQL dump of a single table: http://dumps.wikimedia.org/commonswiki/latest/commonswiki-latest-image.sql.gz I ultimately want it into PostgreSQL, but since I didn't figure out an easy ...
2
votes
1answer
473 views

Check constraint for Canadian postal code?

Is there a way to check if a Canadian postal code is valid? Not sure if something like this would work: PostalCode varchar(10) CHECK(PostalCode>='t1w1v1' and PostalCode<='t9w9v9'
0
votes
1answer
33 views

design DB review and check constraint for postalcode help?

Hi. I created this database to just to sharpen my skill. I have one Question - when I create I make the FOREIGN KEY personID in Addresses table but I changed it to be AddressID in Persons table ...
1
vote
1answer
535 views

ORA-12541 error while connecting to oracle express edition 11g

My oracle express edition was working some months earlier. I dont know what i changed in the system, now I could not connect to it. I tried logging in from sqlplus as sysdba and altered the accounts ...
0
votes
0answers
40 views

Issue: PLS-00103

I have a package body: PACKAGE BODY "PKG_SYNONYM_TEST" AS type t_table as object ( synWord varchar2(500) ); type t_nested_table as table OF t_table; function search1(i_string varchar2) RETURN ...
0
votes
1answer
564 views

Should I place my Quartz Scheduler tables in a separate database?

I am designing a web application that uses Quartz Scheduler to scheduler jobs. I have Quartz configured to use a JDBCJobStore, so it automatically stores each created job in its tables. I am ...
1
vote
2answers
677 views

Move a huge databases from one SQL Server to another

I have customers databases located on my SQL Server 2008 machine. The size of these databases are around 300 GB. I would like to move them all to another SQL Server 2008. Is there a way to shrink ...
2
votes
1answer
418 views

How can I use running total aggregates in a query to output financial accumulations?

I am attempting to write a query that will be consumed by a SSRS 2012 report. Given a paid invoice, with a certain set of account allocations towards which the money paid towards it must be saved, I ...
0
votes
2answers
63 views

How to create several builds of PostgreSQL?

I'm building PostgreSQL(version 9.3.1) from source code in Ubuntu. I'd like to create several builds of Postgres, like pg1, pg2, etc. How can I do it? Thanks in advance.
1
vote
0answers
51 views

Does union all have an enforced ordering

I know that a union does a de-duplication so can jumble the results, but I can't find a definitive answer for union all Example query select id from ( select id from table where id = 1 union all ...
1
vote
1answer
52 views

Understanding the output of \d <table> in psql

Say I run the following command: \d mtb.big_table I get the output shown below. My questions are: What are column modifiers? (what does default now() mean?) Under Indexes, Why do some indices ...
2
votes
1answer
131 views

Turn Off Alerts

We have a SQL Server 2008 R2 database instance running on a VM. Nightly, between 10p and 12a, we are getting the following error message: DATE/TIME: 2/3/2014 10:16:37 PM DESCRIPTION: Database ...
0
votes
2answers
107 views

How to determine how much disk-space postgresql 9.1 requires as temp_space to run a query?

Given a query q to execute. Is there a way to determine how much disk-space postgresql will (or used) as temporary_space in order to execute it (during its execution) ? I'm under Ubuntu 12.0.4 with ...
0
votes
1answer
1k views

Difference between oracle database desktop and server class

I installed oracle database 11g enterprise edition to my laptop. When I was installing oracle, at the beginning I selected Desktop Class (not server class) option. Now I am trying to make remote ...
2
votes
1answer
181 views

Copy FileGroup to Another FileGroup

we run Microsoft SQL Server 2008 R2 on production server. We need create new tables and load a big amount of data on them (roughly 1 TB!) I am wondering if it is possible to insert this dataset on ...
1
vote
0answers
129 views

Can somebody check this normalisation workings i think i am missing a step or a dependency somewhere

given these two tables: and: I need to first list them as an un-normalised structure(s) then i need to identify the functional dependencies/primary keys. Once i have done this i must represent ...
1
vote
1answer
7k views

MySQL Error: impossible to write to binary log

I have a system (inherited from another development company) and I don't know all its features yet. Construction: - web client/application (symfony 1.4) - DB - MySQL. Project is deployed on 2 ...
1
vote
1answer
309 views

Linked Server - login trying to access database that is not default

Trying to create a linked server from server A (2005) to B (2008 R2). Everything worked when created. The login on server B was mapped to two databases: DataBase1 and Database2. Database1 was the ...
1
vote
1answer
831 views

Why does mongodb virtual memory get so large

I have just compiled MongoDB in my linuxOS and not insert any data into DB. The virtual memory is getting very large, about 40G. ps aux|grep mongod mongodb 176574 0.0 0.0 423784 39008 ...
4
votes
2answers
717 views

Insert RECORD into a table in a trigger function

I would like to insert a RECORD data type variable (NEW variable) into a table in a trigger. What would the SQL look like? The following attempts were unsuccessful: EXECUTE 'INSERT INTO my_table ...
3
votes
1answer
83 views

Simple method to setup SQL Server for development access

I've created a virtual development box and installed SQL Server 2008 with mixed authentication. Then I connect to SQL Server via SQL Server Management Studio using my Windows account but when I try to ...
7
votes
3answers
7k views

SQL Calculated Field in both SELECT and GROUP BY clause

Often in querying my MS SQL Server databases, I need to create a calculated field, such as this (CASE WHEN A.type = 'Workover' THEN 'Workover' ELSE (CASE WHEN substring(C.category, 2, 1) = 'D' ...
0
votes
0answers
632 views

What problems can be caused by dropping a rollback segment manually?

Oracle version: 11.2.0.1 I have the following error: "Transaction recovery: lock conflict caught and ignored" I can't upgrade my database now. I had a RAC. Removed one node, but the undo tablesapce ...
4
votes
1answer
122 views

Settings for a MySQL backup only slave instance

I have two instances of MySQL running one a server, set up as master and slave. It's all working smoothly together and I'm only using the slave instance for backups to avoid locking up the live ...
0
votes
1answer
239 views

Problem connecting to AlwaysOn Cluster

Good day, I created a AlwaysOn HA cluster in Azure, 2 Server 2012s both with SQL 2012 Ent updated and patched on the same subnet.. These are the guides I followed: Tutorial: AlwaysOn Availability ...
5
votes
1answer
493 views

How to avoid a race condition with cross db proc calls? and other concerns

I am not even sure this question is necessary but I am curious to know everyone's thoughts. I have two databases on the same server, dbFoo, dbBar. dbFoo has the following table please note this is a ...
1
vote
0answers
3k views

Oracle restore backup on other server

I have following situation: One server with Oracle has to be backed up and recovered on other Oracle server. Second Oracle DB has the same user/schemas, but with a different older data. I intend to ...
0
votes
1answer
772 views

ORA-44001: invalid schema

I have a db dump which containts db dump for three schemas for e.g. alpha bravo charlie in one file, exported through EXPDP. now when i am trying to import these through following command: IMPDP ...
1
vote
1answer
815 views

SSIS: Get Date for Day of the Week

In SSIS, how do I get the date for a specific day of the week? For example, how do I get last Sunday's date? I assume I have to do some subtraction on the day-of-week, but not sure: DATEADD("d", ...
0
votes
1answer
1k views

Partition tables based on month and year in SQL Server

I have a sales table which I need to partition based on month and year of sales table structure S_ID numeric(18,0) S_CustID numeric(18,0) S_TotalCash numeric(18,0) S_Paid ...
1
vote
1answer
99 views

Recipe Health risk Database ERD structure

I have these tables: First table(Recipe table), Recipe recipeid(PK,AI) recipename ingredients Second table(Ingredients table), Ingredients ingredientid(PK,AI) ...
1
vote
2answers
774 views

Can I disable an account in mysql after x failed login attempts?

The question is in the title. I would like to disable accounts after x failed login attempts. Is it possible? Thank you
2
votes
1answer
249 views

Is there any way to save the execution plan in a file in PostgreSQL?

By saving a plan in a file, I don't mean to view it, but force the optimizer to use the saved plan to execute some query. For example, if the optimizer chooses to do a hash join for a two-table ...
1
vote
1answer
157 views

Is it possible to restrict SQL Server DB_Owner when connecting using SQL Server Mgt Studio? [duplicate]

Here is the back story. A developer created an EXE program. The exe program has the ability to access a SQL Servre database. In order to do that we create an Active Directory group. Let's call this ...
2
votes
0answers
188 views

Use Matlab or SQL Server to do mathematical computations? [closed]

Current situtation I am working with a dozen of CSV files containing financial simulations in form of 100'000x100 matrices. Each file is around 100Mb large. Until now, only analyse these files with ...
0
votes
1answer
598 views

Installing Oracle Database 12c in Windows 7, INS-08109 error [closed]

I'd like to learn PL/SQL so I'm trying to install Oracle. I downloaded the 2 zip files and extracted to the same directory. I run the "setup.exe" file and the install GUI starts: In step 1 I enter ...
0
votes
0answers
55 views

SQL snapshot and execution plans [closed]

I have a question.. when a query is executed the execution plan is compiled if the snapshot is reloaded does that mean the snapshot compiled is blown away? and if so is there a way to keep the ...
0
votes
0answers
163 views

Multiple update of records in the same table

I have an update query. E.g. UPDATE table SET name = ? WHERE id = ? Now I have all the relevant ids collected. What I am doing is looping over the ids and execute the update query for each one. E.g ...
1
vote
1answer
146 views

DB2 LUW Query Optimization - IXSCAN timerons greater than total timerons

Sorry - I feel like this is a newb question, but I can't find anything on it. In optimizing a query, I was able to apparently reduce the total timerons from 3,700 to 38. However, on closer examination ...
6
votes
3answers
999 views

Cube processing either takes too long or fails

I have a SSAS Cube with 35 dimensions and 10 measures. Some of the dimensions are quite large in size. In almost all dimensions data either get updated and inserted. Measures have high volume of ...
0
votes
1answer
329 views

Abnormally high MySQL writes and larger than normal Binary Log files. How can I determine what caused this?

We have a MySQL master database which replicates to a MySQL slave. We were experiencing issues where MySQL was showing a high number of writes (but not an increased number of queries being ran) for a ...
1
vote
1answer
427 views

automatic transactional replication failover to noce2 with AG failover

I am working on to set up high availability group like SQL01,SQL02,SQL03(DR) and SQLRPT01 as the reporting server which has our reporting DB. * From SQL01 to RPT01, I am running transnational ...

15 30 50 per page