3
votes
2answers
2k views

Does the SELECT statement count into DML?

Looking at the name Data Manipulation Language (DML) I would assume, that all contained statements are actually for manipulating data. As far as I know the SELECT statement can only be used to query ...
7
votes
2answers
264 views

Why is Oracle using the index here?

Name Null Type -------- -------- --------- ID NOT NULL NUMBER(4) GROUP_ID NUMBER(4) TEXT CLOB There is a btree index on group_id. Here's how many ...
5
votes
2answers
268 views

What is an advantage or disadvantage for not upgreading database server?

I have a legacy database server. The person who wrote it is long gone. There is no documentation at all just some comments in the code. Luckily, it is not that complicate but if I want to fix it ...
2
votes
2answers
363 views

Database Transfer from PostgreSQL to MySQL

Is there any method to tranfer the data and schema from a postgresql database to mysql?
1
vote
2answers
393 views

Scheduled backup errors

I am trying to do the following. I have about 50 DBs and a network NAS that acts as backup machine. I have made an sql script(lets say backup.sql) with 50 lines each of these say "BACKUP DATABASE ABC ...
1
vote
1answer
103 views

How can I measure the performance hit of tablespace autoextensions?

I'm not a DBA, nor is there a DBA on the project I'm currently working, so we have tablespaces with autoextend on next 6m. I have no idea if this is low, although I believe so. I want to measure ...
3
votes
1answer
607 views

Is it safe to let application administrators look at v$session, v$process, and v$sql?

In an Oracle database shared among multiple application, is it 'safe' (from a security and system integrity perspective) to allow application administrators access to v$session, v$process, and v$sql? ...
0
votes
2answers
101 views

what are steps should i do to make my local sql server connects to a remote sql server on my server?

I want my sql server to remote connect to the server sql server, so that I can access databases from my local machine. How to do that in steps, or if there is an article online that will be nice as ...
6
votes
1answer
643 views

What makes an OLTP database an OLTP database?

This is a pretty broad question. I know the definition of OLTP. But it seems like unless you have an environment that has a clear distinction between OLTP and OLAP, in the sense of a database that ...
6
votes
2answers
4k views

Is this a normal set of MySQL privileges?

Using phpmyadmin on a local test wamp setup, and well as pretty much the title states, there are 3 users marked as user = ANY, password = NO, such as: USER | HOST | Password | Global Priv | Grant ...
30
votes
7answers
12k views

Writing a simple bank schema: How should I keep my balances in sync with their transaction history?

I am writing the schema for a simple bank database. Here are the basic specifications: The database will store transactions against a user and currency. Every user has one balance per currency, so ...
6
votes
2answers
3k views

How can I help SQL Server recognize my indexed view column is NOT NULL-able?

I have the following indexed view defined in SQL Server 2008 (you can download a working schema from gist for testing purposes): CREATE VIEW dbo.balances WITH SCHEMABINDING AS SELECT user_id ...
3
votes
1answer
476 views

InnoDB has a transaction running, but “SHOW PROCESSLIST;” shows nothing

I have a replicated database setup, mostly Innodb databases/tables. The query that I believe caused the issue ran in about 20 minutes on the master database. This is where it gets weird. Show ...
11
votes
8answers
2k views

Is there a reason to use extremely abbreviated table names?

We're using a database setup from a vendor's application that has horrifically hard to read database table names, and no documentation on what is stored where. I can see why one might want to ...
5
votes
2answers
2k views

Does a view need its own foreign key constraints?

Disclaimer: I'm a programmer, not a DBA, so bear with me... I have a view that I use to just map 2 entities together. I have to do a join between a few different tables to get that: CREATE OR ...
2
votes
2answers
317 views

Indexing of Data Warehouse tables?

Maybe I have misunderstood something but I can recall reading an article which said that there is no reason to create non-clustered indexes on very large data warehousing tables? That is because ...
1
vote
1answer
102 views

Should I Avoid Repeated References to Aggregate Columns in a View?

So I'm wanting to summarize the balance of the accounts in my business application. My (simplified for our purposes) data model looks like: --Main account table that holds the single accounts create ...
1
vote
3answers
4k views

ON DUPLICATE KEY UPDATE question

I'm trying to compare data from two systems. The basic idea is: Create Temp Table. Insert Table1 Data. Insert Table2 data (Table a linked, remote server) with UNIQUE Ids respected. Filter where ...
0
votes
1answer
97 views

What would cause the speed difference between servers?

I have this query on my dev server: select snStudyNumber as ProjectNumber from CDB.cdb.Quotes q inner join CDB.cdb.LineItems l on q.PK_quID=l.FK_quID inner join ...
4
votes
1answer
5k views

How can I generate scripts for all functions in pgAdmin?

I am using pgAdmin version 1.10.5, and I've checked the properties and menu options but couldn't find anything on the subject. For example, I just want to generate a script that includes the ...
2
votes
3answers
2k views

Backup Compression in SQL Server 2005

I noticed that simply zipping my backup files reduces the space used by 70% My idea was to, initially, backup the databases to a local server; then, using Bacula or Cobian (I don't have a budget), ...
3
votes
2answers
11k views

ORA-01113: file # needs media recovery ORA-01110

I have mistakenly added datafile to the tablespace... And was trying to drop it. I run the following: alter database datafile 'datafile_name' OFFLINE; now when I run alter database datafile ...
3
votes
1answer
932 views

Replication slows down on massive deletes

First of all, I'm not a DBA, but I'd like to get advice how to deal with the following issue. We have few database servers based on SQL Server 2008 R2 SP1. They have been organized as shown below, so ...
5
votes
1answer
294 views

DBA's Scope in datawarehousing Projects

As a DBA trainee, what needs to be known in order to be part of datawarehousing projects? I mean what resources are suggested to have an overview knowledge of how PL/SQL and other concepts are used ...
0
votes
2answers
562 views

Upgrading Instances with Mirroring

If you want to upgrade or install a patch on two separate instances that house both the principal and mirrored database, how can you go about that? If the database that is being mirrored needs to be ...
5
votes
4answers
1k views

Does putting single quotation marks around numeric constants really protect from SQL injection in MySQL?

The manual seems to suggest that using quotes around numbers is sufficient to protect from SQL injection. According to section 5.3.1. General Security Guidelines of the MySQL 5.1 Reference Manual: ...
5
votes
1answer
485 views

Mirroring partner timeout - Not working the way advertised?

I'm testing a 2 node windows failover cluster with mirroring in high safety mode and automatic failover. My mirror is a standalone server as is the witness. All instances are 2008 R2 RTM Enterprise ...
5
votes
2answers
2k views

Will transactional replication push a CREATE INDEX immediately? Or do I need a snapshot?

I have transactional replication set up on SQL 2008, and the article in question has "Copy nonclustered Indexes" set to TRUE. If I add a non-clustered index on the publisher (using CREATE INDEX), ...
5
votes
2answers
2k views

Changing Domain on SQL Server

I currently have some SQL Servers that sit on a sub-domain. We are eliminating that sub-domain and moving everything to the regular domain. As far as SQL Server configuration goes, is there anything ...
4
votes
2answers
5k views

Minimum requirements to run Sql Server BCP.exe utility

I am working with a client who needs to do a data import to a remote SQL Server (2008) instance. The machine that the import will be done from cannot have SQL Server installed on it. Can the BCP.exe ...
4
votes
3answers
5k views

Does an Oracle nvarchar2 take twice as much space as varchar2?

Regarding point 4 of this question (which is in reference to MS SQL Server): VARCHAR does not store Unicode characters. NVARCHAR does store Unicode characters. Today's applications should ...
5
votes
1answer
3k views

Unable to kill SPID

I have a SQL Server 2005 Std (x64) with SP4 that has a procedure I cannot seem to kill. If I view sys.dm_exec_requests I see SPID 103 with wait_type of LCK_M_SCH_M, a status of SUSPENDED and command ...
4
votes
4answers
318 views

How to measure the number of database writes on SQL Server 2008 R2

How would I measure the number of database writes on SQL Server 2008 R2 For example, how many updated rows and how many new rows in a database over a period of time (1 day, 1 week or 1 month)?
1
vote
3answers
1k views

Undo DDL statement on View in Oracle

I Want to undo DDL changes on View, how to do that? I have not set utl_file_dir parameter and can't restart the database to set it. So log miner can not be used yes? it needs this parameter... If ...
2
votes
2answers
233 views

What is an industry standard method for verifying openquery connection is open prior to running queries?

I'm a programmer, but this question is more specifically related to databases so I'm posting it among this community. It could very well cross over into stackoverflow as well. I'm seeking an ...
2
votes
1answer
3k views

Rebooting a MySQL Replication Slave

For the first time since it was set up I need to reboot a read-only MySQL replication slave. I found this article about downing a slave for maintenance (albeit he's just describing stopping the mysql ...
2
votes
3answers
15k views

How to drop multiple tables with common prefix in one query?

I'm using Microsoft SQL Server 2008.My question is:How to drop multiple tables with common prefix in one query? something like that table names: LG_001_01_STLINE, LG_001_02_STFICHE
13
votes
2answers
5k views

How to know when/if I have too many indexes?

Running Microsoft SQL Server Profiler every now and then, it suggests me with a bunch of new indexes and statistics to create ("...97% estimated improvement..."). From my understanding every added ...
2
votes
2answers
655 views

Can a database file be brought back online if the file is recovered from a disk backup?

TL:DR Deleted .ndf files Database wouldn't load Set deleted files offline Brought database online Restored files from disk backup How can I bring them online/remove the database reference? During ...
2
votes
2answers
760 views

Determine last usage date of a linked server

We have a tonne of linked servers on our database server that we would like to clean up. Is it possible to determine the last date a linked server was used? e.g. the last time a query was performed ...
5
votes
1answer
578 views

How does table compression affect SQL Server's buffer pool?

I'm curious as to how SQL Server's buffer pool is affected by compressed data tables. Is the data in memory compressed, just as it is on disk, or is it fully decompressed? If the data is stored ...
4
votes
2answers
8k views

How can I backup & restore a single FILEGROUP in Sql Server 2008

Previously, on ServerFault I asked a question about backing up and restoring a Sql Server 2008 Filegroup. Today, when I tried to RESTORE one of these FILEGROUP backups, I got the following error:- ...
1
vote
2answers
2k views

Is the mapping between PostgreSQL system tables and information_schema views documented?

If you connect pgadminIII to a PostgreSQL 9.x server, you'll find two catalogs exposed in the user interface: ANSI (information schema), and PostgreSQL (pg_catalog). I'm looking for documentation ...
1
vote
1answer
8k views

What to do with those invalid JAVA CLASS object type objects in SYS prior to the upgrade the oracle db from 10g to 11g?

I am ready to upgrade the oracle 10g prod db to 11g, but we have 130 invalid objects in SYS (all are belong to JAVA CLASS object_type). And from the best practice of oracle upgrade from 10g to 11g, it ...
13
votes
2answers
6k views

How do I map an IS-A relationship into a database?

Consider the following: entity User { autoincrement uid; string(20) name; int privilegeLevel; } entity DirectLoginUser { inherits User; string(20) username; string(16) ...
3
votes
2answers
273 views

Data Model For Summarizing Student Info

I work for a school district and one of the many things the admin wants to know is how many tardies a student has for a given time frame. I could certainly go retrieve the count from the attendance ...
2
votes
1answer
332 views

Resource Waits: Mathematical link between Wait Time and Average Waiter Count

Just curious, per BOL Wait Time (ms/sec) is the wait time in milliseconds for all tasks waiting for one or more resources in the category since last update. Average Waiter Count is the number of ...
3
votes
2answers
139 views

Is it possible in SQL Server 2008 to have Structures in one file and Rows Data in another file?

I know this may sound ridiculous but: Is it possible to separate the Data Definition (i.e. Structures of my Tables, Views and other things) and Rows-Data on a File-Level in SQL Server. I think it will ...
3
votes
0answers
273 views

To NULL or not to NULL? [duplicate]

Possible Duplicate: Why shouldn't we allow NULLs? I've heard that it's a bad idea to do database design such that nullable fields exist. However, eliminating nullables often cause much ...
14
votes
3answers
6k views

Is nested view a good database design?

I have read somewhere long time ago. The book states that we should not allow to having a nested view in SQL Server. I am not sure the reason why we can't do that or I might remember incorrect ...

15 30 50 per page