I'm using SQL Server 2012. I moved my Data and log files and I tired to start the SQL Server. But it says:
Unable to Start Service on Server X. (mscorlib)
The MSSQLSERVER service on PSFACAMDWHSQL2 started and then stopped. (ObjectExplorer).
The SQL Error log:
Unable to start service MSSQLSERVER on server PSFACAMDWHSQL2. (mscorlib)
Program Location:
Server stack trace:
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Service.Start()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ServiceActionHandler.EndInvoke(IAsyncResult result)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ServiceControlProgress.ActionCompletedHandler(IAsyncResult result)
The MSSQLSERVER service on PSFACAMDWHSQL2 started and then stopped. (ObjectExplorer)
Program Location:
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.Service.Start()
Any help will be much appreciated.
Your instance won't start because model database is not where it's expected to be. As a quick fix move the model database's files to their original location and start the instance.
Pls read about moving databases here.
Quick and dirty solution but it works!
Copy the SQL agent user "NT Service\SQLSERVERAGENT" and added it to the local machine(server)'s administrator group (users and group). Once you have done that start your SQL Agent from the SQL Server XXX Configuration Manager. Do the same on SSMS.
I hope that would help.
Thanks
Related
I have a problem connecting the SSRS to Sharepoint Online List. I can connect it through Microsoft Excel (asking for credentials, auth) and can read from the list but when I use the same URL to SSRS it doesnt work and message appears saying that "E_ACCESSDENIED".
I search over the internet a lots of threads but without success. I tried all of the auth methods but without success. My thoughts are that my connection string in the SSRS should be different. I really done know and need your help! Thanks!
Here is the error:
===================================
Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
(Microsoft Visual Studio)
------------------------------
Program Location:
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPRemoteConnection.ExecuteServiceRequest(ServiceRequest request)
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPRemoteConnection.GetLists()
at Microsoft.ReportingServices.QueryDesigners.SharePoint.SharePointTables.Refresh()
at Microsoft.ReportingServices.QueryDesigners.SharePoint.QueryDesigner.Presenter.ValidateConnection()
at Microsoft.ReportingServices.QueryDesigners.SharePoint.SharePointQueryDesigner.InitializeQueryDesigner()
at Microsoft.ReportingServices.QueryDesigners.InternalQueryDesignerWrapper.InitializeDesigner()
at Microsoft.ReportingServices.QueryDesigners.InternalQueryDesignerWithGenericModeWrapper.Initialize()
===================================
Server was unable to process request. ---> Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) (System.Web.Services)
------------------------------
Program Location:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPListService.GetListCollection()
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPRemoteConnection.<>c__DisplayClass5_0.<GetLists>b__0(SPListService listSvc)
at Microsoft.ReportingServices.DataExtensions.SharePointList.SPRemoteConnection.ExecuteServiceRequest(ServiceRequest request)
Best regards.
I believe that option is only for on-premises versions, not for SharePoint Online. I do not believe you can directly connect SharePoint Online to SSRS.
We set up an SSIS package that pulls list data from SharePoint online into our on-premises database, and then query that within the SSRS report. It works pretty well for our needs.
I am trying to deploy my REST API .NET Core app with Docker for the first time, however, after creating my docker image, when I try to run:
docker run -p 8080:80 mydockerid/dockerapi
I get a big call stack among which there's the error:
fail: Microsoft.EntityFrameworkCore.Database.Connection[20004]
An error occurred using the connection to database 'CommanderDB' on server 'HELLO\SQLEXPRESS'.
fail: Microsoft.EntityFrameworkCore.Query[10100]
An exception occurred while iterating over the results of a query for context type 'Commander.Data.CommanderContext'.
System.Exception: Cannot connect to SQL Server Browser. Ensure SQL Server Browser has been started.
---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketException (00000005, 0xFFFDFFFF): Name or service not known
at System.Net.Dns.InternalGetHostByName(String hostName)
at System.Net.Dns.GetHostAddresses(String hostNameOrAddress)
at System.Net.Sockets.UdpClient.BeginSend(Byte[] datagram, Int32 bytes, String hostname, Int32 port, AsyncCallback requestCallback, Object state)
at System.Net.Sockets.UdpClient.<>c.<SendAsync>b__56_0(Tuple`2 targetPackedArguments, Int32 targetBytes, Int32 targetPort, AsyncCallback callback, Object
state)
After some research, I think the problem might be the 'Server Name' of my SQL Server Express. When I login on SQL Server Management Studio, I use 'HELLO\SQLEXPRESS' as the server name:
Here is my connection string in appsettings.json:
"CommanderConnection": "Server=HELLO\\SQLEXPRESS;Initial Catalog=CommanderAPI;User ID=myid;Password=mypassword;"
Should my server name be something else? Perhaps there's a way to change the server name to an actual IP address?
Thanks in advance.
By default SQLEXPRESS do not accept remote connections. Follow this manual to configure TCP/IP connections.
http://support.webecs.com/kb/a868/how-do-i-configure-sql-server-express-to-allow-remote-tcp-ip-connections-on-port-1433.aspx
Then try connect to your database using hostname and port. First try locally and then you can configure your app same way.
For sake of experiment you can also start SQLEXPRESS as docker container. Check this manual - https://kimsereyblog.blogspot.com/2018/10/docker-compose-asp-net-core-application.html
When I am trying to execute the SQL Server Agent job (drop a database on SSAS Tabular), I get the following error:
[136] Job Test reported: Microsoft.AnalysisServices.Xmla.ConnectionException: A connection cannot be made. Ensure that the server is running. --->
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:2383
at System.Net.Sockets.TcpClient..ctor(String hostname, Int32 port)
at Microsoft.AnalysisServices.Xmla.XmlaClient.GetTcpClient(ConnectionInfo connectionInfo)
--- End of inner exception stack trace ---
at Microsoft.AnalysisServices.Xmla.XmlaClient.OpenConnection(ConnectionInfo connectionInfo, Boolean& isSessionTokenNeeded)
at Microsoft.AnalysisServices.Xmla.XmlaClient.Connect(ConnectionInfo connectionInfo, Boolean beginSession)
at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.Connect()
at OlapEvent(SCH_STEP* pStep, SUBSYSTEM* pSubSystem, SUBSYSTEMPARAMS* pSubSystemParams, Boolean fQueryFlag)
My question is:
Why the job doesn't work when it is executed using SQL
Agent job and works when I drop the same database manually? What
should I do to fix the issue?
For the connection between SQL Server Agent and SSAS to work executed steps should refer to the server instance as \.
When i created distributor, snapshot folder have share to network with this path:
\ComputerName\repldata
But when i use merge replication with pull method, this message was fired:
Source: mscorlib
Target Site: Void WinIOError(Int32, System.String)
Message: Access to the path 'C:\Program Files\Microsoft SQL
Server\MSSQL12.SQL2014\MSSQL\repldata\unc\VLASERVER$SQL2014_TESTDB_TESTDB\20170208090120\'
is denied. Stack: at System.IO.__Error.WinIOError(Int32 errorCode,
String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at Microsoft.SqlServer.Replication.Utilities.CreateDirectoryWithExtendedErrorInformation(String
directory)
at Microsoft.SqlServer.Replication.Snapshot.SnapshotProvider.CreateSnapshotFolders()
at Microsoft.SqlServer.Replication.Snapshot.MergeSnapshotProvider.CreateSnapshotFolders()
at Microsoft.SqlServer.Replication.Snapshot.SqlServerSnapshotProvider.GenerateSnapshot()
at
Microsoft.SqlServer.Replication.SnapshotGenerationAgent.InternalRun()
at Microsoft.SqlServer.Replication.AgentCore.Run() (Source: mscorlib,
Error number: 0) Get help: http://help/0
You need to grant access to the snapshot folder to whatever account you are using for replication. This can be a separate account or the account that runs your SQL Server. Probably the easiest thing to do would be to just grant full access to "Everyone", see if that works, if it does then that's your problem and you just need to track down the account that replication is running as.
You have to provide "Full Control" access to the snap shot folder for the account you are using for replication. Along with this, you have to configure distribution for the same server where your snap shot folder is created and the name of your distributor server should be same as the name of your SQL SERVER (sql server instance should be of the distributor server). This worked for me.
I have an SSIS package that has a single OData source (sharepoint site source). The package runs fine from Visual Studio. Once deployed to a SQL instance I try to run the package via an Agent Job (uses the Agent service account to execute), and I get the following:
SharePoint List to Stage:Error: System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.GetResponse()
at Microsoft.SqlServer.IntegrationServices.DataFeedClient.Http.HttpWebRequestWrapper.GetResponse()
at Microsoft.SqlServer.IntegrationServices.DataFeedClient.Http.WebRequestHelper.GetResponseWithThreadSafeRetry(IWebRequest& request,
Func`1 createWebRequest, Int32 retryCount, Int32 retrySleepInMilliseconds, Boolean isOAuth, Func`2 refreshRequestWithNewAccessToken, Func`2
getStatusCode)
at
Microsoft.SqlServer.IntegrationServices.DataFeedClient.Http.WebRequestHelper.GetResponseWithThreadSafeRetryAndImpersonation(IWebRequest&
request, DataFeedConnection connection, Func`1 createWebRequest)
at Microsoft.SqlServer.IntegrationServices.DataFeedClient.DataFeedCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.SqlServer.IntegrationServices.OData.ODataSource.GetSchemaTable()
at Microsoft.SqlServer.IntegrationServices.OData.ODataSource.PreExecute()
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper100 wrapper)
The service account running the package has Full Control permissions on the SharePoint list in question. I have several other packages on the same server that use OData feed from the same SharePoint farm with the same service account without issue.
Turned out that the error was on the SharePoint server... the lookup column threshold in Central Admin was set to 8 (the default), but the number of lookup columns in the list exceeds that. Since I'm a farm admin, I bypass the restriction. I just wish that the error that goes through to SSIS was a little more explanatory than just (500).