Most Popular
1500 questions
49
votes
6 answers
SSD vs HDD for databases
I am trying to purchase a new Server to run MySQL Server on. This new server will be a slave of my main machine. However, this server will be dedicated for reporting only "Lots of reads and complex queries."
Now I am looking into investing into…
Mike
- 609
- 2
- 6
- 7
49
votes
4 answers
Clustering vs. transactional replication vs. availability groups
Assuming you need to make sure your application that relies on SQL Server 2012 as its database backend is available around the clock, even if one server machine fails.
As a developer and not a DBA, I am struggling to understand when to use which…
marc_s
- 9,052
- 6
- 46
- 52
49
votes
5 answers
Backup only one schema and restore it on another server
I have a database named "A" which has two schemas "B" and "C".
I want to backup and restore Schema "B" (including data) on a different server. Not sure how to do this as I am new to Postgres.
Do I have to create a new database on the new sever as of…
user30422
- 591
- 1
- 4
- 3
49
votes
2 answers
Configuring PostgreSQL for read performance
Our system writes a lots of data (kind of Big Data system). Write performance is good enough for our needs but read performance is really too slow.
The primary key (constraint) structure is similar for all our tables:
timestamp(Timestamp) ;…
JPelletier
- 593
- 1
- 5
- 6
49
votes
2 answers
How to restore a "contained" database?
I recently tried to restore to my local development SQL Server a backup from a network instance. To my surprised I received the following error message:
Msg 12824, Level 16, State 1, Line 3 The sp_configure value 'contained
database…
David
- 1,399
- 1
- 9
- 12
48
votes
10 answers
How do I copy a table with SELECT INTO but ignore the IDENTITY property?
I have a table with identity column say:
create table with_id (
id int identity(1,1),
val varchar(30)
);
It's well known, that this
select * into copy_from_with_id_1 from with_id;
results in copy_from_with_id_1 with identity on id too.
The…
bernd_k
- 12,369
- 24
- 79
- 111
48
votes
4 answers
Force PostgreSQL clients to use SSL?
I have configured ssl = on in postgresql.conf (and installed a certificate etcetera). Does this ensure that all clients will always connect over SSL?
(I.e. does ssl = on it make it impossible to connect without SSL encryption?)
Are there other ways…
KajMagnus
- 1,249
- 2
- 14
- 21
48
votes
7 answers
How to determine if an Oracle table is locked or not?
We've been using BI software and a repository database that are installed on Oracle Enterprise 11gR2.
Some of these batch reports will try to access a database table which may still be locked. How can I find out if an Oracle table is locked or not?…
Selahattin
- 621
- 1
- 6
- 6
48
votes
5 answers
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 statement.
Students
SELECT studentID, first_name,…
Richard Sayakanit
- 947
- 2
- 8
- 12
48
votes
6 answers
PostgreSQL Change owner of all tables under a specific schema
I am trying to change the owner of all tables under the same schema in one command line. i.e: alter table schema_name.* owner to newowner. Is there a way to accomplish that?
Twisted Fate
- 581
- 1
- 4
- 3
48
votes
5 answers
How do I list or search all the column names in my database?
I want to search for a string in the names of the columns present in a database.
I’m working on a maintenance project and some of the databases I deal with have more than 150 tables, so I'm looking for a quick way to do this.
What do you recommend?
Webber
- 695
- 1
- 6
- 8
48
votes
2 answers
What is the actual behavior of compatibility level 80?
Could somebody provide me with a better insight about the compatibility mode feature? It is behaving different than I expected.
As far as I understand compatibility modes, it is about the availability and support of certain language structures…
souplex
- 833
- 1
- 8
- 10
48
votes
7 answers
How can I verify I'm using SSL to connect to mysql?
I have configured my server to allow SSL, and have modified my client ~/.my.cnf so I use SSL:
[client]
ssl
ssl-cipher=DHE-RSA-AES256-SHA
ssl-ca=~/certs/ca-cert.pem
When I log in with my client and view the status, it lists a cipher on the SSL…
chris
- 1,232
- 5
- 17
- 29
48
votes
5 answers
Can I launch a stored procedure and immediately return without waiting for it to finish?
We have a stored procedure that users can run manually to get some updated numbers for a report that's used constantly throughout the day.
I have a second stored procedure that should be run after the first stored procedure runs since it is based on…
Rachel
- 8,547
- 20
- 51
- 74
48
votes
2 answers
Increasing work_mem and shared_buffers on Postgres 9.2 significantly slows down queries
I have a PostgreSQL 9.2 instance running on RHEL 6.3, 8-core machine with 16GB of RAM. The server is dedicated to this database. Given that the default postgresql.conf is quite conservative regarding memory settings, I thought it might be a good…
Petr Praus
- 583
- 1
- 5
- 6