1
vote
1answer
189 views

Sql Server Agent REPL Jobs

I know that replication uses Sql Agent jobs to pull subscriptions. Are these jobs supposed to stay in an 'executing' state? (Sql 2008 SP1)
0
votes
1answer
333 views

Sybase ASE doing showplan for all requests

We have a strange situation where we are seeing showplan information in packets returned from a Sybase ASE 12.5 database server to a JDBC client. ie using tcpdump we see showplan output being sent ...
13
votes
3answers
3k views

Does PostgreSQL 9.1 Streaming Replication catch up after a lag without WAL archiving?

Context: Let's say that, while using Streaming Replication/Hot Standby on a Postgres 9.1 cluster, a standby node goes down. It stays down for an day, during which time a lot of DML occurs on the ...
4
votes
1answer
2k views

SQL Server Mirroring vs 3rd party replication products such as DoubleTake

I'm charged with looking after several SQL Server instances, most of which use SQL Server mirroring to replicate data for DR purposes. I automatically script logins, roles & jobs to the mirror, ...
2
votes
1answer
1k views

Delete rows in a table that has multiple FKs

I need to delete all the rows in the ContentData table that have the word 'DV95' in the htmldata column. Here is what I am using: BEGIN TRANSACTION DELETE Contentdata FROM Contentlinks INNER JOIN ...
2
votes
1answer
508 views

Why is a duplicate record inserted when it should not be?

Why does this command insert into "deliveryLog" select * from temp_dellog where "deliveryID" < 15620652 give this output? ********** Error ********** ERROR: duplicate key value violates unique ...
1
vote
1answer
345 views

Buffer Pool and Multiple instances of SQL Server

If you have multiple instances of SQL Server running on the same windows server system, a) Does buffer pool is shared amount multiple instances? b) What is the effect of running DBCC ...
2
votes
1answer
4k views

16 Cores 12 GB RAM server MySql Configuration - my.cnf

The server takes 20+ seconds (wait time/slow IO response time) to response to a HTTP request even with memcached and APC installed. I believe this has something to do with MYSQL since the site as lots ...
2
votes
1answer
374 views

determining user types upon authentication

I've got 3 different types of users (entities) that will log into a website in developing for a client. "FITTER", "CLIENT", "ADMIN" the first method I came up with was this. CLIENT TABLE | ...
2
votes
1answer
353 views

MySQL Trigger problem with the email address (cause contains the @ sign)

I'm trying to set a trigger in a table (users) to "copy" the email address of a new row to another table (prova). Here is the trigger: CREATE TRIGGER inserisciemail AFTER INSERT ON users FOR EACH ROW ...
7
votes
3answers
278 views

How do you protect against malicious PREPROCESSOR attacks in Oracle External Tables?

I'm a new DBA and I recently found out about the option of External Tables in Oracle using the PREPROCESSOR feature ( ...
3
votes
2answers
4k views

Why Sqlcode 100 does not come with exception

I have following query in a PL\SQL procedure on Oracle 10.2: This is the code LOOP BEGIN SELECT a.poid_id0 into v_acc_account_poidid0 FROM account_t a WHERE a.poid_id0=i_acct_id0 ...
8
votes
2answers
12k views

Is there a simple way in PL/pgSQL to check if a query returned no result?

I'm currently experimenting a bit with PL/pgSQL and want to know if there is a more elegant way to do something like this: select c.data into data from doc c where c.doc_id = id and c.group_cur > ...
1
vote
3answers
333 views

Backup a portion of the database?

I have a database that is over 50Gb. I'd like to take a backup of this database, but I don't want a full backup. I need to extract some of the data for a development test db. Is this possible?
3
votes
1answer
7k views

Behavior of Varchar with spaces at the end

When I use a Varchar with spaces it ignores the spaces at the end. ex: declare @X varchar(50) This... set @X= 'John' ...is the same as... set @X= 'John ' It considers these to be ...
2
votes
2answers
33k views

ORA-01654: unable to extend index <name of the index> by 128 in tablespace <name of the Index tablespace>

I am not a DBA but have to resolve this issue. There are 2 permanent tablespaces in my Oracle 9i database. One for the tables and the other for the Indexes other than the Temporary and UNDO ...
5
votes
5answers
9k views

MySQL said “InnoDB: Initializing buffer pool, size = 128.0M”, does it mean it is using 128MB RAM?

I am just using a very few InnoDB tables (e.g. less than 1MB), but during MySQL startup, it said InnoDB: Initializing buffer pool, size = 128.0M Does it mean even I am using in such a small size, ...
4
votes
4answers
432 views

DB Optimization with 2 to the power of N - Approach clarification

This is a request for analysis and better performance approaches, one of my colleague has come up with an approach in optimizing the DB and it looks very impressive too. Can someone please let us know ...
1
vote
1answer
175 views

MySQL detect duplicate human names [closed]

I've been tasked with identifying a solution to help identify possible duplicates when inserting new user records into a MySQL database. Does anyone know of any cheap, preferably free, solutions? The ...
2
votes
1answer
13k views

Multiple left joins or subquery?

I'm working on joining multiple tables together to extract some data related to user "runs", this includes basics like runID, username etc but also joins to the run times and favourites. I have the ...
0
votes
1answer
824 views

Print filter parameters on a report

I'm using MS Access 2010. I have a form with a number of fields of various types (number, text, lookup, checkbox). Users can right click on any field to filter the form. Then I have a button that ...
1
vote
2answers
2k views

Join three tables

I have those three tables SELECT occuId as 'Occupation Id',occuDscr as 'Occupation Description' FROM occupation_field; +---------------+------------------------+ | Occupation Id | Occupation ...
0
votes
1answer
315 views

Does SQL Server full restore set the differential base?

Differential backups are taken as the difference between the current state, and the last full backup called the "differential base". Does restoring a full backup reset the differential base? If so, ...
7
votes
2answers
6k views

How to convert control characters in MySQL from latin1 to UTF-8?

While converting a database to UTF-8 I noticed a strange behavior regarding the control characters 0x80-0x9F. For example, 0x92 (right apostrophe) would not get converted to UTF-8 and truncate the ...
2
votes
1answer
252 views

sys.syshobtcolumns Help

Does anyone have a good link to documentation regarding how the syshobtcolumns and syshobt system tables are populated. The reason for asking is that we are receiving pagelatch_sh and pageliolatch_ex ...
1
vote
2answers
684 views

Microsoft SQL 2008 Cluster with replication

i am in the process of setting upi a SQl Server 2008 64 bit Failover cluster. A lot of the database queries that we are running during the days are db intensive and lock a lot of the tables while ...
2
votes
1answer
962 views

Calculate percentage of false records to total records within a aggregate function

I'm looking for a solution to calculate a percentage rate of a boolean value: Model: Products 1 <-> n Components Components.essential is a boolean attribute What I want to calculate ...
1
vote
1answer
3k views

unknown SET option beginning “oracle_sid…”

SQL> set oracle_sid=sid SP2-0735: unknown SET option beginning "oracle_sid..." SQL> emctl start dbconsole; SP2-0734: unknown command beginning "emctl star..." - rest of line ignored. SQL> set ...
4
votes
1answer
4k views

Converting Microsoft SQL Server collation to UTF 8

I've a Rails-Application, which reads data from a Microsoft SQL Server 2008 R2 Database. All umlauts are represented by a '?', so I checked the encoding of the database. The encoding is 'Latin 1'. ...
5
votes
2answers
8k views

Database logon trigger

To block a particular user and IP combination on an Oracle Database , I created the following trigger, and compiled without errors. Create or replace trigger you_may_not_login after logon on database ...
16
votes
4answers
32k views

PostgreSQL: How to create full copy of database schema in same database?

How I can copy my public schema into the same database with full table structure, data, functions, fk, pk and etc. My version of Postgres is 8.4 P.S. I need to copy schema NOT database
2
votes
2answers
539 views

Alternatives to sp_indexoption for Row Locks and Page Locks in SQL Server 2008

Are there better alternatives to setting the Row Locks and Page Locks in SQL Server 2008? The case here is to set the row and page locks to false on the table. The lock is in effect during a series ...
2
votes
1answer
453 views

Query takes hours

Up until now all queries in my PostgreSQL application were fast. During the last days, sometimes a query takes several hours. Index are healthy, because after dump, restore, vacuum -z, it is still the ...
1
vote
2answers
934 views

SQL Server 2008 R2 - user disk quota

Is it possible to apply restrictions on how much data a user / login may store in a database? I found no way to apply such restrictions to schemas, for instance. If there is no built-in mechanism ...
2
votes
2answers
899 views

Unable to locate database.mdf in production server

1) I want to attach a database from my development server to my production server. The database ESpiceHerbs from my development server is located at: C:\Program Files\Microsoft SQL ...
1
vote
3answers
2k views

Inventory Database Design Issue

G'day, I own a jewellery retail store alongside an online store, and am in the midst of building a completely custom system to track all of my inventory. I also have a number of stockists (other ...
4
votes
1answer
2k views

How Can I Correctly Pass a Table to a Stored Procedure in Oracle in SQL Plus?

Being new to Oracle, I'm almost certain I'm missing something simple here. This is what I'm trying to run: declare type string_table IS TABLE OF VARCHAR2(512); outuser nvarchar2(512); outrole ...
1
vote
1answer
1k views

In Oracle, what grants do I need as a non-schema user to view rows in all_objects?

I have two instances of an oracle 11g database, both have the same object definitions in the schema: tables with indexes and constraints, a sequence, and a stored procedure. The facts of the case: ...
4
votes
1answer
462 views

database design issue

This is my first time on this beautiful content rich site. I have a sql server 2008 database, but am not too experienced with good relational database design. My project is this: I have a school ...
13
votes
1answer
1k views

What's the anatomy of a columnstore index?

One of the new features in SQL Server 2012 codenamed Denali is the Columnstore index. I know a good bit about regular old row-store indexes, like the b-tree structure, differences in storage between ...
2
votes
2answers
133 views

How do I pull a backup of an oracle database so I can send it to a vendor

First of all, I know squat about Oracle databases. A vendor who is looking at converting our data from an older piece of software with an Oracle DB back-end wants a dump of our database to see what ...
1
vote
3answers
135 views

If A is next to B, how to automatically assert that B is next to A

I am working in Access 2010. Let's say I have a database that tracks where packages sit in a warehouse. Table: Packages PackageID (PK) PackageHeight PackageWidth PackageWeight PackageOwner (etc) ...
7
votes
2answers
4k views

Any gotchas at all with converting from MyISAM to InnoDB?

I'm ready to move from MyISAM to InnoDB but wanted to know if there was a full list of things to look for? For example, I haven't seen any list mention that running DISABLE KEYS on an InnoDB table ...
11
votes
1answer
7k views

Are there any risks to granting users SQL Server SHOWPLAN permission?

I'm doing some performance tuning on a large SQL server 2008 database, and the IT group is unwilling to give SHOWPLAN permission. In the past, "Show Execution Plan" has been the most effective way to ...
1
vote
1answer
307 views

Conditional one to many queries in mysql

I have a simple patients table and lots of Lab tests table. Every patient can have many Lab tests. What i want to do is to only query the tests which are already entered for that specific patient and ...
6
votes
2answers
7k views

Storing time with milliseconds in database

Just a quick question regarding storing "time" in a database. I'm logging the time of users runs which are in the format 00:00:00:00 (hours, minutes, seconds, milliseconds). I was originally going to ...
0
votes
2answers
115 views

ORACLE DB ERROR

We are currently experiencing a problem with Oracle DB 8. It is no longer starting and we get this message: ERROR at line 1: ORA-01113: file 19 needs media recovery ORA-01110: data file 19: ...
3
votes
1answer
363 views

What do I need to sync a local site office SQL Server with the Head Office SQL Server

The company has a desktop application powered by SQL Server from the head office that is dependent on an internet connection to our remote sites. Usually when we move to a new site there is a good ...
3
votes
3answers
2k views

Does ORDER BY on a clustered key effect performance?

Say I have a table clustered on PrimaryKey, and in all cases I want my results to be ordered by PrimaryKey so I additionally always ORDER BY PrimaryKey in all queries. Does this ORDER BY affect ...
4
votes
1answer
130 views

SQL Server - is it ok to store link table as a heap?

I'm trying to understand if it's a good practice to have non-clustered PK on link table: CREATE TABLE table1_table2(table1_id INT NOT NULL, table2_id INT NOT NULL, CONSTRAINT PK_T1_T2 PRIMARY KEY ...

15 30 50 per page