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
16
votes
1 answer

How do you get the minimum and maximum memory allocation of a SQL instance using T-SQL?

I'm managing about 90 SQL Server instances and need a query to determine how much memory has been allocated to each instance. Please note, I'm not asking how to set it, just to see what it's currently set to without using the Management…
token
  • 275
  • 1
  • 3
  • 9
16
votes
6 answers

How do I change the collation of a SQL Server Database?

I'm trying to standardise all databases on a single collation - Latin1_General_CI_AS (the standard collation). I have some databases that are in SQL_Latin1_General_CP1_CI_AS. I know I can use ALTER DATABASE to change the database collation, but…
Richard Gadsden
  • 3,686
  • 4
  • 29
  • 58
15
votes
3 answers

Postgres INSERT ERROR: permission denied for schema public

In Postgres I created the following table inside a db called testing: CREATE TABLE category_google_taxonomy ( category_id integer references category ON UPDATE CASCADE ON DELETE CASCADE, google_taxonomy_id integer references google_taxonomy…
Rudolf Vavruch
  • 1,295
  • 2
  • 11
  • 16
15
votes
2 answers

Difference between "NT AUTHORITY\NETWORK SERVICE" and "NT AUTHORITY\SYSTEM"

I am installing MS SQL Server 2008 R2 and I got to the window where I have to set the service accounts. I want to know the difference between NT AUTHORITY\SYSTEM and NT AUTHORITY\NETWORK SERVICE. I tried to Google it but I found no well-defined…
Majd
14
votes
4 answers

What do I do when pg_cancel_backend doesn't work?

If I have a long-running Postgres query, and regular "kill [pid]" doesn't work, and pg_cancel_backend doesn't work, what should I do?
mike
14
votes
6 answers

How can I diff two Oracle 10g Schemas?

I have the feeling that there are some difference between two large complicated Oracle schemas which should be identical, so decided to dump and diff them to investigate. I found an article…
Stuart Woodward
  • 1,343
  • 4
  • 14
  • 29
13
votes
9 answers

Where are credentials for SQL Management Studio saved?

When we logged into SQL Management Studio(using Server Name, Login and Password) with checked "Remember Password". I need to know, where it save in PC. I need to format my PC. And when we install SQL Management Studio, then I will lose my all…
Gaurang Mistry
  • 173
  • 1
  • 1
  • 5
13
votes
2 answers

Is there a MySQL performance benchmark to measure the impact of utf8_unicode_ci versus utf8_general_ci?

I read here and there that using the utf8_unicode_ci collation ensures a better treatment of unicode text (for example, it knowns how to expand characters such as 'œ' into 'oe' for searching and ordering) compared to the default utf8_general_ci…
MiniQuark
  • 3,875
  • 2
  • 21
  • 23
12
votes
5 answers

How to load-balance SQL Server 2008 for high-usage ASP.NET applications?

Imagine that you have a successful web application that uses ASP.NET and IIS 7. It generates many calls to a SQL Server 2008 database, and is expected to be available to the public with 99.9% uptime (downtime of 8 hours, 45 minutes per year). Our…
Yakov-MIK
  • 123
  • 1
  • 1
  • 5
11
votes
2 answers

disable maximum password length on Windows Server

When trying to create a password longer than 16 chars on my Windows 2012 server, it is refused due to the password being to long. I have tried looking for a GPO called "Maximum Password Length" - which i cannot find. The problem might be in: PwdFilt…
11
votes
3 answers

mysqldump ignore table with wildcard

I need to take a dump of a database containing 50 odd tables of which I want to exclude about 15 odd that have prefix exam_ I tried mysqldump --ignore-table=dbname.exam_* and even tried --ignore-table=dbname.exam_% It didn't work as expected. I had…
anup
  • 717
  • 4
  • 9
  • 19
11
votes
2 answers

Alias a linked Server in SQL server management studio?

Hoping someone can help - is there a way in SQL server management studio 2008 R2 that I can alias a linked SQL server? I have a server, added by IP address, to which I do not have the login credentials - however as the connection is already setup I…
absentmindeduk
11
votes
3 answers

Creating a sql dump of Microsoft Access tables

Is it possible to generate a sql script that contains CREATE and INSERT statements for some tables within an Access database?
digiarnie
  • 253
  • 1
  • 2
  • 6
10
votes
2 answers

DB auto failover in c# does not work when the principal server physically goes offline

I'm setting up DB auto failover in C# with SQL Server 2008 and I have a 'high safety with automatic failover mirror' using a witness setup and my connection string looks like "Server=tcp:DC01; Failover Partner=tcp:DC02; database=dbname;…
user62521
  • 121
  • 2
  • 4
10
votes
3 answers

SQL Server: Statements vs. Batches vs. Transactions vs. Connections

My question is simple: What are the differences / similarities / cardinalities between Transactions Batches Connections and Statements in SQL Server? As far as I understand a connection is a single communications channel between a SQL Server…
Sleepless
1
2
3
85 86