Questions tagged [database-administration]

The aspects of database usage not directly related to the insertion and extraction of information, such as security, configuration and performance tuning. These questions are OFF-TOPIC FOR STACK OVERFLOW; ask them on dba.stackexchange.com instead.

Note: There is a separate Database Administrators site dealing with database administration. If the programming aspect of your question is only minor, consider posting there.

Database administration is the umbrella term for a wide range of database-related activities, ranging from installation and configuration, to stability monitoring, performance tuning and security auditing.

2087 questions
23
votes
9 answers

"Cannot open user default database. Login failed." after installing SQL Server Management Studio Express

I have a database in a local file that is used by a program. The program has limited functionality and I needed to run some quick queries. I installed SQL Server Management Studio Express 2005 (SSMSE), connected to the SQL Server instance,…
22
votes
1 answer

Postgresql | No space left on device

I am getting space issue while running a batch process on PostgreSQL database. However, df -h command shows that machine has enough space below is the exact error org.springframework.dao.DataAccessResourceFailureException:…
YogeshR
  • 1,606
  • 2
  • 22
  • 43
22
votes
13 answers

how to drop database

i used the following sytanx drop database filmo; and got the following error: ERROR 1010 (HY000): Error dropping database (can't rmdir './filmo/', errno: 17) any ideas..
devang
  • 4,397
  • 7
  • 21
  • 11
22
votes
7 answers

mysql_secure_installation "Can't connect to local MySQL server through socket"

When I am invoking the file mysql_secure_installation I get an error like [mysqk123@InstallZeMo bin]$ ./mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ…
vidyadhar
  • 3,118
  • 6
  • 22
  • 31
21
votes
4 answers

How can I list all tables in a database with Squirrel SQL?

I use Squirrel SQL to connect to a JavaDB/Derby database on my desktop. I can run SQL queries. But how can I list all tables in the database? And preferably all column and column types.
Jonas
  • 121,568
  • 97
  • 310
  • 388
21
votes
7 answers

extract date only from given timestamp in oracle sql

The following query: select cdate from rprt where cdate <= TO_CHAR(sysdate, 'YYYY/MM/DD-HH24-MI-SS-SSSSS') and ryg='R' and cnum='C002'; return: 2013/04/27-10:06:26:794 as stored in the table. I want to get the date only as : 27-04-2013 and get the…
kumarprd
  • 906
  • 2
  • 8
  • 21
21
votes
1 answer

MongoDB Single Document size limit is 16MB

Known Information: Its is know that MongoDB stores in BSON (Binary JSON) and the maximum BSON document size is 16MB. Question: Why 16MB itself why not 32MB or 64MB or still more and where exactly the limit has been put for 16MB and what are the…
Amol M Kulkarni
  • 21,143
  • 34
  • 120
  • 164
20
votes
5 answers

How do I find the last time that a PostgreSQL database has been updated?

I am working with a postgreSQL database that gets updated in batches. I need to know when the last time that the database (or a table in the database)has been updated or modified, either will do. I saw that someone on the postgeSQL forum had…
WolfmanDragon
  • 7,851
  • 14
  • 49
  • 61
20
votes
1 answer

Database administration tool for MongoDB

I'm kinda confused. MongoDB is one of the most popular DB. Is there any DB administration tool available for MongoDB like MySQL workbench or [localhost web based] PHPMyadmin. I'm on windows 7 machine.
Rashidul Islam
  • 1,623
  • 3
  • 18
  • 24
19
votes
7 answers

Notify Operator if ANY step in job fails

Can I (How do I) configure Sql Server 2008 to notify an operator if any step in the Job fails? I have a Sql Server job with several steps to update data from multiple different sources, followed by one final step which performs several calculations…
18
votes
3 answers

SQL Server 2016 - How to get last logged in date for user?

How can I get the last logged in date for certain user. I googled and stumbled upon this query SELECT name, accdate FROM sys.syslogins But the accdate column seems to be deprecated, and does not update. I have another clue SELECT login_name,…
ixnv
  • 183
  • 1
  • 1
  • 7
18
votes
2 answers

PostgreSQL: How to enable autovacuum?

How does one enable autovacuum in PostgreSQL? I understand the purpose, I just can't find a simple answer regarding how to enable it.
JTW
  • 3,546
  • 8
  • 35
  • 49
17
votes
1 answer

Difference between terminating and cancelling a process

What's the difference between functions: pg_cancel_backend(pid int) and pg_terminate_backend(pid int)? For me they work pretty the same.
Borys
  • 2,676
  • 2
  • 24
  • 37
16
votes
3 answers

How to create copy of full schema on same database in oracle

I want to create full copy of the schema on the same database. What is the best technique to do that? I have few ideas in mind: Datapump Over Db link IMPDP on network link EXPDP and then IMPDP. What would be the advantages and/or drawbacks of each…
user3209595
  • 171
  • 1
  • 1
  • 3
15
votes
4 answers

How to optimize count and order by query in millions of row

Needed help in optimizing order by and count query, I have tables having millions (approx 3 millions) rows. I have to join 4 tables and fetch the records, When i run the simple query it takes only millisecond to complete but as I try to count or…
Irfan.gwb
  • 668
  • 2
  • 13
  • 35