Questions tagged [sql]

Database language for managing data in relational database management systems (RDBMS). Note that each database implements SQL with slight variations. Please remember to tag with your specific database as well, e.g. [mysql], [postgres], [mssql], or [oracle].

An abbreviation of "Structured Query Language," SQL is a database language used to manage data in relational database management systems.

Due to many vendor implementations of SQL (such as T-SQL for SQL Server & Sybase, PL/SQL for Oracle and PostgreSQL and MySQL) it is a fractured language and syntax that works with one vendor may not work with another.

1284 questions
5
votes
4 answers

How to trace possible SQL injection attack?

We just had one of our (fairly important) wordpress databases inexplicably dropped. Fortunately we keep nightly backups so it's not going to be the end of the world, but I want to avoid or at least be able to trace this in the future. Now, we still…
Neil Sarkar
  • 283
  • 1
  • 4
  • 10
5
votes
4 answers

Moving a table to a different schema in Oracle

How do I move a table from one schema to another? It's a fairly large table, so the following query would take ages to complete and need huge disk space: CREATE TABLE newschema.mytable AS SELECT * from oldschema.mytable; I tried to rename the…
Henning
  • 213
  • 1
  • 3
  • 7
5
votes
1 answer

What is the difference between bulk_logged and simple recovery model? Which one is minimally logged?

What is the difference between bulk_logged and simple recovery model? Which one is minimally logged and what is always a better choice for bulk operations? suppose i am using select into statement to copy more than millions of rows, which one is…
Aamod
5
votes
3 answers

How to get mysql.sock file, mistakenly deleted from "/mysql/tmp/"

I was stuck with a PDO Exception PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in lock_may_be_available() (line 167 of home/../includes/lock.inc). In order to resolve that I tried to…
GIRI
  • 151
  • 1
  • 1
  • 5
5
votes
4 answers

Display all the UDFs installed on a MySQL server?

How do I display all the UDFs (User Definied Functions) on a MySQL server? (version 5.0.x) UPDATE I don't want to display the code of all the UDFs, I just want to list the name of each UDF that is installed. Sorta like SHOW DATABASES, but for UDFs.
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
5
votes
3 answers

SQL Server Collation settings for System Center Service Manager 2012

There is a lot of conflicting or confusing information surrounding the required collation settings for SQL Server, as it pertains to hosting the SCSM 2012 database and associated data warehouse databases. During installation, this error appears if…
MDMarra
  • 100,734
  • 32
  • 197
  • 329
5
votes
5 answers

Remote connection sql server not working but if firewall disabled it does?

I have setup sql server express 2008 on a windows 2008 server. And i have done all the standard stuff in sql to allow remote connections. The strange thing is if i disable the windows 2008 server firewalll .. it works. I have opened a port as 1433…
5
votes
1 answer

Distributed and/or Parallel SSIS processing

Background: Our company hosts SaaS DSS applications, where clients provide us data Daily and/or Weekly, which we process & merge into their existing database. During business hours, load in the servers are pretty minimal as it's mostly users…
Jeff
  • 51
  • 2
5
votes
2 answers

Impact of keeping 100+ Linked Server Objects open in MS SQL Server

I manage a large scale cloud based product that uses SQL Server as the database engine. The model is designed such that each customer using the product has its own instance of MS SQL Server. I'm needing a way to query, update, and insert in these…
token
  • 275
  • 1
  • 3
  • 9
5
votes
3 answers

How does SQL Server handle simulataneous read/write requests?

Background: We have an application which uses an SQL Server 2008 database heavily. We are trying to optimize this application. It was single threaded, and we noticed through logging/ profiling of the app that the largest bottleneck was db…
Erix
5
votes
2 answers

How can I safely kill a long running MSSQL query?

Recently we had a SQL job inserting into a database. The query had been running for a few days unecessarily so it was killed using KILL SPID. The process then began to roll back for several days and just seemed to hang there. Running KILL SPID WITH…
Anonymous
  • 193
  • 1
  • 1
  • 7
5
votes
5 answers

PostgreSQL won't start anymore

Today, my PostgreSQL doesn't start anymore on my windows machine... I've tried to start the service in windows services and got the following error: Windows could not start the PostgreSQL Database Server 8.3 service on Local Computer. Error 1053:…
Sander Declerck
  • 153
  • 1
  • 1
  • 6
5
votes
1 answer

Which SQL Server edition?

We need a new install of windows server and sql server to replicate a couple of databases to a geographically separate location from an existing application (over a site-to-site VPN). The source database is SQL Server 2005. However, this is a…
StaringSkyward
  • 115
  • 2
  • 4
5
votes
3 answers

Do I need to split a database to filegroups? It's 30gb now

I'm in the process of changing a database server at my company from Windows 2000/Sql Server 2000 to a Windows 2003 R2/Sql Server 2005 now. It holds 30 databases, each of the databases is about 7gb in size, but one of the is 30gb. And now I'm…
Svein Erik
  • 205
  • 3
  • 8
4
votes
1 answer

Cant delete Azure Database

Created this a database from a backup. I want to delete this database because I selected the incorrect backup. When trying to delete the database I get the following error: Failed to delete the database: [DBNAME]. ErrorCode: 400 ErrorMessage: Cannot…