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

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?


Reg:Count function differentiates from oracle to SQL server....

$
0
0

Hi Experts,

In Oracle i have table with the varchar columns a,b,c .

The below statement is there in oracle code.

select count(distinct a||b||c) from table.

so what is the equivalent of above  code in sql server?

Thanks in advance.


Error trying to perform update on linked server

$
0
0

I have set up a linked server and I am trying to perform an update on the remote server but I am getting the following error:

    OLE DB provider "SQLNCLI11" for linked server "remote_server" returned message "No transaction is active.".
    Msg 7391, Level 16, State 2, Line 1
    The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server "remote_server" was unable to begin a distributed transaction.

I can execute a select query and that runs fine so I know I have set up the linked server correctly as far as that goes. After searching on the error I have found several suggestions and done the following for both main server and remote server: - Ensured the Distributed Transaction Coordinator service is running - In component services, ensured the following were set for local DTC: Network DTC access, Allow remote clients, Transaction manager communication allow inbound and outbound
 - Ensured Distributed Transaction Coordinator is allowed through the firewall
 - Restarted SQL server

I am now starting to wonder whether I can perform an update on a linked server or whether data is read-only.

Any help greatly appreciated.

J.

Not used condition in Execution plan

$
0
0

Hello, I have a problem with understanding execution plan of procedure. 

I run procedure, where we have IF clause 

IF(@ShowDetails = 1) Begin ....... End

I run 

exec prsp_some_proc  @ShowDetails  = 0

and in execution plan I see that 75 % of cost has spent on that IF condition.

When I put "print 'ok'" after IF, between BEGIN - END, its not printed, I mean that SQL is not entered in that section.

Could you please clarify for me, execution plan shows all clauses in the script, even if they haven't run, or only those that have been executed.
Thanks.

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.   

Xevent Lock_timeout

$
0
0

I have an xevent trace and found there are many lock timeout on tempdb . How to get details what are theses ?

How can i achieve the IF NOT statement with boolean value in sql server...

$
0
0

Hi Experts,

How can i achieve my below requirement in sql server..

currently it is throwing some syntactical errors while executing in sql server..

 
Declare @isAllSearch bit

SET  @isAllSearch='TRUE';

 IF NOT @isAllSearch THEN

 BEGIN

 print 'hai'

 END

 ELSE

 BEGIN

 print 'Bye'
 END

Thnaks,

Ramesh .

In-memory oltp - Checkpoint files not getting recycled

$
0
0

We have in-memory OLTP database with just one table (memory optimized). Since last 2 weeks checkpoint files are not getting flushed unless we restart services.

We have been using this table for last 2 years with no issues till earlier this month. Database just have one table which has 400K records and size of table is 500 MB. And checkpoint files generated everyday is more than 70 GB.

We use this table to store user sessions and on an average we get insert/delete 60K records everyday. Number of selects is much higher but not sure if that would impact size of checkpoint file.

Below are questions we are puzzling with

  1. What gets recorded in checkpoint files and could number of selects impact size of checkpoint file
  2. How are checkpoint files managed? How and when they get cleaned up

Below are few other details in regards to environment this is happening on

  • SQL server 2016(SP1) 13.0.4001.0
  • DB compatibility level 120
  • DB recovery model - Full
  • Weekly full, Daily diff and every 30 min log backups
  • Checkpoint file of 128 MB is generated almost every minute.

Thanks

Prashant



dbcc shrinkfile on tran logs

$
0
0
I read that shrinking database files causes index fragmentation.  I inherited  a server with a shrink log job running every two hours against tran log files on three databases.  I think this job was put in place to shrink logs out of concern for storage capacity. The DBs are configured with full recovery mode.  One DB is about 200 GB and another is about 300 GB.   The dbcc shrinkfile syntax is like "dbcc shrinkfile(myDB, 100)".  How does shrinking just the logs impact indexes and performance overall?  Thanks.

Reg: Why My SSMS get stuck suddenly while i am editing the code in the stored procedure...

$
0
0

Hi Experts,

My SSMS get stuck while i am editing the big stored procedure having the several lines of code through SSMS in alter mode.

when i saw the Task manager ,it shows that SSMS is taking more memory as shown in pic.

Can any one suggest what is the root cause and work around for this problem..

Thanks,

Ramesh.

Error in SP_READERRORLOG

$
0
0

SQL 2014 SP3 CU2 Default Instance

I'm getting the following error when executing SP_READERRORLOG

Msg 22004, Level 16, State 1, Line 0
Failed to open loopback connection. Please see event log for more information.
Msg 22004, Level 16, State 1, Line 0
error log location not found

This is a test; it is a Default Instance and is not on default port number (1433). It is running on port # 2019. I also noticed as soon as I change the TCP/IP port number to 1433, the SP_READERRORLOG executed successfully.

Any suggestions on how to execute SP_READERRORLOG with different default port number?

DB Admin

$
0
0
Looking for resources on what tasks a DB Admin should do daily, weekly, and monthly. I'm new to this role and have not had any formal training. I'm familiar with the components SQL offers to monitor certain jobs, user access, and tasks but need additional help to go more in depth in other areas. e.g. improve CPU usage, indexing.

best method , upgrade path from Access 2007 adp/ade linked to ms sql to Access 2016 or Access 2019

$
0
0

Can I upgrade Access 2007 adp/ade connected to MS SQL server to Access 2016 or Access 2019?

no old code, no activeX etc. new methods, but has lots of reports and forms.

methods to use, items to look out for?

thanks, John


How to disable default constraint synchronization on sql server publisher article

$
0
0

I have configured a sql server transnational replication. it includes one table A, and when I add a default constraint for one column of table A on publisher, it will sync to subscriber object by default.

Is there any one option to disable this behavior. just because the data on subscriber table should be from publisher database, there is no need to sync all these constraints to subscriber.It does not make sense.

Automatic soft NUMA on SQL Server 2012 Enterprise SP4

$
0
0

Hi all,

I knew so far that automatic soft-NUMA was introduced in SQL Server 2016. I'm running SQL Server 2012 Enterprise Edition SP4 and I was playing with manual soft-NUMA, I noticed a strange message into the errorlog:

Automatic soft-NUMA was not enabled, because 'NodeConfiguration' key was detected in the registry at path 'Software\Microsoft\Microsoft SQL Server\110'. Disable registry based soft-NUMA configuration in order to activate the automatic soft-NUMA configuration

as if my instance was able to use automatic soft-NUMA...

was auto soft-NUMA back ported to SQL 2012?


SQL Server Standard 2014

$
0
0
How can I tell how many users can the licence accommodate on an installed instance on a server? Our IT Support person left and we are not sure how many users the server can take since we want to increase the number of users.

SQL Server 2012 SP4 Enterprise Edition NUMA Node imbalance

$
0
0

Hi all,

problem: NUMA node imbalance on my SQL Server 2012 Enterprise Edition which is running in a virtual environment (16 vCPU on 2 vNUMA nodes, the physical server has 2 socket with 20 cores per socket). Under heavy load I can observe that one of my NUMA node is 80-100% loaded while the other one is 40% loaded. The more the load is the more the imbalance is.

To reproduce the issue it is enough to run the TPC-C test with HammerDB, create a test DB with 400 warehouses and start the workload.

With 200 users the imbalance is small

with 400 users the imbalance is big

If, under heavy load, I query sys.dm_os_schedulers, I can observe that  runnable_tasks_count, current_workers_count and active_workers_count are not fairly distributed between NUMA nodes, as if the internal algorithm dictating the workers-to-scheduler assignment failed...

Any help?

Temp DB structure. Is it right or not?

$
0
0

Hi guys, 

I have an instance which is giving me some problem after I moved some databases on it. I think that this is related with the processes that the new databases brought in the instance and in particular in the Temp Db. Now I checked and the Temp db is split in two file, this is good but I don't feel that the mapping is good as it is at the moment:

Logical    Type      Filegroup  initial Size Autogrowth  

tempdev   ROWS... PRIMARY  253          By 256 MB, Unlimited

tempdev2 ROWS... PRIMARY  253          By 256 MB, Unlimited

templog    LOG       Not Appl. 147          By 256 MB, Unlimited

What do you think? Is it ok?

Thanks

Who will be announced as the next SharePoint Guru? Read more about March 2019 competition!!

$
0
0


What is TechNet Guru Competition?

Each month the TechNet Wiki council organizes a contest of the best articles posted that month. This is your chance to be announced as MICROSOFT TECHNOLOGY GURU OF THE MONTH!

One winner in each category will be selected each month for glory and adoration by the MSDN/TechNet Ninjas and community as a whole. Winners will be announced in dedicated blog post that will be published in Microsoft Wiki Ninjas blog, a tweet from the Wiki Ninjas Twitter account, links will be published at Microsoft TNWiki group on Facebook, and other acknowledgement from the community will follow.

Some of our biggest community voices and many MVPs have passed through these halls on their way to fame and fortune.

If you have already made a contribution in the forums or gallery or you published a nice blog, then you can simply convert it into a shared wiki article, reference the original post, and register the article for the TechNet Guru Competition. The articles must be written in March 2019 and must be in English. However, the original blog or forum content can be from beforeMarch 2019.

Come and see who is making waves in all your favorite technologies. Maybe it will be you!


Who can join the Competition?

Anyone who has basic knowledge and the desire to share the knowledge is welcome. Articles can appeal to beginners or discusse advanced topics. All you have to do is to add your article to TechNet Wiki from your own specialty category.


How can you win?

  1. Please copy/Write over your Microsoft technical solutions and revelations to TechNetWiki.
  2. Add a link to your new article on THIS WIKI COMPETITION PAGE (so we know you've contributed)
  3. (Optional but recommended) Add a link to your article at the TechNetWiki group on Facebook. The group is very active and people love to help, you can get feedback and even direct improvements in the article before the contest starts.

Do you have any question or want more information?

Feel free to ask any questions below, or Join us at the official MicrosoftTechNet Wiki groups on facebook. Read More about TechNet Guru Awards.

If you win, people will sing your praises online and your name will be raised as Guru of the Month.


PS: Above top banner came from Rajeesh Menoth.

Artificial intelligence can never beat natural stupidity.

Cannot start sqlserver service for datatabase

$
0
0

Hi all,

I am using Sql server 2005.  The server was shutdown unexpectdly.   After starting it up, I was unable to start sql server service for database instance.   The error that comes up with it is as follows:

The log scan number  passed to log scan in database ‘master’ is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf)

I have searched in google for the issue and tried to find any solution, knowing that I don't have backup for this particular database.     The workaround that I found is "other than restoring from backup sets" :

  1. Create dummy database master1 with master.mdf and master_log.mdf to different path
  2. Take master1 database offline
  3. Overwrite the files master.mdf and master_log.ldf
  4. Bring  master1 database online
  5. Take the backup of master1
  6. Overwrite the master database from backup

This solution caught my eyes because this is what I thought of when the issue persists to come after attempting to restart the service.  I am not SQL server (we don't have sql server dba).  But I thought that I could try to solve it.  So, I thought of trying to create a dummy database as mentioned above and then  replacing it with the current master db.  Because I thought the issue might be from master db.  But don't know whether it will work or do I have to do some post steps after replacing it.  I am not aware of the steps.  For example, in step 3 it says to overwrite the file master.mdf and master_log.ldf but then in step 6 it asks to overwrite the master database from backup.   I know that this step was provided by someone "not microsoft documention", it could be true.  Can someone explain how to approach this issue?  Or if there is another fix/workaround without restoring from backupsets since i don't have backup, would be appreciated

Thank you!

Viewing all 12963 articles
Browse latest View live


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