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

SS DBE Gurus needed for July!

$
0
0

Come forth all you technical gurus and word wizards!

It's time to show us what you've got, what you know, what you found out!

Spare your fellow professionals from the same mistake!

Share your revelations and awesome ways of doing things!

All you have to do is add an article to TechNet Wiki from your own specialist field. Something that fits into one of the categories listed on the submissions page. Copy in your own blog posts, a forum solution, a white paper, or just something you had to solve for your own day's work today.

Drop us some nifty knowledge, or superb snippets, and become MICROSOFT TECHNOLOGY GURU OF THE MONTH!

This is an official Microsoft TechNet recognition, where people such as yourselves can truly get noticed!

HOW TO WIN

1) Please copy over your Microsoft technical solutions and revelations toTechNet Wiki.

2) Add a link to it on THIS WIKI COMPETITION PAGE (so we know you've contributed)

3) Every month, we will highlight your contributions, and select a "Guru of the Month" in each technology.

If you win, we will sing your praises in blogs and forums, similar to the weekly contributor awards. Once "on our radar" and making your mark, you will probably be interviewed for your greatness, and maybe eventually even invited into other inner TechNet/MSDN circles!

Winning this award in your favoured technology will help us learn the active members in each community.

June's entries are with our judges right now, but here is a reminder of the previous month's winners.

Guru Award BizTalk Technical Guru – May 2016 
Gold Award Winner

Kjetil TonstadTop 10 Tips From a BizTalk Admin to BizTalk DevelopersTGN: “I love this, how to help each other. Well done Kjetil!”
JS: “Integration apps are a lot more than coding. Always remember these.”
SW: “Great article. With the current DevOps trend alignment between developers and administers is key!”
Ed Price: “This is a good set of tips, with a few helpful images, and the Reference links at the bottom give more context. Great job!”
Silver Award Winner

Eldert GrootenboerBizTalk Server: Processing large files (streaming)Ed Price: “Great mix of code, images, and descriptions. Although the code isn’t broken up much (with explanations of what the code does), all the code comments make up for it and make it super clear! Good to end with the See Also section!”
SW: “Streaming large message can be a challenge with BizTalk. This article provide guidance in that area. Very good!”
TGN: “I love this, well explained and a question that is very relevant to BizTalk”
Bronze Award Winner

SMSVikasKBizTalk Server 2013 R2 Dynamics CRM Online / On Premise CRUD Operations (Part 1)JS: “Seeing a lot of CRM lately. Good info for anyone who hasn’t worked with it before.”
SW: “CRUD om Dynamics guidance article. Good”
Ed Price: “Great description (I like CRUD) and fantastic use of images, although it would be better with more explanations in the text.”
TGN: “Why did you split these up into to articles? good article though”

Guru Award Forefront Identity Manager Technical Guru – May 2016 
Gold Award Winner

Peter GeelenFIM2010 / MIM2016: Run profile statistics with PowerShell and Excel Pivot TablesEd Price: “I love the code formatting with the scroll bar. Great explanations and use of images!”
Silver Award Winner

Peter GeelenFIM2010 / MIM2016: Run profile statistics with SQL and Excel Pivot TablesEd Price: “It’s great to have the downloads on TechNet Gallery!”

Guru Award Microsoft Azure Technical Guru – May 2016 
Gold Award Winner

Bhushan GawaleGetting Started with Azure Automation DSCAS: “Very good and helpful article! Thanks for publishing!”
Ed Price: “Great starting point for learning Azure Automation DSC! Good use of images and code, with excellent explanations!”
Silver Award Winner

Sibeesh VenuCreating Azure Mobile App With Visual Studio AS: “Good starting point, but for me all screenshots are broken – none of them is visible. I would find it particularly useful if you just have provided links to a more detailed article(s) on how to configure Visual Studio for windows Mobile development. And probably just show a sample with HTML/JS or UWP (if it is available)”
Ed Price: “What an important topic that’s very well described! The images add a lot of value!”
Bronze Award Winner

Sandro PereiraAzure Logic Apps: Tips and Tricks about the “new” Logic Apps DesignerAS: “A good overview of designer features! I would however also expect to see the less known fact that drop down lists are actually filtered and there is much more to discover when you begin typing into the search field.”
Ed Price: “The images are magnificently assembled to make this process incredibly clear. A very important topic! Great job!”
Guru Award Miscellaneous Technical Guru – May 2016 
Gold Award Winner

ChilbertoConnecting a BitBucket Repository to Visual Studio Team ServicesRichard Mueller: “Well explained. We need links/references.”
Ed Price: “Great use of images. This is a fantastic scenario! It could use a See Also section. “
Silver Award Winner

Carmelo La MonicaManage analog sensor with Raspberry pi2Richard Mueller: “Grammar needs work and we need links/references.”
Ed Price: “Thorough, and great to have the code and images! But it could benefit from breaking apart the code and explaining what it does more, as well as ending with See Also and References sections. Great to have the TOC.”

Guru Award SharePoint 2010 / 2013 Technical Guru – May 2016 
Gold Award Winner

Dan ChristianHow to build a custom report for SharePoint Server lists, libraries or sitesJohn Naguib: “Great one well done”
Margriet Bruggeman: “Great article with not only text, but also images and videos to make this very user friendly.”
Hezequias Vasconcelos: “Great article. Content technical good. Well detailed, great of attached reference materials. Excellent technical guide.”
Ed Price: “Fantastically thorough, with great images and explanations, and once again, your YouTube videos just blow me away, with how well they help tell the story and are integrated into the article like this! It’s a true art form!”
Silver Award Winner

Waqas SarwarSharePoint 2016 How to Change SuitBar’s Text PowerShellHezequias Vasconcelos: “Good content new platform SharePoint 2016. great scripts and well distributed in the Shell”
Ed Price: “Short and sweet! Fantastic scenario. It could use more references and links to other Wiki articles.”
Bronze Award Winner

Vivek JAGGAAlternative Solutions to the Deprecated Features in SharePoint 2016Ed Price: “I love how you’re very clear at the front of this article (as an overview) and then dig deeper into the specifics. Good references at the end.”
John Naguib: “Nice article you can add also the development area”
Margriet Bruggeman: “Useful article with good alternatives. “

Guru Award Small Basic Technical Guru – May 2016 
Gold Award Winner

Philip MuntsSmall Basic: Simpler and Cheaper Raspberry Pi GPIOMichiel Van Hoorn: “This is really Awesome (see also the original article). It opens up Small Basic to the real world. ”
Ed Price: “Building off his Raspberry Pi article, this article does an amazing job of digging deeper and showing you more options, such as Raspberry Pi Zero.”
Silver Award Winner

Nonki TakahashiSmall Basic: ImageMichiel Van Hoorn: “Really cool overview of working with Images (like photos) in SmallBasic. We good topic to inspire programming”
Ed Price: “Very thorough end to end overview of using Images!”

Guru Award SQL BI and Power BI Technical Guru – May 2016 
Gold Award Winner

Greg DecklerGood Ol’ VLOOKUP – The Ultimate Guide to Lookups in Power BIPT: “Quite a valuable and well-written article. Thank you for the extensive coverage of various lookup techniques.”
RB: “Interesting comparison of the lookup techniques available within Power BI.”
Silver Award Winner

Anil MaharjanHow to find a Calculated Measure and Calculated Dimension within a particular cubePT: “This submission a very brief and just mentions a little information that is common knowledge and easily discovered with a simple web search.”
RB: “Interesting tip, a screen dump of the result with all the columns would have been great.”

Guru Award SQL Server General and Database Engine Technical Guru – May 2016 
Gold Award Winner

ChervineStretching SQL Server 2016 tables to the Azure CloudJS: “Great article, your explanations and samples are spot on.”
Ed Price: “Super valuable scenario! Love the diagram, code snippets, and screen shots!”
Silver Award Winner

ShankyWhat Does Fragmentation Means In a Heap Table In SQL ServerEd Price: “Very thorough! Great references at the end.”

Guru Award System Center Technical Guru – May 2016 
Gold Award Winner

vishwanatham sridharSCOM Connector Design prototypeEd Price: “Great scenario with some helpful reference links!”
Silver Award Winner

Anders RodlandSCCM 2012 R2 step-by-step: upgrade of SP1 to current branch – Step by StepEd Price: “Missing the images. Very thorough steps! Great use of the TOC. Could benefit from references.”
Bronze Award Winner

Anders RodlandSystem Center Configuration Manager Build NumbersEd Price: “Good collection of builds and KBs!”

Guru Award Transact-SQL Technical Guru – May 2016 

Guru Award Universal Windows Apps Technical Guru – May 2016 
Gold Award Winner

Namrah KhurramTraffic Lights Simulation via LEDs on Raspberry PiTGN: “Man this is cool. Good information and well structured. well I’m impresses Namrah!”
Ed Price: “A cool scenario that’s masterfully explained! The code has great formatting. It could benefit from See Also and References sections at the end.”
Silver Award Winner

Manuel Cota“DrawIndexedInstanced and the Concepts behind a Home-Made Game Engine”Ed Price: “It could benefit from a TOC at the top and from See Also and References sections at the bottom, but I love how this breaks down the code and explains everything in depth! Great use of diagrams!”
TGN: “I learned a lot from this article. Well done, thanks for sharing!”
Bronze Award Winner

Sajid Ali KhanUWP: Things Required To Do Right After Creation of New ProjectEd Price: “Great use of images and good References section at the end! I love how the code is both on GitHub and MSDN Gallery and how the download links are given!”
TGN: “This can help a lot of people, my favourite this month! Thanks for sharing Sajid”

Guru Award Visual C# Technical Guru – May 2016 
Gold Award Winner

Emiliano MussoEntity Framework Introduction using C#, part IEd Price: “This is a masterful article, It’s thoroughly broken down, and it leverages images, great code formatting, and even a download and an Italian language version at the end!”
Jaliya Udagedara: “Great article with step by step explanation. If you are a newbie to EF, read this one article which will cover most of the basics. And you can download the sample code from MSDN Code Gallery.”
Carmelo La Monica: “Good and very impressive article, it explain in all parts Entity Framework 7, i attend second part “
Silver Award Winner

SYEDSHANUMVC ASP.NET Identity customizing for adding profile imageCarmelo La Monica: “Very good expression, good images and very detailed in all parts.”
Ed Price: “Very thorough steps! Great scenario!”
Jaliya Udagedara: “Good article explaining how you can manage your profile picture with a ASP.NET MVC application. Sample code is available in MSDN Code Gallery.”

Guru Award Wiki and Portals Technical Guru – May 2016 
Gold Award Winner

Peter GeelenWiki: Fixing table layout (table right side off page)Richard Mueller: “Great information that will help a great deal to fix tables in the Wiki. Good use of Wiki guidelines.”
Ed Price: “This is a fantastic solution from Peter!”

Guru Award Windows PowerShell Technical Guru – May 2016 
Gold Award Winner

Matt McNabbOffice 365: How to Manager User License Lifecycle with PowerShellEd Price: “Wow! Great description of these steps, and it ends well with several other links to dig into!”
Richard Mueller: “Good TOC. An excellent idea to code this and overcome limitations. This should be very useful.”
Silver Award Winner

Arleta WanatSharePoint Online: Get all checked-out files using PowershellRichard Mueller: “Good headings and TOC. Good ideas and well explained.”
Ed Price: “Great scenario and use of PowerShell code!”

Guru Award Windows Server Technical Guru – May 2016 
Gold Award Winner

Kia Zhi Tang (Ryen Tang)Nano Server: Using New-NanoServerImage with Show-Command to deploy Nano ServerMark Parris: “Excellent article on the deployment of Nano server. ”
JM: “This is an excellent article on building a new Nano Server, thanks for your contribution!”
Richard Mueller: “Good use of Wiki guidelines, with even horizontal rules and Return to top links. Show-Command is a very interesting feature I like a lot. Good references.”

Thanks in advance!
Pete Laker


#PEJL
Got any nice code? If you invest time in coding an elegant, novel or impressive answer on MSDN forums, why not copy it over toTechNet Wiki, for future generations to benefit from! You'll never get archived again, and you could win weekly awards!

Have you got what it takes o become this month's TechNet Technical Guru? Join a long list of well known community big hitters, show your knowledge and prowess in your favoured technologies!


Update statistics for File Table

$
0
0

Hi, 

I have a Database with Filetable size of 20GB. The Update Statistics maintenance task is taking more than 4 hours without any result (no Success nor Failed) for updating the statistics of the FileTable. 

Why the Update statistics for filetable takes so long ? We are performing the Update Statistics for FileTable separately. Is there any recommendations for updating the Statistics for FileTable. 

Unable to start execution of step 1 (reason: Error authenticating proxy

$
0
0

Dear All,

I have SSIS job which I'm running through proxy but I keep receiving the following error even though there is nothing wrong with the 'password', is there anything else I can check please?
Unable to start execution of step 1 (reason: Error authenticating proxy 'proxy name', system error: Logon failure: unknown user name or bad password.).  The step failed.

Thank you in advance!

Login auditing

$
0
0

Hi there,

how can I get who is logging to my server both successfully and failed? It is authorized domain users from different AD and before decommission some of them (not being used but I am not totally sure) need facts.

I  know that you can enable on Security page on Server Properties(SSMS) but I don’t find the .log file.

\Program Files\Microsoft SQL Server\MSSQL12.instace1\MSSQL\Log  ??

Thanks in advance


SQL Instance Servers not starting on computer restart

$
0
0

Hello,

    I have an issue that has been going on for a little while and have been unable to figure out what is causing the issue.  Have a Windows 10 Pro computer that is being used for business.  On that computer there are multiple instances of SQL Server running.  Each instance of SQL Server has its own port well out of the norm of used ports (above 40000).  There are no other services that run on these ports, I have verified it with nbstat.

   So when the computer restarts, generally one to four of the five instances will not start.  Windows Event Log shows generally the same message with a different instance name: The MSSQL$SQL16 service terminated with the following service-specific error:
Only one usage of each socket address (protocol/network address/port) is normally permitted.

   Now to get them to work, I have to stop SSIS, SSAS, & SSRS for each instance, then start up the instances of SQL Server, then start up all the others like SSIS, SSAS, SSRS, and SQL Agent.

  Any thoughts on how to make this work correctly?


Michael R. Mastro II

Following corruption in SQL 2008R2 CHECKDB succeeds but why do backups fail - Msg 3203, Level 16, State 1, Line 3: Reason 15105

$
0
0

Following a SAN issue one database  was marked Suspect – resulting in the need to recover from backup & log backups. No other corruption had shown on the system or other user databases. Following the restore a complete CHECKDB across the whole instance was successful and the application was brought back online.

However the daily backup have continually failed. CHECKDB remains successful across all the databases. The Full or a Copy_Only backups produce the same error (have also tried continue_after_error)– each time the backup gets to 70% before terminating

Msg 3203, Level 16, State 1, Line 3

Read on "mydb.mdf" failed:

23(failed to retrieve text for this error. Reason 15105)

Msg 3203, Level 16, State 1, Line 3

BACKUP DATABASE is terminating abnormally.

 

I also see in the System Event log

The device, \Device\Harddisk2\DR2, has a bad block.

 

The environment is on VMWare - Windows Server 2008 R2 SP1 running SQL 2008R2 SP3, Standard Edition. It's an 11GB database which is separated across 3 files – Primary, Data, Index.

The server itself has been restarted since the recovered database was brought back online and SQL Server returned no errors. Whilst CHECKDB continues to report no errors the position is worsening with no valid backup now for over a week.

Other forums suggest this error message is due to file access/permissions or not enough disk space for the backup to finish but this is not the case.

Another option I’ve considered is detaching/stopping sql and copying the mdf,ndf, ldf files to another server, but I don't want to stop the system until I feel more confident with the data being protected. I’m pulling together a process to export all the DB objects and bulk copy all the data out into another database.

Would welcome any thoughts, further checks I could run t help identify what is wrong with the primary file in the database.

Unsy.

Performance tuning on prod server

$
0
0
Hi All,

Sorry to ask this question in this forum. Its more kind of general and not a technical question.

Can anyone tell me what are the drawbacks of using Production Server as a Testing Server.

Recently, I got into an uncomfortable conversation with my manager who is a not so technical but he wanted me to
do performance testing of slow running SQL Agent jobs which client was asking for a long time.
I just joined this team a week before and this is my 1st task assigned to me!!

They are blunt and wanted me to work on the same.

I explained to some extent that doesn't work and if any changes made to the code and re-running/creating indexes/updating stats/turning on trace flags/running traces,
will lead to adverse performance of ongoing/running workload. Still they insist me to do that. I just kept quite and came out of that discussion room.

I need some inputs/specific usecase of what can go wrong if we use a PROD server for testing purposes. How can I convince these management guys that what I am supposed to do is wrong and in a polite way.
Not sure how to convey the BIG NO NO message here..

Can anyone help me with some specific use case so that I can convince my management and get a testing environment.

Thanks.
Sam

How to Fix error Msg 458, Level 16, State 0, Line 4

$
0
0

 I am getting SQL Server Error 458 
 
 The Error Message says : 
 
Msg 458, Level 16, State 0, Line 4
Cannot create the SELECT INTO target table "AdventureWork2014.HumanResources.JobCandidate" because the xml column "Resume" is typed with a schema collection "HRResumeSchemaCollection" from database "Testing1". Xml columns cannot refer to schemata across databases.

 
 Any suggestions [ Solution | TIPS ]  to resolve [FIX] this ? 
  
 Thanks


What does database_transaction_log_bytes_reserved of sys.dm_tran_database_transactions mean?

$
0
0

Is database_transaction_log_bytes_reserved simply the difference between a log file size and database_transaction_log_bytes_used for a transaction in a database in SQL SERVER 2012?   

I'm checking that DMV since I'm trying to figure out why the log of database in simple recovery mode keeps growing even though there is only 1 transaction and database_transaction_log_bytes_used is less than the log file size.   I also checked DBCC SQLPERF but its used% does not seem to match with database_transaction_log_bytes_used or the sum of database_transaction_log_bytes_used and database_transaction_log_bytes_reserved.


SQL 2014 remembers all the Alter Table commands?!

$
0
0

So I have this table, and I added a few more columns and changed nullability on a few more, and went to script out the table definition on SQL 2014 to give somebody. And what does it give me? The *original* table definition followed by (something like) all my Alter Table statements!

1.  Wassup with that?

2.  How can I tell it to just accept them and move on?

SQL 2008R2 does not do that, I actually did the same changes to the table on a SQL 2008R2 version, and it scripts now clean.

Thanks,

Josh

templog.ldf grew unexpectedly,

$
0
0

Hi experts,

Over the weekend templog.ldf grew unexpectedly... Went from 40GB to 71.1GB...

Not sure what I should do to make it back to it's size... What should be the most correct approach?

Thanks in advance.

Blocking SPIDs but tables are different

$
0
0
Hello,
We are on Sql Server 2014 Enterprise. Today during a routine DB monitoring ,
I noticed a blocking session  on looking at sysprocesses

Session ID 1748 blocked by Session ID 559.

On doing DBCC inputbuffer(559) and DBCC inputbuffer(1748), I get the 2 queries:

559 -> update X set col1= where col10=5

1748 -> Select col1,col2 from Y

and it says 1748 Select  is blocked by the update on table X on SPID 559.

as you see the tables are completely different, so i am wondering how they can possibly get blocked?
what am i missing here?

any ideas?

tx

want to automate daily checks like backup details , drive free space etc

$
0
0

Hello Guys ....Gud Morning :)

Need help in automating my daily checks , currently there is around 55 production servers.

Daily checks Includes :

1) latest Backup details

2) Drive space

3) db size of all servers

curently i am checking above parameters on daily basis , i need help in automating the same , also let me know if we can add somemore parameters which needs to checked on daily basis.

please help me with scripts , way to automate the manual process.

As this is urgent requirment ,your help will be higly appriciated.

Regards,

Anish


Asandeen

Encryption does not work return NULL

$
0
0

Hi all,

primary platform is 2014 Enterprise

Can you kindly test this code in your dev environment?

DDL:

USE Proves;

CREATE TABLE [dbo].[Employee](
	[IdEmployee] [int] NULL,
	[NationalIdCard] nvarchar(50) NULL,
	[DepartmentId] [smallint] NULL,
	[Dob] [datetime] NULL
) ON [PRIMARY]

Few data:

insert into dbo.Employee (IdEmployee, NationalIdCard, DepartmentId, Dob) select 123, 2770123,2,'1975-02-10' union select 145, 1214123,2,'1967-05-11' union select 112, 42830323,2,'1971-12-08'


ALTER TABLE [dbo].[Employee]
    ADD NationalIdCard_Encrypted varbinary(128);
GO

DCL stuff:

CREATE MASTER KEY ENCRYPTION BY
PASSWORD = 'eNrIC_123&'
GO

CREATE CERTIFICATE Employees
   WITH SUBJECT = 'Employee ID National Card';
GO

CREATE SYMMETRIC KEY NationalCards
    WITH ALGORITHM = AES_256
    ENCRYPTION BY CERTIFICATE Employees;
GO
DML:
UPDATE [dbo].[Employee]

SET
[NationalIdCard_Encrypted] = EncryptByKey(Key_GUID('NationalCards')
    , NationalIdCard, 1, HashBytes('SHA1', CONVERT( varbinary
    , IdEmployee)))


	SELECT [NationalIdCard_Encrypted]
    AS 'Encrypted national idcard',
	CONVERT(varbinary, DecryptByKey([NationalIdCard_Encrypted], 1 ,
    HashBytes('SHA1', CONVERT(nvarchar, NationalIdCard))))
    AS 'Decrypted national idcard'
	FROM [dbo].[Employee]
GO

Thanks in advance


decimal data type as Clustered index and PK

$
0
0

Hi experts,

 

I am sort of auditing work being done by other team, and I came across the table Orders.

 

The creator picked OrderId as both PK and its clustered index.

 

The data type for OrderId is [OrderId][decimal](18, 0)NOTNULL,

 

My questions are, why would someone choose decimal for this field??

 

Even though it is (18,0) can a decimal be slower/worse than an int for a clustered index/PK?

 

Thanks in advance.

 


How to force an access pattern

$
0
0

Hello,

this is the query:

SELECT DISTINCT addressId FROM dbo.AddressKeys WHERE ks2 BETWEEN 'T>QKS$$$' AND 'T>QKZZZZ' OR ktown BETWEEN 'U$NGS$$$' AND 'U$NGZZZZ' OR pc2 = 'SA1' 

this is the execution plan generated by QO:

I want to practice with query/table hints, so I would force QO to.. make the same plan :

SELECT DISTINCT addressId FROM dbo.AddressKeys WHERE ks2 BETWEEN 'T>QKS$$$' AND 'T>QKZZZZ' OR ktown BETWEEN 'U$NGS$$$' AND 'U$NGZZZZ' OR pc2 = 'SA1' 
OPTION(RECOMPILE,MERGE JOIN,
TABLE HINT (dbo.AddressKeys,
INDEX=[IN_SSA_AddressKeys_KS2_Ktown] , 
INDEX=[IN_SSA_AddressKeys_KTOWN] ,
INDEX=[IN_SSA_AddressKeys_PC2]  
))

in this case QO generate this plan:

as you can see is ALMOST the same plan as before but with a scan on the index instead of a index seek.

If I tell to QO to use seek:

SELECT DISTINCT addressId FROM dbo.AddressKeys WHERE ks2 BETWEEN 'T>QKS$$$' AND 'T>QKZZZZ' OR ktown BETWEEN 'U$NGS$$$' AND 'U$NGZZZZ' OR pc2 = 'SA1' 
OPTION(RECOMPILE,MERGE JOIN,
TABLE HINT (dbo.AddressKeys,
INDEX=[IN_SSA_AddressKeys_KS2_Ktown] FORCESEEK, 
INDEX=[IN_SSA_AddressKeys_KTOWN] FORCESEEK,
INDEX=[IN_SSA_AddressKeys_PC2]  FORCESEEK
))

I get this error:

Msg 8622, Level 16, State 1, Line 1
Query processor could not produce a query plan because of the hints defined in this query. Resubmit the query without specifying any hints and without using SET FORCEPLAN.

why?

and How to guide QO to generate a plan with those index accessed by seek operations?

How to encrypt columns without using TDE

$
0
0

Hi all

I've been asked about to implement some kind of hiding on columns in a non live environments... How can I achieve that without using a master key, certificate, symmetric, etc)?

An idea would be create a table with masked values for sensible data not a complex one, just for hiding key values such NationalCardId and full PAN Credit Cards.

Any ideas about how to build a homemade solution? Unfortunately we don't run 2016 yet

Thanks a lot,


Backup Encryption

$
0
0

Hello All,

Is it possible to implement a backup encryption on an existing SQL Server instance?

Thanks.

sqlcmd not working when a port is defined in the -S argument

$
0
0

Hi Guys,

This is a strange one. When running:

sqlcmd -S <server name> -U <username>

the command prompts for password and after inputting password I get "1>" which means it worked. However if I run

sqlcmd -S<server name>,<port> -U <username>

the command still prompts for a password but after inputting password I get this error:

SQL Server: unable to complete login process due to delay in opening server connection.

The port is the default port which is 1433 however, I have a program that is running sqlcmd against the database with the port defined so it is failing. Any idea why it would work when a port isn't defined yet it won't when the port is defined?

Auto Create Statistics not working on server

$
0
0

I'm working on a fairly standard 2012 11.0.5058 set up with a production server with multiple databases, and correlating UAT and DEV servers on which databases are restored backups from Prod. Prod is also synced to a DR server. All databases in all environments have Auto Create Stats enabled. Stats are creating as required in Dev, UAT and DR (readonly) but not Prod. Stats have clearly been auto created in Prod previously as you can see from the auto-generated statistics names. DB owner is same across all databases in Prod and is sysadmin in all environments (not my setup). I have been able to manually create statistics and have requested DBA team to execute sp_createstats in prod for me but I will still have issues with temporary tables. I get the impression that the statistics which exist are not updating cleanly either (Auto Update Stats is enabled)

Any suggestions what might cause this behaviour?


Viewing all 12963 articles
Browse latest View live


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