Exception when starting Snapshot Agent when setting up database replication - sql

I am trying to set up replication between databases. I followed this tutorials:
https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-preparing-the-server-for-replication?view=sql-server-ver15
and after:
https://learn.microsoft.com/en-us/sql/relational-databases/replication/tutorial-replicating-data-between-continuously-connected-servers?view=sql-server-ver15
I went through first without any problems. Almost completed the second, but I stuck on step View the status of snapshot generation
When I try to strat snapshot agent, I get error:
Exception Message: An unspecified error had occurred in the native SQL Server connection component.
I tried to search on the internet MSSQL_REPL55012 (that's error code I get), but didn't succeed.
I tried to look in SQL Profiler, Jobs history, Replication Monitor, even ran failing job step from PowerShell, but couldn't get any more info on that.
What might be the issue? Anybody else stumbled upon that?
I am using:
SSMS version 15.0.18206.0
SQL Server engine 15.0.2000.5

I finally got it resolved. The issue was missing OLE DB driver.
I just downloaded latest driver. Then I got msoledbsqlr.rll driver in directory C:\Windows\SysWOW64\1033. Then I copied to C:\Program Files\Microsoft SQL Server\150\COM directory, so it can be found by snapshot.exe, which is executable run by Snapshot Agent.
Alternatvely, one can define environmental variable to point to C:\Windows\SysWOW64\1033 direcotry, so it will be found there.
Another issue might be that 64-bit SQL tries to use 32-bit drivers (msoledbsql.dll, msoledbsqlr.rll), but it wasn't issue in my case.

I know this question was answered but for future reference ,updating SQL server 2019 to latest CU solved for me.

Related

USQL Unit testing with ADL tools for VS 2017 - Error after upgrading to 2.3.4000.x

One of the team member after upgrading the ADL tools for VS to version 2.3.4000.x, getting the below error..
Error : (-1,-1) 'E_CSC_SYSTEM_INTERNAL: Internal error!
The ObjectManager found an invalid number of fixups.
This usually indicates a problem in the Formatter.'
Compile failed!
Tried to downgrade back to version ( 2.3.3000.2 ), it didn't help much.
If encountered similar issue, found the reason and resolved it, please share it.
After trying out few unsuccessful options, decided to clean up the files in USQLDataRoot including localrunmetadata and catalog folder. Still, when I submit a job to create a database, there was no error, but it didn’t create the database.
We had some powershell scripts to setup the database and other objects. Ran the powershell script, which created the database and procedures. Then we were able to run the tests successfully. One more thing to double check, make sure build platform is set to “x64”.

Run PDI jobs direct inside pentaho bi server 5.1 CE

is it in principle possible to upload and run PDI jobs in bi server?
I have tried it, but always get this error in the user console:
Sorry. We really did try. Something went wrong. Please try again or contact your administrator.
in conjunction with this log file error message:
2014/08/02 14:04:43 - RepositoriesMeta - Reading repositories XML file: FromInputStream
14:04:43,384 ERROR [GeneratorStreamingOutput] Error generating content from content generator with id [viewer]
Could some give me a hint? Thanks!
Easy answer: That does not work in the CE edition. That functionality is available only in the EE edition.
I'm not sure that's by design, so I think you should open an issue at jira.pentaho.com.
In the meantime, you can run PDI jobs in the biserver CE if you use xactions or CDA.

Cannot open database because of Version error

I am getting the following error when I attempt the following actions in sequence.
Start Debugging.
Log in as a User.
Stop Debugging.
Clean Build
Without closing browser or logging out start Debugging again.
Attempt to Edit or Create or Update some database record.
If the user is not logged in or the browser is closed the error does not occur. I have even upgraded the SQL instance referring this SQL Server: attach incorrect version 661.
The database 'C:\USERS\ME\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\PROJ1\PROJ1\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 661. This server supports version 662 and earlier. A downgrade path is not supported.
Could not open new database 'C:\USERS\ME\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\PROJ1\PROJ1\APP_DATA\ASPNETDB.MDF'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file C:\USERS\ME\DOCUMENTS\VISUAL STUDIO 2012\PROJECTS\PROJ1\PROJ1\APP_DATA\ASPNETDB.MDF failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I am testing this on Chrome.
Any Ideas on what area of either MVC Code/ SQL/ Web.Config I should look for to find the cause of this error. I haven't changed the default Membership that is created with VS2012 when you start a new project.

SSAS deployment failed > "File system error: Error opening file"

For a few months we're developing an olap cube on SQL 2005. We deploy this cube on the local server which worked fine until a few weeks ago.
From that moment we got got an error while delpoying the cube.
"Error 1 File system error: Error opening file; \?\C:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\Data\SSAS_Funda.0.db\Dim Bron.0.dim.xml is not a disk file or file is not accessible. 0 0 "
The deployment proces should create these files, but that doesn't happen.
It looks like a permission problem. I check everything but couldn't find the problem. Either on Google I wasn't able to find the answer.
Any ideas?
Cheers,
Aart
I've fixed the problem.
I decided to patch and update SQL server.
I updated SQL server 2005 to SP2 using SQLServer2005SP2-KB921896-x86-ENU.exe and after that I installed a batch of patches which are available in 344806_intl_i386_zip.exe.
Then I followed the following steps which resulted into a succesfull cube generation:
- unprocess all dimensions;
- full process all dimensions;
- unprocess the cube(s);
- process the structure of the cube(s);
- process default the cube(s).
Finally it worked. I think a previous Windows Server 2003 patch or SQL server patch caused security issues on certain users. Like the "Servicce Account" I use all the time.
to fix this in the past, I have deleted the cube from the server and redeployed. This may not be an option in your situation. I would make a backup of the cube before trying this

SQL Server - An error occurred while executing batch. Error message is: The directory name is invalid

Our database server had run out of disk space, after freeing up some disk space any query run in sql server management studio, with the results sent to grid view, resulted in this error:
An error occurred while executing batch. Error message is: The directory name is invalid.
When the results sent to text view the queries worked fine.
Does anyone know why this error occurs and how to get rid of it?
All you need to do is to open command prompt and type:
mkdir %temp% and press Enter.
Simple as that. No logout/login required.
Received the message:
SQL Server - An error occurred while executing batch. Error message is: The directory name is invalid
When trying to execute a query in Management Studio after deleting temp files from c:\documents and settings\administrator\local settings\temp
Resolved when logging out of server session and back in again.
This resolution fixes this error on the following environments:
Windows Server 2003
Windows Server 2008
Windows Server 2012
Sql Server 2005
Sql Server 2008
Sql Server 2008 R2
Sql Server 2012
Sql Server 2014
Sql Server 2016
I had similar problem on SQL Server 2012. I checked the folder value in %TEMP% variable (echo %TEMP% from command prompt ) and noticed that the folder did not exist. I created the folder and it did the trick!
I had this issue on my webserver (windows server r2 running SQL Server 2012)
The directory name is invalid.
(mscore lib)
Logging out (killing my remote session) and logging back in fixed the issue for me.
Is the "Default Location for saving Query Results" set to a valid path in Tools/Options/Query Results/SQL Server/General?
Do the TMP/TEMP environment variables point to valid directories?
Reinstalling the client tools will probably fix the problem.
I had this same issue on my Windows 7 machine. I actually encountered the error both in SQL Server Management Studio and Visual Studio 2012. I checked my temp directory and found over 66,000 files. Significantly, there were a large number of files called tmpXXXX.tmp where XXXX was a hex number. The problem was that the files went all the way up to tmpFFFF.tmp. So whatever was creating the temp files was not cleaning them up properly and eventually just ran out of files. The solution was to delete all the files in that folder. Not surprisingly, this also greatly improved performance.
The temp folder can be found at: %TEMP% which will be correct for both XP and Win7.
I was facing this problem for a long time.....simple answer for this problem An error occurred while executing batch. Error message is: The directory name is invalid is just free up the disk drive space ....my problem resloved by this may be this will be helpful for many more...
I faced the same problem if DB was created in SQL Server 2008 and it was opened by SQL Server 2005. Just reopen it in 2008.
I was facing the same problem,
so to check this i typed %temp% and it gives an error for folder not found .../temp/2
so i created a folder name 2 inside temp folder and restart the sql server.
which works for me.
I know it can sound like a joke, but have you tried restarting SQL Server instance?
Yesterday i faced the same error "The directory name is invalid" when i tried to open New Query Window in SQL Management Studio 2014. It happened after cleaning (deleting) %temp% folder files.
I Restarted SQL services but no luck!
My problem was solved after restarting the server.