Quantcast
Channel: SQL Server Database Engine forum
Viewing all 12554 articles
Browse latest View live

Database Issue

$
0
0
I have an issue that I'm trying to resolve with my first database i'm creating for a client.  I'm creating a reservation system for a river tour company and in the database I'm having a problem figuring out an efficient table layout. 

The business requirements:
1) Ability to take a persons information down (name, phone number, age)
I have solved this one by creating a
Code:
person
table that is identified by
Code:
PersonID
.
2) Ability to sign a person up for various trips. (They offer a kayak trip, a tube trip, and a rafting trip)
3) Each trip will go out twice a day, everyday at set times (7:30AM and 12:30PM)

After having my person table set up, I'm not really sure where to go from there..I tried setting up a
Code:
TripSchedule
table that has foreign keys from a
Code:
Date
table, and
Code:
Time
table, and the
Code:
Person
table, but that didn't really make sense to me so I deleted those tables and am only left with my
Code:
Person
table.  Where should I go from here?

Can we disable 'max_rollover_files' to stop file rollover for Xevent session.

$
0
0

Hello,

Is it possible to disable file rollover option for extended events session. If i don't specify value for this it is taking a default value of 5.

ADD TARGET package0.event_file(
		SET filename=N'S:\Trace_temp\query_performance.xel',
		max_file_size=(2),
		max_rollover_files=(0),
		metadatafile=N'S:\Trace_temp\query_performance.xem')

Thanks


MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source DS_TraceEvents

$
0
0

Hello,

On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink.

A data source has not been supplied for the data source DS_TraceEvents

SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX)

1. exec sp_executesql N'SELECT
dtb.name AS [Name]
FROM
master.sys.databases AS dtb
WHERE
(dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX'

this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server).

2. USE [datatbaseX]

this produces the following error:

Msg 911, Level 16, State 1, Line 1
Database 'databaseX' does not exist. Make sure that the name is entered correctly.

why is the report looking for the database on my server?

thanks

Jag

Environment: MDW (Management Data Warehouse) on SQL 2008 R2

 

ErrorLog files in my Logs directory consuming large amounts of space.

$
0
0

Good Morning,

We are in the process of implementing Lync 2013.  We have the two SQL Servers in an active\passive mode with replication.
The Log directory for the Lync database has 5-6 files called ErrorLog and the file type is simply File.  They are taking up over 15GB of space in this directory.

Obviously, events are being generated and put into these files, but I have not seen error log files that are this large. Has anyone seen this in for their Lync 2013 SQL Servers? 

Can these files be removed or are they necessary for something. We have truncation enabled for the actual SQL Logs for the databases.

Thanks

Brian Dougherty

Troubleshooting Error: 942, Severity: 14, State: 4

$
0
0

Hi all,

I'm in the process of decomission an old SQL Server 2000. I'm migrating the databases hosted in that instance one by one. I have managed various workaround to handle the changed server\instance name. When I complete the process for one database, I put it offline in the SQL 2000.

I've a trouble with one database, when I put it offline I see into the profiler a lot of error like this (1 error every 1 seconds):

Error: 942, Severity: 14, State: 4

For what I know this error is because somthing is trying to access a database that is inaccessible (in my case offline) but I can't figure from which client the request came!

Please help!

System Generated Session ID

$
0
0
I am new to SQL Server, and I must configure/verify that Microsoft SQL Server 2008R2 will only recognize session identifiers that are system generated.

SQL ServerHigh Availability

$
0
0

Hi
We have different office has its own set of legacy databases, for functions like HR, Finance etc. While each office has fortuitously chosen the Microsoft application stack, that they have, until recently, been independent organisations means that each office’s databases relies on different versions of the underlying technologies. For example, some offices are running SQL server 2005, some running 2012. Some have chosen to implement clustering, some have not.

I have been asked to advise on a plan to consolidate these local databases into a global solution. the role is to ensure that the end result is ‘fit for purpose’ as a production level solution for the firm. 

so My question is 

What aspects of the behaviour or structure of the final system you believe? 

 

Any Assumptions ?

Thanks

     

Error: Could not continue scan with nolock due to data movement, DBCC proccache will clear the probelm

$
0
0

SQL Server: 2008 R2 SP2

Before describing my problem, I have gone via the forum, there is no view or functions inside my stored procedure

When running a particular stored procedure inside crystal report, the error " Could not continue scan with nolock due to data movement" comes once every few weeks. After I clear the query cache plan, it works again for few weeks and the problem comes again. During these few weeks, there is no restart or query plan clearing.

If I run the stored procedure inside SSMS, where the SQL statement is copied and pasted from SQL profiler during crystal report run, there is no error.

I discovered running in SSMS and crystal report generate 2 different query plans even I copied the SQL from SQL profiler, I have actually saved the query plans. Unfortunately, this forum does not accept attachments, or otherwise I will post my query plans here.

There is one thing I notice about the query plan is during nested loop operation, there is a warning "no join predicate". I don't use any views or UDF in the statement, nor did I use pre-1992 ANSI join syntax. However, I did use table variables.

My guess is whether this will cause " Could not continue scan with nolock due to data movement", after I clear the cache, I run crystal report again, and I look at the plan again, the "nested loop no join predicate" warning is gone.

Running this stored procedure took 1 second maximum, even when this error is popping up, it pop up within 1 second.

DBCC checkdb has been run

The same stored procedure running by crystal report in a SQL 2008 (non r2) live environment has no problems, so I am thinking this is R2 specific problems.

The "nested loop no join predicate" error SQL statment is below, no views, no udf, but table variables

INSERT @ChequeAccount
SELECT        PS.PaySummaryID, PS.EmployeeID, PS.CostCentreID,
            (PS.GrossPay    + PS.LumpSumA + PS.LumpSumB    + PS.LumpSumD+ PS.LumpSumE+ PS.ETP+ PS.PaymentsAfterTax    - PS.DeductionsAfterTax   - PS.Tax- PS.ETPTax    + PS.TaxRebate) * -1 AS Amount,
            CGLM.GLAccountID
FROM Pay_Summary PS JOIN Input_Sheet ISH ON PS.InputSheetID = ISH.InputSheetID  AND  ISH.PayrollID = @binPayrollID   
AND PS.PaySummaryID NOT IN (SELECT PaySummaryID FROM @ChequeAccount)
JOIN Payroll P ON P.PayrollID = ISH.PayrollID AND P.EmployerID = @binEmployerID
JOIN CustomGLFixMapping CGLM ON CGLM.EmployerID = P.EmployerID AND CustomGLFixMappingNameID = 1 AND CGLM.CostCentreID IS NULL






Resource Governor Incorrect Behavior

$
0
0

Has anyone notice a bug on the 2008 version of resource governor, where the reported CPU usage is different when you run test query on the server itself and on another PC connecting to the server?

This is a 2 core server. 
When i run 2 different load on the server itself via SSMS, i can see from performance monitor that the 2 load is taking 50% CPU each.
When i run 2 different load on the PC however, performance monitor is showing only 50% CPU shared by the 2 load.

I am very sure that the 2 load had landed on different scheduler.

Anyone kind enough to help me do a quick test on their environment?

Backups and locks

$
0
0

Greetings all,

I'm interested in learning more about the specifics of backups.

When a backup is initiated which locks are applied to the database? Are the locks at the table level and come off and on as required, or is there a broader scope?

Additionally, when a database is backed up in online mode, and a record is written during the backup, does that record become part of the backup as well?

Are tables processed in order as they are backed up? Or is there some kind of parallelism in play?

I appreciate this is a set of questions, but any insight would be very welcome.

Thanks! 

MCSD Sql cerfication

$
0
0

I want to go for MCSD in SQL, so can anyone help me which book should i refer ?

SQL Server 2008 R2 Memory Pressure

$
0
0
I have a SQL Server 2008 R2 Standard (x64 bit). It has 64GB of memory, but memoryclerk_sqloptimizer consumes about 36 GB. How should I clear it and identify what cause the growth of memoryclerk_sqloptimizer. I also have high stolen pages too. Thanks in advance.

SQL 2014 cluster shared volume

$
0
0

Hi,

I have testing SQL 2014 cluster in my lab to see how it's performing. 2xserver 2012r2 (virtual machines). There are some weird issues that are putting me in dust.

1. If I try to backup/restore database, I cannot select data path from gui. (I cannot "browse")

2. I cannot connect applications to databases (sqlclustername\instance)  - permissions denied on cluster shared volume.

Can you please give me a hand on this?

Thank you.

Capture duration time and use it in customized the SQL Server Job System Message

$
0
0

Hi there

I am trying to capture the job duration time and put it on the customized Job email subject.

This is the original message from SQL server, the Bold one is what I am trying to capture.

JOB RUN:            'Hello' was run on 7/30/2014 at 8:05:00 AM

DURATION:        0 hours, 0 minutes, 2 seconds

STATUS:              Succeeded

MESSAGES:        The job succeeded. The Job was invoked by Schedule 27 (Job 2).  The last step to run was step 1 (Test).

Is there anyway to do that? I have tried to pull it from jobhistory and I did't have any luck.

Cheers,

Matt

Delete failing silently

$
0
0

Has anyone come across a situation where a delete statement doesn't give an error, but also doesn't delete the rows specified?

Yes the rows exist as outside the scope of the running application, we can run the same SQL and it does delete the expected rows.

  • It's sql server 2005 sp4
  • It's an ad-hoc delete, i.e. not inside a transaction.
  • The table is accessed via a View which just cuts down the result set on one column's content.
  • The underlying table has several indexes, several foreign key parents and 2 foreign key children (both children are on delete cascade).
  • There are no triggers on the table.
  • The client app is connecting via odbc.

A colleague rememebers something like this in sql 2000 where deletes on tables with foreign keys had problems building an execution plan, and that just failed silently, but I can't find any details of that.

Any ideas?

Thanks
-Ade


Fragmentation when no index column is updated

$
0
0

We have a mid size table (150 GB) that has 3 indexes. The primary key is clustered on its identity column.  The other 2 indexes are unique. None of the columns in any of the three indexes are ever modified. All fields in the table are fixed length. We are using 2005 Standard.

Since the cluster is on the table's identity column, no index column ever gets updated (so no deferred updates) and all fields are fixed length what the potential causes for the fragmentation on the clustered index? 

I know Sybase can defer updates when updating with Join, but I see no documentation the SQL Server does this anymore.

SqlServer 2008 Database Status Showing(Recovery pending)..How to get this database in online?

$
0
0

SqlServer 2008 Database Status Showing(Recovery pending)

How to get this database in online?

This is SharePoint Content database.


Badri

Extended events - asynchronous_file_target

$
0
0

Hi,

Is there some way to clear or force a rollover on files of asynchronous_file_target of an extended events session ?

Thank you!


Dennes - Se resolveu, classifique a mensagem, por favor - [http://www.bufaloinfo.com.br] NOVO DVD Segurança no ASP.NET : http://www.bufaloinfo.com.br/LearingSeriesSegurancaASPNET2.asp

SQL Queries Tuning

$
0
0

Hi All,

I need help from you. There were many queries that are used in the application. If they are fired against the database they are running faster when they are used in application, they are fetching very slow. Kindly advice how to improve the performance of the queries. There were some hierarical queries  and select queries. There were  not more than 300 rows in table.

APpreciate your help.

Thanks,

Ven

Cluster SQLServer install gives error "The volume that contains SQL Server data directory R:\MSSQL11.MSSQLSERVER\MSSQL\Data does not belong to the cluster group."

$
0
0

I am installing a 2012 SQLServer clustered instance on a pair of Windows 2008 R2 servers. I have shared drives mounted on the servers using SAN storage. These drives are all assigned labels and drive letters and show as available in server manager as a cluster resource. They are not in any other cluster group. I have run the SQLServer cluster preparation and all checks and prechecks I know to do pass.  When in the install, in the Database Engine Configuration page, when I specify the data directories I want I get these errors, it seems on just one of the drives involved:

The volume that contains SQL Server data directory R:\MSSQL11.MSSQLSERVER\MSSQL\Data does not belong to the cluster group.

I have volumes E: (for binaries), S: (for data), R: (for logs) and Y: for on disk backups.  I only see this error for drive R: but I don't see any issue with it. 

What can I tell my windows admin to look for or change to proceed with installation?


Viewing all 12554 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>