4
votes
2answers
764 views

Poor performance after changing SQL Server 2008 R2 database

Need some tips on what I can do to track down this problem. My client has a modest sized SQL Server 2008 R2 database (approx 6 gigs in size). Last week I modified the database to add new a single new ...
0
votes
1answer
597 views

Unable to restore database in Oracle 10g

I created a database backup using the expdp command in Oracle 10g. The backup appears to be created successfully. However, while restoring using impdp command I get the following error message. ...
6
votes
2answers
28k views

way to prevent queries from waiting for table level lock

We've encountered a problem after moving the database of our customer to an extra server. This should have had positive effects on the site's performance, but there is a problem with table locking in ...
1
vote
1answer
2k views

Install db2 express c on Mac OSX

I have posted the question yesterday, then I was able to figure it out by myself. As I haven't found any complete guide, I'm writing down the steps just in case. So the question is: "How do I ...
1
vote
2answers
744 views

LIMIT to one row per ID

This query gives me multiple hits because of each assetid may contain many vb.title. How can I limit the result to only 1 hit for each assetid? 'select DISTINCT v.id, v.purchasedate, ...
2
votes
2answers
119 views

Long JOINS Returns No result all tables have one to many relationship with a particular table [closed]

I have a Table Enterpries with Primary Key 'RCNO'. All other tables have a one to many relationship with Enterprise via it's RCNO column. I make a Join of all the tables and i get nothing. Below is ...
10
votes
2answers
5k views

SQL Server Decimal(9, 0) vs INT

One of our customers uses for some columns the datatype DECIMAL(18,0) in his SQL Server 2008R2 database. Because the columns grow quite slowly, he recently proposed to change the datatype to ...
0
votes
1answer
264 views

postgresql dump and load — need to dump “postgres” db also?

If I pg_dump a db from an 8.4 cluster, and then load it into a different 9.1 cluster, do I need to pg_dump and restore the 'postgres' db as well? (I'm not familiar with what is contained in the ...
2
votes
4answers
233 views

What free database software support sequences [closed]

I have a requirement that a database must support sequences. I know oracle and PostgreSQL support it. Are there any other free database software that support database sequences? it would be great if ...
2
votes
2answers
2k views

Tempdb autogrowth settings

Following on from a recent question that I asked on Tempdb. I was wondering how to correctly set the autogrowth property when adding and moving the tempdb files? I ask because I would like to let SQL ...
2
votes
1answer
103 views

Want to select distinct from 3 fields

I have a mySQL table with a town_id and 3 categories - cat1, cat2, cat3. I need to be able to come up with a distinct list of all the categories in the table selected by town_id, not duplicated and ...
1
vote
1answer
236 views

db2 express c mac osx

I'm experiencing some troubles with the execution of DB2 express c on Mac OSX 10.6 Snow Leopard. I have installed the db system, creating two users, db2 and db2-user. The latter is the instance ...
0
votes
1answer
4k views

Oracle Forms Runtime error

When I am running a form in Forms 11g http://rahulsingh-pc:8888/forms/frmservlet I'm getting an error: Failure of server APACHE bridge: No backend server available for connection: timed out after ...
2
votes
1answer
1k views

How to verify postgresql db restore from pg_dump file

How can I verify that my restored database is identical to my original database? Here's what I did. Is this a valid way to verify a restore? # dump mydb_orig: $ pg_dump --cluster ...
10
votes
2answers
5k views

Good way to call multiple SQL Server Agent jobs sequentially from one main job?

I've got several SQL Server Agent jobs that should run sequentially. To keep a nice overview of the jobs that should execute I have created a main job that calls the other jobs with a call to EXEC ...
5
votes
2answers
3k views

How to run specific version (8.4, 9.1) of postgresql pg_* command (e.g., pg_dump)

I have Postgresql versions 8.4 and 9.1 installed. For any given Postgresql command, how do I specify a specific version of the command to run? (e.g., psql, pg_dump, pg_ctlcluster, pg_restore, ...) ...
3
votes
1answer
1k views

User autoincrement ID for username

I want to automatically create user's, which all have a unique ID. Now here's the problem. If two users are created at exactly the same nanosecond, it may not cause problems. Thus, what i do now is: ...
3
votes
2answers
828 views

Optimizing real-time Database table in Microsoft SQL server 2008

We are using a web interface to monitor our jobs state and its started and completed timestamps. We have >200,000 job instances running on each day for different job run-users. We maintain the state ...
1
vote
0answers
180 views

Port no in Oracle Forms 11G

Which port number to be used in forms 11G Preference-->Runtime--> Application ServerURL Section? I have: 1521-Given at the time of database creation 7003 and 7004-Given at the time of WLS Domain ...
3
votes
3answers
238 views

Database tables design

If I have, in my Java code, the following classes: Patient :contains instance of anther classes (mentioned bellow) PatientBasicInformation: contains PatientId, phoneNumber, Name, Gender, Age. ...
2
votes
2answers
2k views

difference between having many non clustered index with single columns and with combination of many columns

Folks I am a newbie to DB design stuffs. I am wondering what would be the difference and performance difference between having designed many non clustered index with single columns and non ...
0
votes
1answer
300 views

Fill factor for later bigserial + index

I'm planning to import and update a huge table (3 Bil. rows) in the following step: create table with fill factor x import the data from csv files (6 files, ~21GB each) add a BIGSERIAL column create ...
2
votes
2answers
1k views

Why are parallel writes in MySQL as slow as sequential writes?

I have many MySQL write-only processes. They all go to the same MySQL master. I run them sequentially to get a baseline time. I basically chain together several mysql command-line clients, ...
2
votes
2answers
319 views

Stored procedure compilation blocking due to many parameters to sp_executesql

I am seeing blocking due to locks on compiling a particular stored procedure (as described in KB 263889). Basically, several processes are waiting with LCK_M_X on the same resource "TAB: ...
10
votes
5answers
8k views

SQL Server equivalent to functionality of Oracle RAC? [closed]

I did some Googling and couldn't find an answer to this question more recent than a few years ago, so I thought I'd ask. Oracle's RAC feature offers load-balancing for both read and write ...
3
votes
1answer
175 views

Database design - many to many

I have one MySQL table which contains: a question 4 possible answers separated by a comma a number (0-3) representing the correct answer. unique id with about 2000 entries. I also have another ...
4
votes
2answers
2k views

Recover PostgreSQL database from WAL errors on startup?

I'm trying to set up an OpenStreetMap server on an Ubuntu 12.04 machine using the Ubuntu packages listed at switch2osm.org. I initially installed and set up everything using a Northeast US-only map ...
3
votes
1answer
174 views

MySQL optimized query

Now I came across an issue, I have table as below: Task Id StudentId Marks 1 1 12 1 2 15 1 3 17 2 ...
3
votes
1answer
2k views

Version of Witness Server for mirroring SQL 2012

Can I use SQL 2008 R2 as a Witness Server for 2 instances of SQL 2012 Servers being mirrored?
3
votes
2answers
3k views

Mysql load from infile stuck waiting on hard drive

I've got a windows 7 64 bit machine that I'm using for some load testing of a mysql db. My program uses sqlalchemy to connect and run several load from infile statements on said database. These bulk ...
5
votes
2answers
387 views

Help with good RDBMS transactional schema design that mimicks a sports league

I need to design a data model for a typical RDBMS that will mimic the structure of your typical sports league. Architecturally my requirements are: Well normalized Transactional Application ...
3
votes
3answers
3k views

Cannot write to mysql database while select query in process

Running Mysql 5.1.57 on InnoDB, and have a database locking issue. I have two separate sessions connected to a single database MySQL. On the first session, I run a long SELECT query (technically a ...
1
vote
1answer
506 views

Help with getters & setters in PL/SQL

I am not a db guy, and I have a very beginner's knowledge bout PL/SQL. That being clear now the question: I have 2 tables one file level & another batch level. In a day, only 1 file_id is ...
3
votes
1answer
111 views

VARCHAR NULL storage

I read somewhere online and in a Microsoft Press book there is a field declaration attribute that can be used to indicate NULL VARCHAR values should not consume space at the leaf-level instead of ...
3
votes
2answers
2k views

Export as csv or xsl file from SQL Server 2008 express R2

I am basically LAMP developer got some assignment where SQL Server is required. I have installed SQL Server 2008 R2 Express and imported backup file in it. Now, I want to export user table in excel ...
4
votes
2answers
142 views

why SELECT is still using CPU & DiskIO?

I have a large database, about 30GB. In order to delete some data from a table (most data is in this table, simply because the # of rows), I have to do delete in batch. However, if I delete in too ...
2
votes
1answer
954 views

MySQL: AVG of defined variable per month

I need help with the following code: SELECT DISTINCT userid , count( userid ) as login_count FROM ( SELECT DISTINCT userid , ...
1
vote
1answer
310 views

Should indexes automatically be placed into their own bufferpool?

We work with DB2 LUW (specifically we are currently on 9.7 FP4) running on AIX. Per best practices from IBM, they recommend that when you build a table, you place the data, the indexes, and LOBs/LONG ...
5
votes
2answers
4k views

Differences between estimated and actual execution plans

I'm new to SQL Server and I want to tune my first query. In SQL Server 20xx, what is the difference between "display estimated execution plan" and "include actual execution plan" ?
0
votes
1answer
1k views

SSIS transfer SQL server objects task -> Foreign key constraint error

I try to copy a database from 1 server to the other to build a staging environment. I do this with SSID. First I delete the existing database on my staging server, create a new and empty one and then ...
5
votes
1answer
1k views

SQL Server 2012 Resource Governor Enhancement

In SQL Server 2012 what specific enhacement was made regarding controlling memory usage by using Resource Governor. Up until SQL Server 2008 R2 resource governor was only able to control memory ...
5
votes
3answers
6k views

SQL Server Management Studio Express 2012 “ONLY”

I have installed SQL Server Express(SSMS) 2012 with management tools. After a few months, the Management studio has stopped working. The error is: «« Evaluation period has expired. For more on how ...
1
vote
1answer
90 views

Storing many small - and a few large - strings in an RDBMS

Let's say I have a table, and (among other things) it needs to store a large number of strings. Most will be small (20-100 characters), but a few will be quite large. Reads will be frequent, writes ...
2
votes
2answers
404 views

MySql Vs. Postgresql for a blog application

I am designing a blog application. Which of these fits better? In which use cases will mysql be good and for what use cases will postgresql be good?
3
votes
1answer
60 views

where varcharcol = 0 returns all rows

Suppose I have a table like this: create table mytable(cola int primary key, colb varchar(10)); Let's put some data in it: insert into mytable values(1, 'abc'); insert into mytable values(2, ...
4
votes
2answers
633 views

Does a cluster index provide more benefits than pre-sorting the load file and creating non-cluster index?

Informix 11.70.TC4DE: CREATE TABLE cluster_tbl ( fk_id INT, data CHAR(2048) ); LOAD FROM "presorted.ld" INSERT INTO cluster_tbl; CREATE UNIQUE CLUSTER INDEX cl_idx ON cluster_tbl(fk_id); ...
8
votes
2answers
7k views

Slow MySQL Database Import with mysqldump and USE .. SOURCE

I have about 12 tables in MySQL innoDB, one of them has 11 million records in it. I used this command to back things up: mysqldump -u [USERNAME] -p [DBNAME] | gzip > [/path_to_file/DBNAME].sql.gz ...
1
vote
1answer
252 views

Archive table does not work

I have a 19GB archive table that is working as expected on one server. I copied the following 2 files to another server. The table is not working on the new server. r_mi_raw_20120712.ARZ ...
0
votes
1answer
587 views

PostgreSQL vacuum duration on a big table

I have a very big table in my postgreSQL (over 300 million rows) that has never been vacuumed. Yesterday I tried a vacuum and analyze (not a full one) and it took about 7 hours to complete. Will it ...
3
votes
1answer
2k views

“Prelogin failure” when attempting to run stored procedure across linked server

I'm getting the below error when attempting to run a stored proc across a linked server that is going from Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) to Microsoft SQL Server 2008 (SP2) - ...

15 30 50 per page