1
vote
3answers
9k views

SQL Server 2008 R2 Query Last Successful Database Backup For All DBs

Is it possible to query the last successful backup date (and perhaps the type of backup) of each database in SQL Sever 2008 R2?
6
votes
1answer
6k views

Will mysqldump command also backup all the views that are present in DB or there is a special command for it?

I am trying to backup my entire database along with the views. I am going to use mysqldump command. I was wondering if that will copy all the views or I will have to use separate command for it. ...
4
votes
2answers
189 views

Deadlock during Slony uninstall and concurrent access of DB

I am using slony1-2.0.4.rc2 and postgresql-8.4.0-0. I faced a deadlock in the slony uninstall process. I was trying to uninstall node from a cluster, as per slony's documents this requires access ...
6
votes
3answers
853 views

Why is @temp table performance some times worse than #temp table performance?

I was recently working in a very slow stored procedure (took 5 minutes to run). I made a very small tweak from doing this: declare @tempTable table ( ... ) insert into @tempTable select ..... to ...
6
votes
4answers
9k views

When to add indexes to #temp tables?

When testing stored procedures in SSMS, it sometimes says there is a missing index on #someTempTable____________________000000000000005B] (someField) etc etc When I do add them like this to the sp: ...
17
votes
3answers
2k views

Is it OK to blindly add missing indexes?

I often use SSMS to test my slow stored procedures for missing indexes. Whenever I see a "Missing Index (Impact xxx)" my kneejerk reaction is to just create the new index. This results in a faster ...
2
votes
4answers
378 views

What “tool” to use for monitoring instances and where to store this data?

I have three SQL Server instances in my DW project, development, test and production. I also have two SSIS servers (dev/test, production). My intention is to query data from these three SQL Server ...
2
votes
2answers
94 views

Is it safe to use “Safety” as a schema name?

I was considering using "Safety" as a new schema name in SQL Server. In SSMS, the term Safety is colored as a keyword, but this term is not listed as a reserved keyword in the BOL. The database does ...
5
votes
3answers
1k views

Does the PCI standard forbid the use of Windows Authentication?

We currently use Mixed Mode for our SQL Server Authentication. I've tried to convince our DBA to allow us to use Windows Authentication so we can use Team Foundation Server, however he absolutely ...
4
votes
1answer
639 views

How do I replicate Mysql DB server to new server?

Let me give you a preface by stating I am fairly new in Mysql environment. I am trying to replicate my production server to a new server (with better hardware configuration). I want to replicate ...
5
votes
2answers
525 views

How can I run multiple concurrent versions of my application against the same database?

Background: I have multiple concurrent versions of my application running in my production environment. Depending on the user account that's used, the user will have access to a different version of ...
7
votes
1answer
1k views

recover a single mysql database on a busy master-slave replicated system

Looking for a strategy or tool to deal with recovering a single database to a point-in-time in a busy replicated system. I have 12 databases running on 2 MySQL 5.0.77 servers in master-slave ...
2
votes
2answers
269 views

Sudden reduction in full backup size

I recently repaired a single corrupt page in one of the tables in a 70gb database. I had a backup which included the data contained in the page so I went about using DBCC CHECKDB with ...
2
votes
1answer
3k views

SQL Server 2008 R2 64bits repair error

I had to reinstall the default server instance on one Windows 2008 R2 server. I checked that the sql groups were cleaned and the registry keys cleaned before reinstalling. After reinstalling, the ...
0
votes
2answers
1k views

Creating a New Database Across a Network with SQL Server 2008 R2

I appreciate that the above should not be done ('Creating a New Database Across a Network with SQL Server 2008 R2') for all of the reasons outlined here but a client wants to know how to do this and ...
14
votes
3answers
10k views

Meaning of 'SET' in error message 'Null value is eliminated by an aggregate or other SET operation'

I saw the above 'ANSI warning' message today when running a colleague's script (and I don't know which of the many statements caused the warning to be shown). In the past I've ignored it: I avoid ...
4
votes
2answers
2k views

MySQL: Storing unique URLs

I am creating a table wich will contain user-provided URLs. I want those to be unique, so when the user gives me a URL I will first check if the URL exists and if so return the ID for the entry. If ...
25
votes
2answers
8k views

I/O requests taking longer than 15 seconds

Usually our weekly full backups finish in about 35 minutes, with daily diff backups finishing in ~5 minutes. Since tuesday the dailies have taken almost 4 hours to complete, way more than should be ...
1
vote
2answers
1k views

Can I restore the defult SQL Server Public Role?

I setup a new user login and attached it to a specific database on my server. I then opened up management studio on my local pc, connected to the database using the server IP and selecting the ...
5
votes
1answer
976 views

How to calculate cache misses for PostgreSQL

I'm administering a server where a tool using a PostgreSQL runs. The tool takes care of most PostgreSQL configurations by itself, but I'm observing some performance problems. I could confirm at OS ...
2
votes
1answer
196 views

Varchar to date in SQL Server 2008 [closed]

I have varchar data in database table which stores date in DD-MM-YYYY format. I want to select that varchar in MM-DD-YYYY format. I'm using select convert (varchar(30), (select CONVERT(datetime, ...
3
votes
3answers
515 views

Odd SQL Server hang when querying exec DMVs

The other day I ran into a very odd issue that when I execute this query: select * from sys.dm_exec_cached_plans cp inner join sys.dm_exec_procedure_stats ps on ps.plan_handle = cp.plan_handle ...
3
votes
2answers
9k views

Oracle 11g SYSDBA login

I installed Oracle 11g on my win xp machine. Now I want to connect to the database. I was told that to connect to the database from command prompt I should use SQLPLUS "/ AS SYSDBA". But I want to ...
1
vote
2answers
1k views

Backup of Postgres database

I want to create a backup of my database in Postgres. I'm using pgAdmin. on my database I have clicked right button of mouse after that I've selected the "Create a backup of database" After that ...
5
votes
2answers
3k views

Which version of MySQL should I use?

For ages I have been using MySQL 5.1.37. Recently I noticed that this version is no longer supported in repository, so I need to upgrade mysql. I assume that changing the version should be ...
2
votes
1answer
145 views

strange optimization of query results in phantom value conversions

-- DB collation is German_PhoneBook_BIN CREATE TABLE [dbo].[partition_tbl]( [tbl_name] [varchar](255) NOT NULL, ) ON [PRIMARY] INSERT INTO partition_tbl VALUES ('some_table_{num}') INSERT INTO ...
2
votes
2answers
53 views

Size of the database and table while inserting and deleting in sql server 2005

I have created a table : Table1. Inserted 100 thousand rows and deleted. I did the same around 100 times ( inserting and deleting). Will it cause of increasing the database and table size every time? ...
1
vote
1answer
24 views

Unable to login to SQL Server + SQL Server Authentication

i forget my sql server username and password(sql server 2005).therfore i didn't get into sql server.So please give some answers to me.how can i solve this problem?
0
votes
1answer
198 views

ORA-04020 on Oracle SE1 (11.2.0.1)

We've been experiencing some deadlock issues on our Oracle SE1 (11.2.0.1) database server (Red Hat 5/64bit) Seeing ORA-04020 errors in the logs. Is going to 11.2.0.2 the only way to resolve the ...
3
votes
3answers
517 views

What's the most cost effective or cheapest way for high availabity on Oracle Standard Edition One?

We are currently using Oracle Standard Edition One running on two physical database server. If I wanted to get higher availability, what's the most cost effective way or cheapest way to achieve this? ...
4
votes
2answers
2k views

ROWLOCK in sql server

I have a table to update with no indexing in the where clause so I use ROWLOCK in the update script, hoping to get row lock instead of table lock but no luck.. so what is the function of the ROWLOCK ...
3
votes
2answers
2k views

Copying Oracle user without dump file

I'm looking for a way to copy an Oracle user and its data to a new one without dump file. Google search brings a tip by Steve Karam, which seems to be exactly what I want. However the page is not ...
0
votes
2answers
109 views

Service Broker to Send Messages Specific Database bases based on critiera

In Message Broker can you configure to use one queue but based on criteria send to a different Databases or is it a one to one relationship? I am tryibg to figure out if I should use Message broker or ...
6
votes
2answers
14k views

SQL Server Transaction Timeout

Is there a way in SQL Server 2008 R2 to cause a timeout for a database modification involving a transaction? We have a scenario where our application code hangs or throws an exception and fails to ...
17
votes
1answer
5k views

Best practices for schema changes and data migrations to a live database without downtime?

How do you make schema changes to a live database without downtime? For instance, lets say I have a PostgreSQL database with a table including various user data like email addresses etc, all ...
1
vote
4answers
707 views

Maintenance Plan for all Online databases doesn't execute for all databases

Using SQL Server 2008 R2, I have a maintenance plan that has a basic Backup All Databases (ignore offline) task, and clean up after 7 days. However, I note that sometimes I lack backups for ...
1
vote
1answer
169 views

How can I edit a replication subscription to include new articles?

I have some replication subscriptions and I need to add some tables to one of the subscriptions. Is this possible? Publisher/Distributor: Sql 2000 Subscriber: Sql 2008 Thank you. edit: I found this ...
1
vote
0answers
57 views

What patch(es)/feature(s) to Oracle provide the column avg_hard_parse_time on v$sqlstats?

I have some profiling scripts which work in some environments, but not others; the odd thing is that it doesn't seem terribly consistent across versions, so I'm guessing there's some patch or feature ...
1
vote
1answer
747 views

How do I set up active-passive database clustering between data centers?

I am looking to setup an active/passive database cluster between data centers using mirroring and/or log-shipping across these two nodes. My challenge is understanding High Availability (HA) and ...
3
votes
2answers
4k views

How to free space after deleting the millions of rows from a table

I performed a delete operation on my table . It deleted around 10 millions of rows from it How do I free the space associated with the deleted data. I used the query: alter table tablename ...
3
votes
2answers
523 views

Microsoft SQL Server 2005 Encryption Options

I'm trying to explore some encryption options on Microsoft SQL Server 2005. I've recently got around SQL Server 2008 and was able to enable Transparent Data Encryption (TDE). Now I'm trying to figure ...
6
votes
2answers
2k views

Insert-heavy InnoDB table won't use all my CPU

I have a packet log database, which is almost never queried. It just needs to be fast on inserts. I'm using InnoDB because I'd like to maintain ACID compliance, since even losing a single packet could ...
7
votes
2answers
2k views

Defragmentation - Rebuilding Indexes SQL Server 2005

I'm researching defragmenting databases and it seems the following SQL statement is what I'm looking for: ALTER INDEX ALL ON mytablename REBUILD WITH(ONLINE = ON) When I pull the info from ...
3
votes
2answers
1k views

MySql replication with Raw Data and InnoDB tables

I want to start replication on DB that has many InnoDB tables and MyISAM tables. I did everything according to manual Creating a Data Snapshot Using Raw Data Files. Firstly, I tried copied all ...
3
votes
1answer
3k views

Oracle: Read from CLOB column line by line and insert to the table

I have CLOB column, and wanna read its data line by line to insert it in another table. Now let's create the same situation that I have: Data in a Table MyTable_1 OWNER | TABLE_NAME | SQL ...
1
vote
1answer
258 views

Send a trigger to an application upon a specific SQL Server server usage pattern

I've been dealing with a vendor's unconfigurable application which is, unfortunately, the most feature-complete in its niche. I'm looking to augment its capabilities with on-top screen display. Its ...
3
votes
1answer
119 views

Does combining columns into 1 column helps to optimize a large table?

I have user, items and user_items tables, and as usual user has many items. Tables contains: User: ~50K Items: ~3.5M UserItems: ~5M I am using MySQL and most of my queries are selecting items of a ...
4
votes
1answer
98 views

Relationship between number of transactions and redo generation

If I execute some SQL statements over many transactions instead of just committing once after all statements, will this have an effect on the amount of redo log generated? And hence on the size of the ...
7
votes
3answers
2k views

Oracle's left join and where clauses errors

CREATE TABLE "ATABLE1" ( "COLUMN1" VARCHAR2(20 BYTE), "COLUMN2" VARCHAR2(20 BYTE) ); CREATE TABLE "ATABLE2" ( "COLUMN1" VARCHAR2(20 BYTE), "COLUMN2" VARCHAR2(20 BYTE) ); ...
4
votes
2answers
186 views

MySQL: Is it safe to have a table with multiple millions of rows?

I have a very complex search query to write that will touch many tables, have conditions and joins. For efficiency reasons, I am strongly considering creating a "cache table" where I would maybe once ...

15 30 50 per page