I'm trying to set up transactional replication in SQL Server 2012 using AdventureWorks 2012. And right at the end of the publications setup i get the following error:
SQL Server could not start the Snapshot Agent.
Additional Information:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
SQL ServerAgent is not currently running so it cannot be modified of this action.
Changed database context to 'AdventureWorks2012'.(Microsoft SQL Server,Error 22022)
I'm guessing this error isn't allowing me to execute the following code:
USE ADRepl;
SELECT * FROM Person.BusinessEntity
As every time I do execute this I get the following error:
Msg 208, Level 16, State 1, Line 2
Invalid object name 'Person.BusinessEntity'.
Make your sql agent property as automatic.
Set the SQL server agent service Automatically.
Press windows key+R
type services.msc
right Click on sql server agent
properties >> startup >> select automatically.
Related
I am using SQL Server 2014 and I need to access the database using a VPN. I have no issue logging on the SQL Server using my VPN but I can't expand the database or query it.
When I click the database to expand it, I get the following message:
The database XXXX is not accessible. (ObjectExplorer)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.DatabaseNavigableItem.get_CanGetChildren()
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.NavigableItem.RequestChildren(IGetChildrenRequest request)
at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ExplorerHierarchyNode.BuildChildren(WaitHandle quitEvent)
If I query a table from the database, I get the following message:
Msg 916, Level 14, State 1, Line 2
The server principal "Bi" is not able to access the database "HMS_ARL" under the current security context.
Any kind of help would be much appreciated.
I have cloned our Microsoft SQL to a new server. The server contains a few databases and "SQL Server Agent" jobs that run on a scheduled basis. I have tried changing all existing references to this new server name and use accounts on this new server. However I am still getting the following error in my error log and my jobs fails to run (btw, this is through Microsoft SQL Management Studio),
[298] SQLServer Error: 15404, Could not obtain information about Windows NT group/user 'DOMAIN\user_account', error code 0x534. [SQLSTATE 42000] (ConnIsLoginSysAdmin)
I've got a couple of Maintenance Plans which are pointing to the old server. For some unknown reason I can't edit the existing connection and I can't delete it. I can add a new one but the other connection can not be removed.
I need to know where I need to change for this error to go away and the jobs start running.
This may be because SQL has the wrong server name in Master. Here is another article on the subject.
SQL Server Central Article
In order to fix this, run a search on Master with the following code:
use master
select SERVERPROPERTY('servername')
select ##SERVERNAME
select SERVERPROPERTY('machinename')
go
If you see the old server name in the list you will have to drop the server and add the new one
use master
exec sp_dropserver "OldServerNmae"
go
use master
exec sp_addserver "NewServerName","local"
go
whenever i try to import BACPAC on local sql server I am getting below error message:
TITLE: Microsoft SQL Server Management Studio
------------------------------
Could not import package.
Warning SQL0: The source contains users that rely on an external authentication provider that is not supported by the target. These users will be treated as users without logins.
Warning SQL72012: The object [DB_NAME_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Warning SQL72012: The object [DB_NAME_Log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
Error SQL72014: .Net SqlClient Data Provider: Msg 33161, Level 15, State 1, Line 1 Database master keys without password are not supported in this version of SQL Server.
Error SQL72045: Script execution error. The executed script:
CREATE MASTER KEY;
(Microsoft.SqlServer.Dac)
------------------------------
BUTTONS:
OK
------------------------------
All the previously reported issues on SO are not same as this one. Does anyone faced the same issue before?
Try running this against your master database (right click on the server name in SSMS -> New Query)
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO
After this, you can go through the import bacpac wizard again and the issue should be resolved.
Eventually I was able to resolve this issue by following option 2 suggested here
In nutshell,
Save the utility RemoveMasterKeyFrombacpac from here
Run the command .\RemoveMasterKey.ps1 -bacpacPath "C:\BacPacs\fileName.bacpac"
Once above command finishes we get the -patched bacpac which imported seamlessly.
Update
With new MS SQL Server 2016 (13.0.1745.2) and SSMS v17.6 this is not an issue anymore.
While configuration SQL server mirroring I got below error.
I started SQL Server and Analysis services with same account on both servers. SQL server Agent service also started in both servers but reporting service was not installed in Principal server,will this conflict?
Firewall also stopped.
Error:
An error occurred while starting mirroring.
ADDITIONAL INFORMATION:
Alter failed for Database 'Data Base'
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The remote copy of database "Data Base" does not exist. Check the database name and reissue the command. (Microsoft SQL Server, Error: 1448)
Following steps was used by me for Mirroring:
Full and Transaction Log backup of Mirror DB have been taken from principal server.
Copied into Mirror server and Restored successfully with No Recovery option
Starting Mirroring into the Principal server
Rightclick the DB--> click on Tasks--> click on Mirror--> Click on Config Security buttion--> Next... after creation of Endpoint finally click on start Mirroring. Here it's throwing error.
I am trying to restore the database in SQL Server 2008. The backup file is SQL Server 2008 from another PC . When i want to restore show me the error
TITLE: Microsoft SQL Server Management Studio
------------------------------
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
ADDITIONAL INFORMATION:
Read on "D:\New Folder (2)\mihirreliance.bak" failed: 38(Reached the end of the file.) (Microsoft SQL Server, Error: 3203)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=3203&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Why this problem aries .How to solve this error.
The Cause of the Problem is that the Drive in which your Source Data base files are located is not present in your server where you want to restore the database.
Please use the SQLCMD Promt and use the Manula RESTORE command with REPLACE and MOVE option .But before using the Restore command get the logical file name of your source database
syntax:
RESTORE DATABASE [TestServer28Sep2010]
FROM DISK = 'C:\BackUp\TestServer28Sep2010.bak'
WITH REPLACE ,
MOVE 'SourceLogicalFileName_Data' TO 'D:\JapanTestServerDB\TestServer28Sep2010.mdf',
MOVE 'SourceLogicalFileName_log' TO 'D:\JapanTestServerDB\Server28Sep2010.ldf'