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

job owner is specific login any impact if we change to sa

$
0
0

Hi Team,

we have few application jobs running on production server and owner for those jobs are specific login and he left the company so now my query is any impact if I change job owner to SA or specific account that account only using for job owners. please advise me as this is basic question reason for asking it is production.


orphan users in database, does it have performance impact?

$
0
0

Hi, all

I have instances of sql server's, that have many databases, from 1000 to 2000 databases. 

Many of them, almost all, have orphan databases users (without a login) these users are not used, they came from the developing environment.

My question is, doesn't this have a performance impact on the all instance?

I have a college ( a orlder dba college, in another company) that said to me, that he saw a increase in performance of the all SQL Server, (lower CPU consumption) after he remove some(2-3) orphan users in an instance, where i have a big database  (10Tb) management by him.

does this have some fundamental reason for happeny? is this real?

looking for yours opinions

thks

MMoura

xp_logininfo and Best Practice

$
0
0

All,

Is it a good idea to grant EXEC rights on xp_logininfo to user logins and service ids? We DBAs have access to it and today we were asked to grant access to this Extended Procedure to a Login used by Tidal to run all our processes.

My questions is from the Security perspective because it can Query the AD database. If someone can point me to a best practice document that would be great.

Our SQLServer is SQLServer 2016.

Thanks,

rgn

ODBC Driver 17 for SQL Server - Linked Server Fails

$
0
0

ODBC Driver 17 for SQL Server  - Linked Server failure

I have a problem where my linked server works for about 12 minutes and then fails.  Sorry I do not have the failure message at this point, but I can get it tomorrow

I have a Windows 2012 Server and have SQL Server 2014 SP3 Installed.

I have a requirement to provide a linked server to another SQL Server instance and the way I had to set it up was to create a system DSN connection using the original “SQL Server” ODBC drivers on my server connecting to the remote server and then I created a linked server using the Microsoft OLE DB Provider for ODBC provider to that system DSN

This was working fine for many years until TLS 1.2 became required.  To deal with TLS 1.2 I installed the ODBC Driver 17 for SQL Server.  I then created a new DSN connection and restarted the instance and the linked server tested fine. 

The problem is that after about 12 minutes the Linked server fails – sorry I do not have the error message, but its something about cannot connect using the ODBC driver 17 for SQL server.  If I restart the instance the linked server will work again for about 10 minutes and fail. 

The way I fixed it was I created the DSN connection using the ODBC Driver 11 for SQL server – it supports TLS 1.2 just fine and the linked server did not fail after 10 minutes.  As a matter of fact, I could get the linked server to work without even having to restart the instance. 

My question is why does the linked server fail after 10 minutes using the ODBC Driver 17 for SQL server. 

Any help is appreciated.   

When Service Master Key is generated?

$
0
0

I would like to know when Service Master Key (SMK) management as follows. 

(1) Is SMK automatically generated when SQL server is installed?

(2) How can I confirm SMK is exist?

(3) Even though any Database Master Key (DMK) is not created yet, is SMK existed?

(4) If DMK is created, SMK is going to be re-created automatically or does it need to manually re-create? 

(5) Why is SMK required to take a backup? If backing up of SMK is missing, what kind of impact would occur on the database?

Any advice will be gratefully appreciated. Thank you. 

Enforce Password expiration setting

$
0
0

I would like to confirm the policy of the expiration password setting of SQL login account.

(1) If the setting of "Enforce Password expiration" has been on, and if password of SQL login account is expired, and if the setting is changed to checked off, is the account still expired and need to set new password? or the account can login with old password?

(2) If checking off the setting once after password is expired once, then checking it on again without changing the password, will the password is already expired? or will it be reset like starting to count day to expiration date from 1?

(3) How can I know when password is set last time, and when will be expired?

(4) Is there any alert to set up to let DBA knows before the password expired? 

Thank you..


Database back up

$
0
0

How do you exclude a database from being backed up using the sqlcmd?

sqlcmd -E -S $(ESCAPE_SQUOTE(SRVR)) -d master -Q "EXECUTE [dbo].[DatabaseBackup] @Databases = 'USER_DATABASES', @Directory = N'\\somewhere',  @BackupType = 'FULL', @Verify = 'Y', @CleanupTime = 360, @CheckSum = 'Y', @LogToTable = 'Y'" -b

To find out reason for execution slowness of simple update query for a image type

$
0
0

Hi ,

I am using SQL Server 2012 , i am trying to do update query in SSMS tool setting image type value to NULL. It is taking more time than expected, 800K records taking 7 hrs to execute now but Same Query for 9M record took very less time of 3 hrs when i executed 3 months back. I tried various options like dropping index, disabling triggers etc to find out the reason of  long time query. All of them produces same time.

Note: In between these period, data got refreshed from live to test env.

Can someone help how to find the reason of why 7 hrs for jus 800K record. Please let me know if you can suggest some way to find out. Let me know if any further details required.



Enforce Password Policy Configuration

$
0
0

As long as I read out the following article, If I checked ON of "Enforce password expiration" of SQL login account, it will follows to Local Security Policy setting on the server.

SQL Server Login Properties to Enforce Password Policies and Expiration

Is there any way to set up separately SQL account and OS account? I would like to set up maximum password age of SQL login account to 365 days, and local account for the server(=OS) to 60 days..  

Locks / Deadlocks / Blocks

$
0
0

How to identify Locks / Deadlocks / Blocks ?

What is the next steps after identifying ?

How to deal with them ?

What type of Locks / Deadlocks / Blocks can be killed ?

Thanks in advance,


sunnybabu

On which base store procedure are differ than function in sql server?

$
0
0
On which base store procedure are differ than function in sql server?

At which senerio interface used in c#?

$
0
0
At which senerio interface used in c#?

A network-related or instance-specific error

$
0
0

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections.

I can't connect the SQL Server. However I can ping the IP and server name successfully. How to connect to server?

Moving user database to new server

$
0
0

I need to move user database to new SQL server of new server. Database Master Key (DMK) is not created in the database, and I took backup of Service Master Key (SMK) of the instance of current SQL server. In this case, what command is required after attaching the database to new server? 

DB backup to URL (cloud)

$
0
0

hi,

i already configured DB backup to URL  for Azure Storage.

is  Microsoft provide backup to Google cloud storage?  we have some machine in google VM(sql). need to backup to google cloud storage, how to accomplish this?


Needs help in Troubleshooting SQL server wait event in production database

$
0
0

Dear All,

I am very new to SQL server performance tuning issues . For one of the newly built SQL server(SQL server 2016 Standard Edition) we are getting lot of slowness . Major wait events reported are LATCH_EX  & CXPACKET.  I changed "Cost Threshold for Parallelism" to 10 for the instance but that did make the situation worse. I went through Paul's all excellent write- ups on these wait events but still clueless how to proceed on it.

We don't have support of Microsoft also to assist me and I am lone dba for my organisation .

Any inputs/suggestions will be highly appreciated . 

Best Regards,

Sandy



How to get list of most queried partitions in my DataBase

$
0
0

Hello all,

I have some large partitioned fact tables,  in order to reduce the size of .ndf files used by partitions, I want to compress data in some of those partitions.

Considering the fact that data compression will comes with some performance access issues, I want to identified the most non-queried partitions in my database to compress them.

So I'm looking for a query that can help me get the list of partitions that are not used very frequently.

Thank you in advance.

AbdelAZIZ.

Swap two columns in view

$
0
0

Hi everyone,

I'm trying to swap values of two columns in view.

 UPDATE data$ SET [floor 1]=[floor 2] , [floor 2]=[floor 1]

I've tried this code in newly created table and it worked.

When I try to use this code in table from another database, I get error that there is no derived or constant field. i have rights to alter table. What can be source of this error?

Regards,

Yerkhan

Sql Server Waits

$
0
0
how to fix buffer latch waits in SQL Server?

Limiting the number of concurrent sessions per user

$
0
0

As following to my local security policy, I have to establish the limit appropriate to the type of user account accessing the SQL Server instance on SQL Server 2014 Enterprise. 

I think login trigger is the one for this set up as following to the Microsoft aritcle below. 

 Logon Trigger

Can I confirm few thing on the trigger?

(1) Is this query correct to set up to existed SQL login account called "General_User" allowed 5 session maximum? (The "General_User" is already existed.) I am not sure what does the "ALL SERVER WITH EXECUTE AS" part is. 

USE master;  
 CREATE TRIGGER Limit_Connection_For_General_User  
ON ALL SERVER WITH EXECUTE AS 'General_User'  
FOR LOGON  
AS  
BEGIN  
IF ORIGINAL_LOGIN()= 'General_User' AND  
    (SELECT COUNT(*) FROM sys.dm_exec_sessions  
            WHERE is_user_process = 1 AND  
                original_login_name = 'General_User') > 6  
    ROLLBACK;  
END; 

(2) After creating trigger as above, it will be showed up under (Instance Name)/Security/Server Objects/ Triggers on Management Studio?

(3) This is my test plan to confirm if the trigger work correctly. Is this right way to confirm the trigger?

         -Open Mangement Studio and connect to the instance continuously.

         -If the trigger is works fine, The 6th time connection will be error.

         -Confirm to the error is automatically logged on event log under Event viewer/Windows Logs/Application.

(4) If I create the trigger on the (1), is it listed up in the result of below query?

SELECT * FROM master.sys.server_triggers;


Viewing all 12644 articles
Browse latest View live


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