May I ask what is the following question?
Could not obtain exclusive lock on database ‘model’. Retry the operation later. CREATE DATABASE failed
Could not obtain exclusive lock on database ‘model’. Retry the operation later. CREATE DATABASE failed
I created a extended events, I added the SAS token with full permission in Azure portal, I added a master key and database scoped credential in Azure SQL database, But when I am starting the session, I am getting the following error. Any idea on this issue?
TITLE: Microsoft SQL Server Management StudioHello,
I am looking for script that does reindexing based on the fragmentation level, i have a couple that i created but i want to get some more details about it, thank you.
I am working on Always Encrypted enablement for one of my database. I am seeing an error like :
Sep 19 2018 08:52:53 [Informational] TaskUpdates: Message:Task: 'Performing encryption operations' -- Status: 'Failed' -- Details: 'Task failed due to following error: Cannot save package to file. The model has build blocking errors:
Error SQL71561: Error validating element [dbo].[vwSTUDENTLOAN]: View: [dbo].[vwSTUDENTLOAN] has an unresolved reference to object [testdb].[dbo].[STUDENTLOAN].
When I am trying to encrypt column for entirely different table column for the below, I am getting the above error.
--Table to be encrypted
create Table testtable (Col1 varchar(5000))
Insert into dbo.testtable Select ('Latheesh')
--View Definition
CREATE View [vwSTUDENTLOAN] as
Select
STUDENTLOAN_ID as [vwSTUDENTLOAN_ID],
Cast(GetDate() as datetime) as [DATECREATED],
Cast(GetDate() as datetime) as [DATELASTMODIFIED]
from testdb.dbo.STUDENTLOAN;
I understand, AE tool has a bug that it will check the integrity for all objects and it is not supporting three part naming convention that refers different database.
The Question here is:
I am seeing this behavior is different in different version of SQL Server 2016.
--For the below environment, its working fine.
Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64) Oct 28 2016 18:17:30 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows 10 Enterprise 6.3 <X64> (Build 14393: ) (Hypervisor)
--For the below environment , its not working.
Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64) Oct 28 2016 18:17:30 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 6.3 <X64> (Build 14393: ) (Hypervisor)
Can someone help me why there is difference? Or Am I doing something wrong?
Please let me know if I can provide more details.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped.
[Blog]
Hi everyone!
What would be the simplest way to move tables from one filegroup to another filegroup?
Thanks
Doria
I used Excel Odbc connection to select a table in AS/400, the download speed can be 50-60Mb/s
when I run a script in SQL Server query windows,
IF EXISTS(SELECT * FROM sys.tables WHERE name ='AS400TBL')
BEGIN
DROP TABLE [dbo].[AS400TBL]
END
select * into dbo.AS400TBL From
OpenQuery(ASWDBB
Select * from BLP400.BLP800CFBL.AS400TBL
')
the max download speed is around 1-2 Mb/s.
both are running on the same server, but huge different in the download speed.
Do you know any parameter in the SQL server that I can try to speed it up?
In addition, I change the database to SETRECOVERY SIMPLE.
but cannot see any performance gain.
I'm wondering if somebody could provide insight into a problem I'm having with SQL Server 2005. Although the problem is happening wthin an SSIS ETL, I don't think this problem is SSIS related.
In the ETL I need to rename a database, so I first put the database into single-user mode by issuing the command:
ALTER DATABASE foobar SET SINGLE_USER WITH ROLLBACK 30
The database then goes into single-user mode, and after the renaming occurs, I attempt to put the same database back into multi-user mode:
ALTER DATABASE foobar SET MULTI_USER WITH ROLLBACK IMMEDIATE
However, whenever I have a query pane opened against the same database in SQL Server Management Studio, the ETL fails and I get this error message:
"Error: Changes to the state or options of database 'foobar' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it."
I'm wondering why the ALTER DATABASE command does not kill off the active connections? This is on my development box, and I'm the only one connected to the database. I've tried with ROLLBACK 30 as well, same thing. If I cut and paste the same command into Mangement Studio, the command succeeds so I don't think its a permission issue (using Windows Authentication both Management Studio and the ETL are executed by the same login). If I close the query pane the ETL succeeds at restoring multi-user mode. Is there something I am missing? Thanks in advance!
VVinayPrasad
I have
Microsoft SQL Server 2016 (SP1-GDR) (KB4458842) - 13.0.4224.16 (X64) Aug 18 2018 09:00:06 Copyright (c) Microsoft Corporation Standard Edition (64-bit) on Windows Server 2012 R2 Standard 6.3 <X64> (Build 9600: ) (Hypervisor)
and I have several databases like RECOVERY PENDING.
I run this commands:
ALTER DATABASE BBDD_XXXX SET EMERGENCY;
GO
ALTER DATABASE BBDD_XXXX set single_user
GO
And this commands:
DBCC CHECKDB (BBDD_XXXX , REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;
DBCC CHECKDB (BBDD_XXXX , REPAIR_ALLOW_DATA_LOSS) WITH NO_INFOMSGS;
GO
I get the error:
I run
SELECT database_id, name, state_desc, user_access_desc, recovery_model_desc from sys.databases
GO
13 BBDD_XXXX RECOVERY_PENDING SINGLE_USER SIMPLE
SELECT database_id, name, physical_name AS current_file_location
FROM sys.master_files
13 BBDD_XXXX D:\DATA\BBDD_XXXX.mdf
13 BBDD_XXXX_log D:\DATA\BBDD_XXXX_log.ldf
SYSTEM user has full control about D:\DATA
Too the group SQLServer2005SQLBrowserUser$ComputerName
mdf and ldf files not marked as readonly.
Any suggestions?
www.kiquenet.com/profesional
Hi there,
I want to set backup strategy for a specific database in my SQL server.
In my case, I need to set database full backup every the first monday on month and also need to set database differential backup everyday except the first monday on month.
for example, the schedule is like below
The Monday of the first week: perform only full backup
After that, Differential backup is performed everyday by the end of the month.
and next month, again, the monday of the first week, only Full backup will be performed on that day and then from the next day(=from the tuesday of First week) Differential Backup will be performed.
In this case, how can I set this schedule in SQL Server?
There are no example in Technet so could you please help to do this?
Actually I'm considering T-SQL IF statements but not sure and I'd like to operate this just using UI.
Please help me!
CPU time = 47 ms, elapsed time = 1692 ms.
Edward R. Joell MCSD MCDBA
I need your help on resolving this performance issue with our production database server.
We have a 24 x 7 Content Management System (CMS) running on asp/asp.net 2.0 and SQL server 2005 (I will give details of SQL server at the end of the post). Occassionally, or at least once every 2 weeks, we run into the situation of very high number of user connections to the database and SQL server worker threads maxed out, so the SQL server appears to be unresponsive. It could last for a couple of minutes or even more than half an hour. When we were notified about the issue, our only workable fix at this point is to kill all user connections and it recovers when connections are terminted. Once or twice, it went undetected and by the time we got it, it resolves itself in terms of user connections dropped back to normal.
More details on the sympton:
1. our normal number of user connections is about 1000, when this happens, it is over 2000 or 3000 or even over 4000 at one time.
2. No blocking was found in master..sysprocesses when this happens
3. We caught long-run SQL statements during the time, none of them stands out, because when we rerun those after the incident, they all finish quick enough. So it appears to be a general slowdown of the whole server.
4. On Windows perfmon side, when this happens overall cpu is down noticeably, and rebounce when we kill all user connections, I/O is also down, while no much change on memory side (in terms of cache hitratio, SQL server memory, page lifeexpectancy, etc.). One thing increased dramatically is number of LatchWaits (from around 100 to over 3000)
5. The server is running on an active-inactive clustered configuration, and when it happens, it does NOT cause failover, nor did we resolve by manual failover
We have snapshot of the following views:
master..sysprocesses
master..sysperfinfo
dm_os_schedulers
dm_os_threads
dm_os_workers
dm_os_waiting_tasks
I am waiting for your comments and suggestions. Thanks a lot
>>>>
SQL Server:
Microsoft SQL Server 2005 - 9.00.3215.00 (X64)
Dec 8 2007 17:58:16
Copyright (c) 1988-2005 Microsoft Corporation
Enterprise Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 2)
CPU: 8-way
Server memory setup
physical memory: 32G
min = 16384 MB
max = 28672 MB
max worker threads: 960
No manual Affiintiy control was setup.
<<<<<<
Hi,
I am getting below error on SQL Server 2016 Enterprise With SP2.
MessageWill Microsoft entertain a call for support for SQL Server 2008 R2 Enterprise Edition Database Engine after July 2019? We do not intend to purchase extended support for security updates and we understand that there will be no hot fixes either. But my main question is can we still call Microsoft Support for any assistance with the database for known issues? We are currently using the pay-as-you-go model.
Thank you
Hello,
Password required when adding database to availability group, take.ms/QC9FA
This database is encrypted by database master key, you need to provide valid password when adding it to the availability group.
But "SELECT * FROM sys.dm_database_encryption_keys" shows nothing about it.
How is that possible?
Thanks.
Любовь долготерпит, ...
I have a sql server cluster with two nodes, both C: drive are local disk mirrors , with diskspd measurement the IOPS are less than 800 and read write latency are around 100ms, while other same hardware servers with IOPS over 30k and latency less than 1.7ms.
Wondering if any one has same issue?
WriteRatio | Threads | Outstanding | Block |
40 | 4 | 32 | 8192 |
What's the different of using MSDTC cluster or MSDTC Local ??
Seems windows 2016 clustering no need to have a cluster MSDTC resource
KB articles 329204 and 2023536 describes the general guidelines on how to set maxdop.
I think they are a bit ambiguous, as they use the words "processor", "CPU" and "physical processor".
What is the difference between those words? Is a processor a core or could it be one multi-core processor in one socket?
Should a system with one multi-core processor with 6 cores and no NUMA be configured with maxdop 6 or 1 according to these kb articles?
Hi,
We are on Microsoft SQL Server 2017 (RTM-CU9) (KB4341265) - 14.0.3030.27 (X64). We changed the Service account on the Polybase DMS and Engine and now we are getting the
Internal Query Processor Error: The query processor encountered an unexpected error during the processing of a remote query phasewhen running DMVs SELECT * FROM sys.dm_exec_compute_nodes.
After verifying logs, it says that : Dms authorization failed due to [Domain\account] is not member of group [PdwDataMovementAccess] Do we have reinstall polybase again? Is there a better solution?