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
4
votes
0 answers

Cannot telnet to SQL Server on port 1433

I've been working solidly on this issue for the past three weeks. I cannot seem to find where the actual issue is. I just recently found this article on how to troubleshoot the connection. I made it down to step 4 on the client machine and telnet…
Otacon
  • 41
  • 1
  • 1
  • 5
4
votes
1 answer

How to restart A Sql Azure Instance?

How can I restart my SQL Azure Server ? Is this possible ?
Robotsushi
  • 167
  • 1
  • 1
  • 6
4
votes
5 answers

tool for custom sql load testing

I would like to run some tests to compare our mysql application in several configurations. But I don't want to use something like sysbench or oltp tests, because we have some heavy stored-procedures logic. So... I want to test against our…
Shebnik
  • 41
  • 1
  • 4
4
votes
2 answers

SQL Server: How to shrink FileStream files?

For a project, I'm using a SQL Server 2008 R2. One table has a filestream column. I've made some load tests, and now the database has ~20GB used. I've empty tables, except several(configuration tables). But my database was still using a lot of…
J4N
  • 167
  • 1
  • 2
  • 8
4
votes
5 answers

MySQL query, 2 similar servers, 2 minute difference in execution times

I had a similar question on stack overflow, but it seems to be more server/mysql setup related than coding. The queries below all execute instantly on our development server where as they can take upto 2 minutes 20 seconds. The query execution time…
mr12086
  • 245
  • 1
  • 3
  • 8
4
votes
3 answers

Is it possible to get a list of all jobs that access a database in SQL server?

Is it possible to get a list of all jobs that access a database in SQL? I can't figure a way to do this. I can get a list of all jobs but not what dbs they access. Thanks
Paul
  • 41
  • 1
  • 2
4
votes
2 answers

oracle lsnrctl TNS-12545: Connect failed because target host or object does not exist

I am trying to connect to my oracle database. I can't get the listener started. Here is what I have tried. $ lsnrctl start LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 20-JAN-2012 08:19:58 Copyright (c) 1991, 2007, Oracle. All rights…
nelaaro
  • 644
  • 4
  • 10
  • 27
4
votes
2 answers

Log the error and warning while restoring the sql dump on MySql

How to log the error and warning while restoring the SQL dump on MySQL ? Following are the steps we were doing. mysql> CREATE DATABASE dbname; mysql> USE dbname; mysql> SOURCE dbdumpname.sql
Aha
  • 409
  • 3
  • 8
  • 18
4
votes
1 answer

SQL Server Restore from Backup, Just primary File Group

Thankfully, this question is just a what-if, and I am not in an emergency right now. But I have created a file group in my database (sql server 2008), and moved some massive data tables over to it. Leaving my websites central tables in the Primary…
bladefist
  • 355
  • 1
  • 3
  • 13
4
votes
5 answers

Can I rollback last update on SQL database?

Possible Duplicate: How to rollback a deleted table data? I accidentally ran an update statement against my database. Is there a way to roll back this single update without disrupting the rest of the database?
Eugene
4
votes
4 answers

Lower the I/O priority for backups

I have a job that nightly runs a backup of all attached databases however it can bog the server down if someone is connected during that time. I have TONS of CPU overhead to work with (I am barely above 5% in use, 8 cores total the highest is maybe…
Scott Chamberlain
  • 1,455
  • 2
  • 21
  • 37
4
votes
1 answer

Deleting MySQL rows causes lock table error

I had a couple million rows to delete but they can't be deleted at once without this error ERROR 1206 (HY000): The total number of locks exceeds the lock table size So I wrote a script to delete 100,000 rows 10,000 at a time. It ran once but when I…
Dave L
  • 211
  • 3
  • 6
4
votes
1 answer

SQL Server Windows Authentication NTUSERNAME is different to Windows Login

An employee at a client has just got married and as a result they have changed her details, login name et al., in Active Directory (AD). The problem is SUSER_NAME() in procedures and the NTUSERNAME in SQL Server Profiler still shows her original…
4
votes
3 answers

Importing a large SQL script into SQL Server?

I'm trying to move a database from our production server to our test server. I've used Microsoft's Database Publishing Wizard to create a script containing the schema and data for the production database. However **I can't figure out how to load…
James McMahon
  • 773
  • 2
  • 8
  • 16
4
votes
2 answers

How much disk space does innodb need to ALTER TABLE

I have a large InnoDB table that I want to alter by adding a small column to. I'm prepared to wait a while, but I'm wondering how much disk space will the ALTER TABLE command consume while it's running? Will I need enough room on my disk for two…
Leopd
  • 1,757
  • 4
  • 24
  • 30