3
votes
2answers
3k views

Can't drop UNDO TABLESPACE

We have Oracle 11gR1 RAC two instances on two different servers, new undo tablespace UNDOTBS20140508 created 30G, I want to remove the old one UNDOTBSX02, I did the following: CREATE UNDO TABLESPACE ...
9
votes
1answer
358 views

How do I 'hint' the cardinality of a recursive CTE?

I'm using the following recursive CTE as a minimal example, but in general, the optimizer has to use default 'guessed' cardinalities for recursive CTEs: with recursive w(n) as ( select 1 union all ...
3
votes
4answers
1k views

SQL agent job, why is the job history showing that a step is still running even though the job has completed

I have a sql agent job that runs Powershell as its first step (there are 3 steps in total). I have set this step to have 2 retries, with a 3 minute retry interval. When I look into the job history, ...
0
votes
0answers
112 views

Transactional Replication

SQL server 2008 R2. I have set up transactional replication on 40 tables in a database (other tables don't replicate). There was an issue in the morning and it is fixed now. I resynchronised the ...
1
vote
0answers
361 views

Loading image from file system into SQL query using openrowset

I have a directory with images and a table in my DB with the path of each file. The main application allow me to create reports where I can display an image, so I was thinking to use a query like: ...
1
vote
1answer
51 views

Why is logging “slow”?

On an empty transient table, inserting a single row took 50ms before changing it to UNLOGGED, 1ms afterwards. Why is this exactly? If the table structure is necessary, I'll post it, but it's only ...
1
vote
1answer
69 views

How do I automatically set meta commands when starting psql?

When I start a psql session, I would like certain meta commands to already be set. For instance: \x auto \set ON_ERROR_STOP on I was hoping to find an rc or config file but couldn't. The command ...
1
vote
2answers
6k views

How to outer join multiple tables to retrieve uncommon records

I'm trying to do an outer join in MySQL to identify records not common to 3 tables. Here's my current effort http://sqlfiddle.com/#!2/02b92/30 I'm trying to retrieve the records not common to all ...
2
votes
0answers
166 views

Postgres don't start after an unexpected shutdown

After an unexpected shutdown in postgres 8.4, I'm getting this error. couldn't open the file 'pg_xlog/....'. No such file or directory. invalid primary checkpoint record. Complete message in ...
2
votes
2answers
121 views

Need help performance tuning a query

Basically, here is the design of the table (the part that is necessary): id | dt -------- 1 | 2014-05-13 2 | 1900-01-01 3 | 1900-01-01 4 | 2014-05-12 5 | 1900-01-01 So what I am trying to do ...
0
votes
1answer
515 views

How can I pg_dump my database while excluding extensions?

I am trying to migrate my PostgreSQL 9.3 database to heroku. My database uses the UUID-ossp contrib extension I am not able to load my db onto Heroku because ERROR: permission denied for language ...
3
votes
2answers
3k views

Check if all record columns of 2 Tables/Query are equal

In SQL Server 2005, I would like to make one query that checks if all record columns of 2 tables are the same, Example: declare @tbl1 table(col nvarchar(50)) declare @tbl2 table(col nvarchar(50)) ...
0
votes
0answers
97 views

How does the optimizer of Firebird determine join order?

As Most query optimizers determine join order via a dynamic programming algorithm pioneered by IBM's System R database project, I was wondering whether the optimizer of Firebird uses the same ...
0
votes
0answers
57 views

Why do non-integer joins in MYSQL take so long?

It seems that every time I try to run a query using a non-integer join in MYSQL, it destroys the speed of my queries. Is there a better way to join on text fields (especially ones that could be cast ...
1
vote
2answers
1k views

SQL Server starts normally from Windows Services screen, but shows error through SQL Server Configuration Manager. Why?

I have a SQL Server 2005 instance that has worked fine for years. There have been no changes that I am aware of. Recently, I found that if I stop and then start the instance in SQL Server ...
0
votes
0answers
68 views

ORACLE 10.2.0.5 DB: How can I start replication of an existing schema into a new database with zero downtime

Please, note that I'm limited to Materialized view replication and datapump, so my question is whether the above can be done within my specified scope: Ensure no transactions in the database for ...
1
vote
0answers
62 views

New database server hardware and software inserts slower than old setup [duplicate]

We are upgrading our database hardware and software. The previous server is about 5 years old and is running SQL Server 2005 while the new one is SQL Server 2012. Every hardware component is faster in ...
0
votes
1answer
58 views

Linking Two database to execute join query

I have a remote odbc connexion and an MySQL database in my localhost i ask if there is a way to execute a join query ( linking the two database ) ? thanks.
1
vote
1answer
167 views

Checking if user owns child records (MySQL)

I am having a quite big problem with the following queries. The tables looks like: A (Parent) +------------+---------+ | id | user_id | value | +------------+---------+ | 1 | 20 | X | | 2 ...
0
votes
2answers
4k views

ORA-00119 & ORA-00130 when trying to startup Oracle

I'm having a problem with an Oracle database. Yesterday everything was working fine, I had an application that was using the database and there was no problem. At the end of the day I installed MySQL ...
4
votes
6answers
75k views

Connect to sql plus from command line using connection string

Let's say I have a Oracle database. I have a username = x, password = y, database = z. Also I know the port = a, SID = b, Hostname = c. So how do I need to connect correctly? I used many options ...
2
votes
0answers
133 views

plsql procedure gets invalidated

procedure involving dblinks gets invalidated regularly .we need to recompile every time.How to find what is causing the problem in my case procedure p1()--resides in db1 is begin .... select col1 ...
1
vote
1answer
65 views

Fastest way to set up MySQL replication from backup

Here's my scenario: I have a single database on network A that needs to be transferred to network B. on network B, I need a master-slave setup with 2/3 slaves. I need to run some significant updates ...
1
vote
1answer
1k views

Impact on SSRS of migration of SQL Server from 2008 to 2012

As part of my project, we are upgrading SQL Server 2008 R2 to SQL Server 2012. We have a separate SSRS 2008 instance running on a separate machine which interact with these existing 2008 database ...
1
vote
1answer
30 views

Is it possible to find the user whose aggregated score reaches X value first?

Given this sample fiddle containing sales value and date for two users: http://sqlfiddle.com/#!2/8148be/3 How can I find the first user who has reached a total saleValue of 30 since the beginning of ...
1
vote
1answer
176 views

Error updating zoned field from SQL Server stored procedure linked server to iSeries

I'm trying to update a table on an iSeries (AS400) within a SQL Server stored procedure using linked server, but it is failing when trying to update a column defined as zoned. In my stored ...
-2
votes
1answer
443 views

advantage database server current database name

How to get current database name in advantage database server? I don't know which query will answer this question. I have tried select top 10 * from system.logins but I got below error message: ...
1
vote
1answer
1k views

Removing Database from sharded cluster in Mongo DB

I Have a mongo shard db system with two shards and and three mongos servers.My application creates DB on daily basis as per our business requirements. We have some sharded collection in each day DB. ...
1
vote
2answers
2k views

What is meant by DDBB?

Today we got a term DDBB. I am not sure whether it refer normal database or database driver in certain programming language. Google search did not help me much in this. And I am sure it is not 'Dirty ...
0
votes
0answers
57 views

Relationship cardinality different in subclasses

I need to design a concert management database for as a class project. So far I defined an "Event" entity, subclassed in "Festival" and "Concert". Festival is intended to last one night or more and ...
-4
votes
2answers
44 views

How to view all logged user in mysql yog?

I want to see all loggin username in current local system in my sql Database using tool for SQL Yog.
0
votes
0answers
182 views

Using prepared statements in libpqxx with variable numbers arguments

I am trying to do some streamlining of a PostgreSQL database application. I am collecting data in a real-time setting using a Windows application and libpqxx. I would like to look into using ...
0
votes
0answers
1k views

Oracle 11g Instance that won't start

I'm in need of some help with an Oracle 11g instance that won't start. First of all, this is development instance so if it won't start it's not the end of the world, but it does have some useful data ...
1
vote
1answer
195 views

Very slow update with subquery (different tables)

I run this query to update "domains" table based on "log" table: UPDATE domains SET domains.mx_collected = 0 WHERE domains.domain IN (SELECT log.mail as domain_name FROM log WHERE `time` >= ...
1
vote
0answers
81 views

Why doesn't this query limit results by first and last name?

I have an ugly query, horrible table names courtesy of MySQL Workbench, and a severe lack of planning on my part to change to less verbose names prior to actually writing the code. Try to move past ...
0
votes
1answer
688 views

lsnrctl: cannot execute binary file: Exec format error [closed]

When I type lsnrctl from my command prompt the below error message is displayed: oracle@Gaurav:~$ lsnrctl bash: /u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl: cannot execute binary file: Exec ...
1
vote
1answer
3k views

Creating an SSIS package that uses a stored procedure

We're trying to make an SSIS package where it'll launch a stored procedure and capture the contents in a flat file. This will have to run every night, and the new file should overwrite the existing ...
0
votes
1answer
405 views

Query improvements without UNION

I have the following scenario. A users table, a records table and a memberships table. A user can be associated to zero or more records either directly with the records table records.user_id = ...
0
votes
1answer
187 views

Data compression with in memory OLTP

Will having data compression enabled decrease the amount of memory used by an in memory OLTP table? If yes I assume the CPU workload will increase.
0
votes
0answers
36 views

SQL Server 2008 database is not coming online after restore.. Pleae need help asap

I have restored a 1TB database and now it shows the restore completed 100% but the database is not accessible. sp_who2 has a SPID 50 performing this restore but current command its showing is ...
1
vote
1answer
68 views

How to perform almost the same query N times without rewriting it N times?

Basically I have a list of numbers like: 1,2,3,4,5 And I want to perform a query like this for each of the previous numbers: SELECT COUNT(*), field_name FROM my_table WHERE field_name = NUMBER ...
0
votes
0answers
150 views

Find out profile creation date

Our DBA says that a specific profile was created but we cannot find out its name (and it wasn't provided by the DBA). We want to find out by looking at the profile creation date. How does one find ...
0
votes
1answer
207 views

Is there a way to truncate the microseconds of a CSV value when importing data using LOAD DATA INFILE?

I'm loading data using LOAD DATA INFILE in 5.5 where the value includes microseconds. I must use DATETIME data type. Currently, I'm using regular expressions to remove them from the CSV prior to ...
0
votes
2answers
143 views

Buffer pool above 90% utilized causes MySQL to crash

Without getting deep into the architecture and setup, is it common behavior for MySQL to act in this manner? EDIT I'm using Rolando's script to identify how full the innodb_buffer_pool is. SELECT ...
-1
votes
1answer
92 views

Show all categories from CATEGORIES table [closed]

I have these two tables, categories and files And I have this query that shows only one result/row. SELECT `categories`.`category_id`, `categories`.`timestamp`,`categories`.`name`, ...
1
vote
1answer
421 views

Is it possible to do flashback after truncate?

Is there any possibility of doing flashback after truncate ? Thank you in advance.
1
vote
1answer
77 views

Oracle optional select value

I'm writing query to select students with their Program, Country and Teacher. So far, I have the following query: SELECT H.STUDENT_CODE, H.FIRSTNAME, H.LASTNAME, H.PROGRAM, ...
2
votes
1answer
3k views

Using OPENQUERY to execute a script

I have a SQL Server 2008 instance which I want to use to import data from an Oracle server. I have set up a linked server that works correctly when running simple queries like SELECT * FROM table. ...
0
votes
1answer
3k views

Airline reservation system [closed]

I'm making a simple airline reservation system. But I'm not sure about the design decisions I made. Concretely, I'm trying to implement following constraints: each Aircraft can have one or more ...
1
vote
1answer
234 views

How can I set block size on Oracle 11 when creating a database instance

Is there any way to configure Oracle 11g's default block size on installation? I have tried Oracle 11g r2 and r3, during both installations block size is 8k and it is disabled (and can not be ...

15 30 50 per page