Index Management And Database Availability

May 23, 2008

Hello


I'm working on an application which is mainly used to look up compressors and their data which are held in documents.

This is a simplified representation of the tables of importance:

Document
--------
Id (int, identity) (PK)
Number (nvarchar(50))

Compressor
----------
DocumentId (int) (PK, FK)
Id (int, identity) (PK)
Name (nvarchar(50))

CompressorData
--------------
CompressorId (int) (PK, FK))
Id (int, identity) (PK)
Value (nvarchar(50))

The tables are linked as follows:
Document -> Compressor -> CompressorData

Non clustered indexes are created on Document.Number and Compresor.Name because these fields are used for querying.

At certain points corrections will be released on compressors which
will result in:
- Creating new documents with new document numbers (note that a non clusterd index exists on Document.Number).
- Copying affected compressors of existing documents into the new documents (note that a non clusterd index exists on Compressor.Name).
- Copying the data of the affected compressors into the new documents.

This can result in creating ten's of new documents and copying hundreds compressors and thousands compressor data records.

My question:

Will the users still be able to query for compressors while corrections are released (thinking about indexes which need to be modified) or will their be so many locks held that the database becomes unusable?


Thanks in advance,

Alain

View 5 Replies


ADVERTISEMENT

Index Management And Effects On Database Availability

May 26, 2008

Hello


I'm working on an application which is mainly used to look up compressors and their data which are held in documents.

This is a simplified representation of the tables of importance:

Document
--------
Id (int, identity) (PK)
Number (nvarchar(50))

Compressor
----------
DocumentId (int) (PK, FK)
Id (int, identity) (PK)
Name (nvarchar(50))

CompressorData
--------------
CompressorId (int) (PK, FK))
Id (int, identity) (PK)
Value (nvarchar(50))

The tables are linked as follows:
Document -> Compressor -> CompressorData

Non clustered indexes are created on Document.Number and Compresor.Name because these fields are used for querying.

At certain points corrections will be released on compressors which
will result in:
- Creating new documents with new document numbers (note that a non clusterd index exists on Document.Number).
- Copying affected compressors of existing documents into the new documents (note that a non clusterd index exists on Compressor.Name).
- Copying the data of the affected compressors into the new documents.

This can result in creating ten's of new documents and copying hundreds compressors and thousands compressor data records.

My question:

Will the users still be able to query for compressors while corrections are released (thinking about indexes which need to be modified) or will their be so many locks held that the database becomes unusable?


Thanks in advance,

Alain

View 15 Replies View Related

SQL 2012 :: Re-index With AlwaysOn Availability Groups

Sep 15, 2015

We have multiple SQL 2012 SQL servers setup in an alwaysOn availability groups. Where should we schedule the re-index? We have Server1 as the primary and 2 secondaries Server2 and Server3. Are their any tricks to have it run on which ever one is the primary?

View 1 Replies View Related

SQL Server Admin 2014 :: High Availability Index Rebuilds

Jul 9, 2015

I have a situation where I need to rebuild indexes on a large DB (500G).

When I do a test run of the rebuilds in my test environment it uses 100G of space - which is fine with me.

When I do a rebuild in my High Availability environment - same DB, same script - it eats up over 600G of space and fills the volume.

What can I do without removing my DB from H/A to rebuild the indexes?

View 8 Replies View Related

Management Studio - How To Index Tables Based On Query - Please Help

Mar 20, 2007

We are using SQL2005.
I have a stored proc that runs a Select query based on a complex view.
The sproc has two input date parameters (StartDate and EndDate).
We are experiencing SQL timeout problems when the sproc is run with certain Start and End Dates.
We have run the SQL Profiler and created a trace (trc) file (We've used the 'Default' trace configuration).
We have used the trace file in SQL Server Management Studio to try and automatically create indexes on some of our tables.
Unfortunatly SQL Server Management does not make any index recommendations.
I think we are not capturing the right information in our trace file to allow SQL Server Management Studio to do its job.
How do I use SQL Profiler to capture a trace of my sprocs query, so that it can be used by SQL Server Management Studio, to recommend index changes?
Any help appreciated.
Reagrds,
Paul.

View 1 Replies View Related

Server Management Studio Crashes On Create Index

May 12, 2008



Hi

I'm trying to use a udt in a table creation, and everything works as expected, right until the moment where I rightclick on [Indexes] to create a new index.

Then I get this error:

TITLE: Microsoft SQL Server Management Studio
------------------------------
Cannot show requested dialog.
------------------------------
ADDITIONAL INFORMATION:
Cannot show requested dialog. (SqlMgmt)
------------------------------
Object reference not set to an instance of an object. (SqlManagerUI)
------------------------------
BUTTONS:
OK
------------------------------


This is the script I use to create the table:


exec sp_executeSql N'CREATE SCHEMA [TestSchema] AUTHORIZATION [dbo]'

GO

CREATE TYPE [TestSchema].[type_TestType]

FROM uniqueidentifier ;

GO

Create table [TestSchema].[Periode3]

(

Periode3_UID uniqueidentifier NOT NULL ROWGUIDCOL,

rowVersion timestamp NULL,

owner uniqueidentifier not null,

validFrom datetime

NOT NULL CONSTRAINT

DF_Periode_modified3 DEFAULT getdate()

);

Alter table [TestSchema].[Periode3]

add PeriodeType [TestSchema].[type_TestType];

now if I replace the 2 last lines with:


Alter table [TestSchema].[Periode3]

add PeriodeType uniqueidentifier;


everything works as expected.

Where did I go wrong ?

regards
Jens Chr

View 5 Replies View Related

Creating A Full Text Index From Management Studio 2005?

Mar 13, 2008



I know how to create it from the query window:



CREATE FULLTEXT INDEX ON table_name
[(column_name [TYPE COLUMN type_column_name]
[LANGUAGE language_term] [,...n])]
KEY INDEX index_name
[ON fulltext_catalog_name]
[WITH
{CHANGE_TRACKING {MANUAL | AUTO | OFF [, NO POPULATION]}}
]


But where and how can I create it graphically in management Studio for 2005?



Thanks for any help or information.

View 1 Replies View Related

Database Availability Issue

Oct 24, 2007

I have a large db that goes through regular maintenance
every week. The problem seems to be that while the db is re-indexing some of my
key tables I get time out errors.   Are there any suggestions on how I can combat
this problem.  Management has tasked me
with having 24 hour access to the db because if people aren’t completing there
transactions we don’t get paid.  I have
also noticed the timeout issue when we are running in files that create new
records.  Is this a basic problem with
the way the db is structured?  Are they
any tools that I can use to change our process so that we can maintain the 24
hour access to the db.  How are other
companies maintaining 24 hour access to there db?

 

 

Thanks in advance.

 

 

Don

View 1 Replies View Related

Need Of Username Check Availability From Database

Jun 3, 2008

i want to check the new username check availability from database in a same page ,i did in normal coding
i need ajax or java scripts method because this page look and feel is not good
thanks,
@mbi

View 6 Replies View Related

Products To Monitor Database Availability

Nov 4, 2003

Are there any other products out there to monitor database availability
in SQL server 2000 beside Tivoli by IBM?

Thanks;
Lava

View 1 Replies View Related

Database Design-room Availability

Jan 24, 2008

Hi,

I am developing a .Net application for a Guest house for my final year project. I'm using C# and SQL Server. I want a way to look up if a room is available or not on a particular date.

First I came up with...
Room: Room_id(PK), Room_type, Room_rate_pp, Room_availability

but how can I distinguish whether a room is available on a particular date? I think Room_availability is useless in this table because it can't do this. Do I need some sort of calendar table or something?

Your help with this would be greatly appreciated. it's annoying me so much, and I can't move on with the project until I have my database finalised :eek:

Thanks,

Sean

View 1 Replies View Related

SQL 2012 :: Database Can't Be In Two Availability Groups

Jun 30, 2014

I been trying to learn availability groups since I have not implemented it.

From my understanding you can have more than one group.

Lets pretend we have two groups in one instance:

1. Accounting
2. Engineering

From my understanding you can't make a database in two AG because it wouldn't make sense.

But lets pretending there is one database that both are used by accounting and engineering.

Would you have to make a third AG for future fail overs so that other databases in the other two group don't failover when not needed because when you fail over an AG all the databases inside it fail over.

View 3 Replies View Related

Recovery :: Add Database Into Availability Group?

Nov 9, 2015

SQL 2012 EnterprisePrimary server and 2 x secondary serversWindows 2012 R2

I have removed one of the database from availability group by mistake. Luckily I am still operational with primary server.  database on secondary servers are on restoring mode.

I have done full backup of database from primary (prod) server and restored on secondary servers with no recovery when I add database into availability group I get an error message log missing what is the best method to achieve and add database again into availability group.

Note I cannot restore database on primary server as it is on production

View 9 Replies View Related

High Availability For Database Mirroring

Oct 30, 2006

Hello,

I would like implementing a database mirroring architecture with SQL server 2005 but i have questions.

If i don't use a cluster architecture, i would like knowing if there's any solution to move the alias SQL server from the primary to the secondary by script.

Anyone got a pb like me? or any solution?...

Thanks for your help...

View 10 Replies View Related

Language Error When Creating FULLTEXT INDEX By Using SQL Server 2005 Management Express!

Apr 12, 2007

Hello..
When I used Microsoft SQL Server 2005 Management Studio Express to Create FULL TEXT INDEX by this code:

CREATE FULLTEXT INDEX ON txtfilestbl(txtfile) KEY INDEX PK_txtfilestbl ON ForumsArchiveLibCtlg WITH CHANGE_TRACKING AUTO

It returns this ERR MSG:

Informational: No full-text supported languages found.
Informational: No full-text supported languages found.
Msg 7680, Level 16, State 1, Line 1
Default full-text index language is not a language supported by full-text search.

I Use same this code to create FULL TEXT INDEX by using Microsoft SQL Server 2005 Management Studio, and it was working properly.
What I have to do?

View 2 Replies View Related

SQL 2012 :: Reestablish One Database In Availability Group

Jul 29, 2014

I've got an availability group with multiple databases, replicating to multiple secondary servers. On one of the secondary servers, some of the databases are not synchronising, and when we try re-establish the sync we get an LSN error. I can't see any obvious way to re-establish only one database on one secondary without affecting all databases on that secondary or affecting that database on all secondary nodes.

The options I seem to have are to either remove the database and then re-add it, in which case this affects all secondary replicas, or to remove the secondary replica and add it, in which case all the DBs are added.

View 3 Replies View Related

SQL 2012 :: AlwaysOn Availability Group Per Database

Jun 26, 2015

We are planning to upgrade our production servers from mirroring to alwayson. Our current mirror setup gives the advantage that it can failover a single database.To have a similar setup in alwayson we are probably going to create an availability group per database. Any other disadvantage in this except for the extra initial configuration work?

View 9 Replies View Related

SQL 2012 :: Adding Datafile To Database In Availability Group

May 15, 2015

one of my database is configured in availability group , I need to add another datafile to that database , how can I do this?

View 6 Replies View Related

Recovery :: Move Database Files That Are In Availability Group?

Sep 17, 2015

I need to move files for a lot of databases that are all part of an AG. I've used the method at the bottom of this link with success on a small test DB.

View 2 Replies View Related

Recovery :: 2012 R2 High Availability Database Not Replicating?

May 19, 2015

Discovered that a geo-spatial AlwaysOn HA database (1 of 4) was not synchronizing as at a point in time earlier in the day.  Suspend Data Movement appears to be working perpetually without finishing.  The SQL Server services is in a Pending Changes state after an attempt to restart it from SQL Configuration Manager.  The Cluster Dashboard says it is in a Not Synchronizing state, with only the one database in question having a yellow triangle, all 3 others show green.  

The warning for the cluster is:At least one availability database on this availability replica has an unhealthy data synchronization state. If this is an asynchronous-commit availability replica, all availability databases should be in the SYNCHRONIZING state. If this is a synchronous-commit availability replica, all availability databases should be in the SYNCHRONIZED state.  There is no abnormal data movement from the primary to the seconday.The warnings for the unhealthy database are:

The data synchronization state of this availability database is unhealthy. On an asynchronous-commit availability replica, every availability database should be in the SYNCHRONIZING state. On a synchronous-commit replica, every availability database should be in the SYNCHRONIZED state.Either a database administrator or the system has suspended data synchronization on this availability database.So how to get this database back to synchronizing state?

View 2 Replies View Related

DB Engine :: High Availability Database Backup Error

May 19, 2015

Backing up all databases on a sql server that hosts secondary high availability databases as well as other databases.  The other databases back up fine, but the high availability secondaries all get the same error:

BackupDiskFile::OpenMedia: Backup device 'F:MSSQLBackupdbnamedbname_backup_2015_MM_DD_tttttt_ttttttt.bak' failed to open. Operating system error 2(The system cannot find the file specified.)

View 11 Replies View Related

Recovery :: SharePoint Database Run Out Space In AlwaysOn Availability Group

Jul 11, 2014

I have a situation where I have two servers in SQL Server 2012 R2 AlwaysOn Availability Group. One is primary and the other one being secondary.  I am only running SharePoint Database on it.I have run out of space on the primary server and about to run out of space at the secondary server.  I have tried shrinking database transaction log files, but it returns an error that it cannot be shrunk as the database is in the AlwaysOn Availability Group.

Questions:
1.  Several forums suggest that databases need to taken out of AlwaysOn Availability Group in order for the shrinking to work properply?
2.  Would it have any impact on the database if it is taken out of availability group and then added back?

View 6 Replies View Related

Recovery :: Replicate Server Database To AlwaysON Availability Groups

Dec 1, 2015

I have configured replication between Always ON Availability Groups  (Listener) (PUBLISHER), remote distributor to XYZ SUBSCRIBER...with above link ...

Now, I want to know how to replicate Data from XYZ SERVER a PUBLISHER to Always ON Availability Groups  (Listener) (SUBSCRIBER)? Distributor Database being on XYZEX:

XYZ SQL SERVER as PUBLISHER, and DISTRIBUTOR 
to 
Always ON Availability Groups  (Listener) SUBSCRIBER...

View 3 Replies View Related

Recovery :: Migrating Existing Availability Group To New Datacenter Availability Group

Nov 20, 2015

need to migrate a cluster with an AG dtabases to new data center cluster with AG.

I was wondering if is possible to do mirroring on top of the AG configuration? or what other options could be to migrate a cluster that has 3 nodes and setup the ag databases to a new datacenter.

View 17 Replies View Related

SQL Server Admin 2014 :: Database Backups And AlwaysOn Availability Groups

Oct 16, 2014

This is my first deployment of an always on availability group for SQL 2014 and I'm trying to get my custom backup procedure to handle all databases appropriately depending on the primary group. Basiscally I want the system databases and all databases that don't participate in the availability group to be backed up on both nodes and those that do participate backed up ONLY on the primary server. I've looked at the sys.fn_hadr_backup_is_preferred_replica funcation, but would like to only have to test for a single databases existance in the availability group. If the one database is in the group, only backup the system databases and those that don't participate, otherwise backup everydatabase. This would be the case for both full backups and transaction logs.

View 1 Replies View Related

SQL Server Admin 2014 :: Exit From Not Synchronizing Primary Database In Availability Group

Jan 27, 2015

I Create an availibility Group with a primary and a secondary. (For test)

Then run Planed Failover.

Switched to secondary. That's ok.

After that I update some tables on secondary (That now is primary)

I Run Again Planed Failover on server 2.

Switched. OK

But primary database Get (Not synchronizing) Status.

And in primary I don't have that updates.

How to sync these databases and exit from Not synchronizing.

View 5 Replies View Related

Can The Implementation Of Database Shared File Method To Achieve The Objective Of High Availability?

May 2, 2008

Hi,
can I assign a NAS(Network Attached Storage) server to store the database file(readable and writable) and assign other several MS SQL database servers which will use the same database file in NAS to achieve the objective of high availability?

If it can, how can I set it up in MS SQL Server or it requires another 3rd patry software to set it up?

Thanks.

View 4 Replies View Related

2005 Database Will Be Shown In Management Sudio Express Or App_Data/Database Explorer?

Feb 13, 2008

I have installed 2 SQL Server 2005 Express sample databases from 2 books, ASPnet 2.0 and ADOnet 2.0. The ASPNETDB.MDF was shown in App_Data and Database Explorer, but not in the SQL Server Management Studio Express. The AdoStepBy Step database created by a ConfigDB.exe was displayed in the Management Studio, but not in the App_Data, or Database Explorer.

Is this the way SQL Server 2005 runs the 2005 databases for SQL Server 2005 Express only? Or also in SQL Server 2005?

TIA,
Jeffrey

View 6 Replies View Related

SQL Security :: Cannot Expand List Of Database Tables Using Contained Database Login With Server Management Studio

Jul 30, 2015

In SSMS, I connect Object Explorer to a partially contained database using a contained user login with password. This user has a database role of dbdatareader. When I try to expand the Tables in the database, I get the error: 

The SELECT permission was denied on the object 'extended_properties', database 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)

Is there a way to set permissions for the contained user so that this could be done?

View 4 Replies View Related

Difference Between Index Seek && Index Scan && Index Lookup Operations?

Oct 20, 2006

please explain the differences btween this logical & phisicall operations that we can see therir graphical icons in execution plan tab in Management Studio

thank you in advance

View 3 Replies View Related

SQL Database Management

Nov 9, 2005

I have looked everywhere I can think of for the answer to this and am completely confused.  My IT dept created an SQL database for me on a server.  My plan is to create web pages in asp.net using Visual Web Dev Express released this week.  I have connected to the database but I can't figure out how I am supposed to create my tables in the database.  What simple/obvious thing am I missing here?  I keep trying to download SQL Server Express in hopes that I can use that to manage my database but it keeps telling me that it won't install because I have previous Beta versions left on my machine.  I can't find those either so am out of luck.  I am new to this so perhaps I am asking all the wrong questions.Does anyone know what I can do to find a useful database management tool that will allow me to add/create the tables?Thanks for any help!

View 2 Replies View Related

Database Management

Aug 25, 2007

Hi,
I need support for the following problem.
It is a teamwork.Suppose 25 databse developer developing a databse.every one make modification (update,delete,insert)to the centralized database.I want that every one its on database copy and make modification to that instead to centerlized database.As source control softwares do(e.g visual source safe).or any other way to manage database in such senerio.
Hope any one will help.
Thanx in advance.

View 5 Replies View Related

Database Management?

Jul 19, 2007

Hi to All,
I am working in vb and C# .net as front hand and use mySql or Squel server as back-hand.
task is, i did here it that, we have more than one table, each and every is related by using the concept of Primary and Foreign key management.
in that database if i remove a record from master table, than the related record of all child talbes shall auto-matically reoved that is my question how it does happen.
first thing that you have understood my problem if yes than please if you have any idea, mail me.
i will very much thnks in advance to you.
bye
regards Rajat.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved