Quantcast
Channel: Forum SQL Server Database Engine
Viewing all 15694 articles
Browse latest View live

sql login creation

$
0
0
Hi All,

As an admin we create sql authentication logins for application users.
For those logins, we want to give the ability for the user to change the password and should never expire.
To accomplish this requirement, what specific permissions we should give for the sql login?

Thanks,
Sam


Deadlock analysis - what's AutoCreateQPStats?

$
0
0

I'm trying to analyze a deadlock that I can reproduce fairly consistently. I can tell what one session is doing (splitting an empty partition function range), but the other one is a bit of a mystery - it's somewhere in a lengthy stored procedure and the deadlock XML says

transactionname="AutoCreateQPStats"

I haven't found any explanation of what that means.

(I can't tell exactly where in the stored procedure this is occurring because the line number in the execution stack is inside an IF block that I have proved isn't getting executed in this test, so SQL Server and I are counting lines very differently. If anyone can explain that I'd also be interested, but this is probably the wrong forum for it.)

Sample Database in SQL Server 2019 format

$
0
0

Hi,

I want to find a sample database in SQL Server 2019 format. The database can as simple as just contain one table with one record. Where can I find such a sample database file online?

Thanks

Microsoft.ACE.OLEDB.16.0 provider is not registered on the local machine. (System.data)

$
0
0

Trying to import data from Excel is giving this message.

Office365 64-bit

Here's what I tried:

1) I installed the 64-bit Access database engine 2016

2) I tried the 2010 & 2007 versions as well

3) I reinstalled Office365

I'm out of ideas. What else could be going on here?

SQL Server 2012 Database engine failed to install everytime

$
0
0

Hi,

I am trying to install SQL Server 2012 -64 bit in our dev server running Windows Server 2012. Everytime, Database engine fails to install. I've checked the event logs it shows.

Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'e:\sql11_main_t.obj.x86release\sql\mkmastr\databases\objfre\i386\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.

I followed the link- https://serverfault.com/questions/447808/sql-server-express-service-is-not-starting to resolve the issue. I opened command prompt and run the command - NET START MSSQL$SQLEXPRESS /f /T3608

But it throws the error - The service name is invalid.

Has anyone gone through this issue. Please suggest a solution for this issue.

Thanks,


Kunal

Sum of all Memory Clerks and Total Server Memory (KB)

$
0
0

I am trying to understand the memory management of SQL Server. I have a Windows Server 2019 on virtual environment with 64 GB of RAM. I also have SQL Server 2019 installed with Max Server Memory 59776 MB. By using the following query I found the list of all memory clerks:

SELECT  [type] AS [ClerkType], SUM(pages_kb) / 1024 AS [SizeMb]
FROM sys.dm_os_memory_clerks WITH (NOLOCK)
GROUP BY [type]
ORDER BY SUM(pages_kb) DESC

Total sum of all memory clerks was equal to 23523 MB.

Value for MEMORYCLERK_SQLBUFFERPOOL memory clerk is 18387 MB.

I also checked some performance counters:

Total Server Memory (KB) = 32262 MB.
Database Cache Memory (KB) = 18387 MB.

Please correct me if any of the below statements are wrong,

Max Server Memory for SQL Server 2019 = Buffer Pool Memory + Non-Buffer Pool Memory.

Total Server Memory (KB) - The committed memory from the Buffer Pool.

Data Cache Memory (KB) performance counter is equivalent to MEMORYCLERK_SQLBUFFERPOOL memory clerk and both represents data cache used size.

Above query shows all memory clerks for both Buffer Pool Memory and Non-Buffer Pool Memory.

My question related to this subject:

If Total Server Memeory (KB) is related to Buffer Pool memory, then why its size (32262 MB) is bigger than Total sum memory clerks altogether (23523 MB) which represents both Buffer Poll Memory and Non-Buffer Pool Memory?

EDIT: Result of select * from sys.dm_os_process_memory

physical_memory_in_use_kb = 38065556

large_page_allocations_kb = 333824

locked_page_allocations_kb = 37424380

total_virtual_address_space_kb = 137438953344

virtual_address_space_reserved_kb = 114125108

virtual_address_space_committed_kb = 38942228

virtual_address_space_available_kb = 137324828236

page_fault_count = 473391

memory_utilization_percentage = 100

available_commit_limit_kb = 33175136

process_physical_memory_low = 0

process_virtual_memory_low = 0

Resource governing between SQL instances on server

$
0
0

Whats the best way to control resources between SQL instance on the same servers ?

supposingly there are different SQL instances active on different nodes in a cluster and some nodes are down

then the SQL instances has to be running on the remaining nodes. 

SQL Server 2019 Installation Issues

$
0
0

I downloaded the https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads This one's a developer.

After opening the program, he downloaded something for me.

图片

After downloading he told me the download was successful and then automatically closed and opened another program and then prompted

图片

What's wrong with that? I run the installer in administrator mode, and when I run the installer in normal mode, it won't install and open with this interface. How do you solve it?


Database 'XXX' cannot be opened due to inaccessible files or insufficient memory or disk space

$
0
0
I am getting the following error with my database Database ' XXX' cannot be opened due to inaccessible files or insufficient memory or disk space. I have sufficient space on the drive >100gigs. Does anyone have any suggestion what caused this and how it can be fixed? I am running SQL 2008 and not commands are running on the db.

SQL Server 2019/PolyBase with DB2

$
0
0

Hello,

I am aware that it is possible to use PolyBase with SQL Server 2019 and DB2 through an ODBC driver.
Does anyone have any experience they can share with me about how well that works? Any advocation on an ODBC driver to use with DB2? I know that IBM has its own, but I see that CData has one too. Perhaps one OBDC driver is better than the other in this setup. Further, does anyone has any experience they can share configuring this scenario in a scale-out format?

Lastly -- Does anyone know if Microsoft intends to support native PolyBase connectivity to DB2 in a future release?

I much appreciate any information anyone can offer!

Thanks!

CHECKDB job failed

$
0
0

Hi All,

The checkdb job failed with below error:

Unspecified error occurred on SQL Server. Connection may have been terminated by the server. [SQLSTATE HY000] (Error 0) Cannot continue the execution because the session is in the kill state. [SQLSTATE HY000] (Error 596). The step failed.

On further checking the logs, got below OS related error:

//

D:\DATA\DB1_Data.mdf_MSSQL_DBCC16: Operating system error 665(The requested operation could not be completed due to a file system limitation) encountered.

The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at 
offset 0x00006c4e40e000 in file 'D:\DATA\DB1_Data.mdf_MSSQL_DBCC16'. Additional messages in the SQL Server error log and system event log may provide more detail. 
This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check 
(DBCC CHECKDB). 
This error can be caused by many factors; for more information, see SQL Server Books Online.

DBCC CHECKDB (DB1) WITH no_infomsgs executed by GEINDSYS-AMER\502765841 terminated abnormally due to error state 6. Elapsed time: 6 hours 5 minutes 51 seconds.

//

Could anyone help me understand whats the issue & help with the resolution steps.

How to clear SQL DB logs

$
0
0

1. SQL logs are continuously growing, how can I perform truncate of logs?

2. I am using MS DPM 2019 server for backup solution. But logs are not getting shrink and after backup no claim of space. how can I clear the logs by backup ?


Arif

Log Analytics Custom Logs

$
0
0

I uploaded the SQL Server Error Log file with .log extension while configuring custom log in the Log Analytics Workspace. After I uploaded the log file when I try to query with Custom Log name it is returning 0 results. 



i would like to abstract a database qualifier

$
0
0

hi we run 2014 std.  we have 2 dbs (staging and warehouse) that are always on the same server and we often reference both in certain procs.  the procs are always on staging.

in order to have multiple environments set up for development purposes,  i'll often combine the tables from each (staging and warehouse) in one local db, call it x.  and simulate real life by not qualifying queries targeted for staging but prefixing queries going to warehouse with x.dbo....

for my testing to be more valid i'd like a way for the x to be "mappable" by a parameter or something as i move thru the dev, qa and prod environments so that the x is "soft replaced" by the word warehouse.

is there a way to do this?


Access SQL Server from multiple Docker container

$
0
0

Hi,
on my Windows 10 Enterprise PC I have installed Docker Desktop for Windows and a SQL Server. In the computer management SQL Server configuration manager, protocol TCP/IP; I have the port 49172 configured for TCP/IP.



I want to start two containers, both of them try to open a connection to the SQL Server on the host. The first opens the connection (Port 49172), the second container can not open the port, because I is already in use from the first container. Can I configure in SQL server that it is accessible from different ports? How do I solve this problem?
Thanks,
Christian


SQL login error 18470

$
0
0

I always used Windows Authentication to login SSMS.

Today it shows error 18470, user 'SERVER\Administrator' account is disabled.

Although I still use the sa to login, but how does it comes? and how to enable it again?

Thanks.

Exporting Query results as json in Azure

$
0
0

Hi All.

I have a SQL query, at the moment the output of the SQL query is saved as a json file, I will like to automate the process by writing the output of a query onto a storage account in Azure or any other resource temporarily.

An external process will then consume the json file and delete it afterwards, any ideas in terms of a solution ?

Thanks in advance.

SQL Server 2017 is rapidly filling up the storage automatically

$
0
0
SQL Server 2017 is showing an abnormal behavior and rapidly filling up the storage on the hard drive automatically. This behavior is affecting the database replication/backup process.

Please help if anyone knows what is this behavior or is it a known issue?

Need help on SQL Server Licensing?

$
0
0

Hi All,

Would like to understand SQL Server Licensing. 

When I run SELECT @@VERSION I get this: 

Microsoft SQL Server 2016 (SP2-CU13) (KB4549825) - 13.0.5820.21 (X64)   May 22 2020 07:24:35   Copyright (c) Microsoft Corporation  Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 Standard 6.2 <X64> (Build 9200: ) (Hypervisor) 

Above says I have Enterprise Edition: Core-based Licensing. 

My questions are: 

              • In Core-based Licensing, What is max number of cores per License..? I can see minimum is 4 core. 
              • Suppose I have a SQL Server Enterprise Edition: Core-based Licensing with 16 Cores. Can SQL Server be installed on four different VMs (basically 4 different SQL Server Instances) and each has 4 cores..? Will this pass Microsoft audit?  
              • Or If I have one license with 16 Cores means it must be installed on a single machine with 16 cores?  

    Please guide.

    Appreciate your time and help in advance. 

    Aslo I did some research and found that there are 2 type of Licensing Model: 

    https://www.mssqltips.com/sqlservertutorial/9219/sql-server-licensing-model-and-costs/

    https://www.vscope.net/blog/microsofts-sql-licensing-guide/

    https://www.techsoup.org/support/articles-and-how-tos/guide-to-sql-server-editions-and-licensing

    Editions

    Microsoft offers SQL Server through TechSoup in the Standard and Enterprise editions. Standard Edition is most suitable for medium-size charities and organizations. Enterprise Edition is most suitable for large organizations.

    • Standard Edition offers basic database, reporting, and analytics capabilities. Microsoft offers this edition under the server/CAL and core-based licensing models.
    • Enterprise Edition contains all of the basic features of Standard Edition plus tools for analyzing business and financial data, mission-critical applications, and data warehousing features. Microsoft offers this edition only under the core-based licensing model.

    For more information on SQL Server editions, see the basic summaryfull comparison, and new feature comparison.

    Licensing

    Below are some of the major licensing requirements for SQL Server.

    • The core-based licensing products offered by TechSoup provide licenses for two cores. SQL Server with core-based licensing requires a minimum of four core licenses to function. In order to use these products, you will need to obtain enough copies to cover the cores in the processors you plan to use with SQL Server.
  1. The server/CAL licensing products offered by TechSoup provide a single server license for a physical, virtual, or cloud-based server. SQL Server with server/CAL licensing requires each user or device that accesses the licensed server to have a client access license (CAL). It is most appropriate for administrators who know the exact number of users and devices that will connect to the server.


      • DTEXEC

        $
        0
        0

        I inherited a server. It has Integration Services 2014 installed on it but never used. I consider running dtexec for some packages (in package mode not project mode) . There is no SSIS catalog deployed, nor any other SQL server component (db, RS, AS, etc..) on this server.

        I have the SSIS instance stopped and disabled, but need to check if my configuration is supported, since we do not need to purchase SQL license.

        Regards

        Viewing all 15694 articles
        Browse latest View live


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