Renamed Database - Unable To Enable The Broker
Apr 16, 2008
Here's the scenario -
We had issues with our production database which had 'broker enabled', I restored an older backup and then renamed the Prod database to ProdOld and the Backup database to Prod. We noticed yesterday that the broker service wasn't working and had the error
'The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications.
'
I ran the following script against the database
ALTER DATABASE prod SET ENABLE_BROKER
go
GRANT CREATE PROCEDURE to User
GRANT CREATE QUEUE to User
GRANT CREATE SERVICE to User
GRANT REFERENCES on CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] to User
GRANT VIEW DEFINITION to User
And it came back with a message that the broker was already enabled.
I did a disable/enable just for kicks, but we still get the same error message.
I did a check on the sys.databases table and it shows that the 'is_broker_enabled' field set = 0 (should be one)
Any ideas on what's going on here? Could the rename caused the broker to become out of sync?
It would be great if I could just update the bit field, but I don't believe there is an easy way of updatting the system tables.
Thanks in advance
View 3 Replies
ADVERTISEMENT
Feb 16, 2008
Hello, I receive this error "The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications." I attach the database in Management Studio to query and enable the broker using the scrip below but to no avail. ALTER DATABASE DataName SET ENABLE_BROKER ‘''<<------successfulandSELECT is_broker_enabled FROM sys.databases WHERE name = 'Database name' ‘'''<<-------value is 1 Global.asax ... Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) System.Data.SqlClient.SqlDependency.Start(ConfigurationManager.ConnectionStrings("dataConnectionString1").ConnectionString) End Sub...Web.config ... <connectionStrings> <add name="dataConnectionString1" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|jbp_data.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> <add name="ASPNETDBConnectionString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> </connectionStrings>... Hope you could help. cheers,imperialx
View 1 Replies
View Related
Dec 21, 2006
Hi All,
I am newbie in SQL Service broker. As we know, the is_broker_enabled can help us check whether the specified database is enabled for service broker. I would like to know
<>How can I enable servce broker for specified database if I see the value(is_broker_enabled) is 0?
<>How can I disable the service broker for specified database is I see the vlaue (is_broker_enabled) is 1? Do I need to dropped all service broker configration in the specified database?
Thanks in advance.
Michael
View 5 Replies
View Related
Aug 22, 2007
Is there a way to automatically enable Service Broker on SQL Server 2005 Express Edition after a database has been attached or restored?
My initial idea was to check if broker is disabled whenever the client application starts and enable it from there but the problem with this is that the current user might not have the required permissions. So now I'm looking for another way to enable it right after restore/attach if at all possible. Any ideas would be appreciated.
View 3 Replies
View Related
Aug 31, 2006
I'm having problems enabling service broker for DB Mail on a SQL 2005 cluster, when I try to execute this sql it just hangs. Any ideas?
USE master ;
GO
ALTER DATABASE AdventureWorks SET ENABLE_BROKER ;
GO
View 10 Replies
View Related
Oct 30, 2007
Hi
I have created a database using the following create database instruction
Create Database SoftwareChange
ON (NAME = 'SoftwareChange',
FILENAME = 'C:DevelopmentSoftwareChangeDatabaseSoftwareChange.mdf',
size = 10mb,
filegrowth = 2mb)
log on (NAME = 'SoftwareChangeLog',
FILENAME = 'C:DevelopmentSoftwareChangeDatabaseSoftwareChangeLog.ldf',
size = 2mb,
filegrowth = 1mb)
go
This shows up fine in Managment Studio, I then connect to the database from VB.net Express and it connects to the database using the following connection string :
Data Source=.SQLEXPRESS;AttachDbFilename=C:DevelopmentSoftwareChangeDatabaseSoftwareChange.mdf;Initial Catalog=C:DevelopmentSoftwareChangeDatabase;Integrated Security=True;Connect Timeout=30;User Instance=False
I don't want it to be a user instance as and without the path in AttachDBfilename it doesn't see the database.
Here's the problem when I go back into Management Studio and click on the SoftwareChange entry under databases it gives me a file not found error then subsequently doesn't let me open it. However another database entry has appeared "C:DevelopmentSoftwareChangeDatabase", this is the path of the database and displays the contents of SoftwareChange. I can detach and re-attach as SoftwareChange but why does VB.net (i assume) change the name of Db in SQL.
Regards
Ian
View 3 Replies
View Related
Sep 13, 2007
Hi,
I am struggling establishing message communications between Service Broker instances setup on two SQL server machines. I used nielsb Service Broker examples scripts to setup these service brokers but messages always get stuck in sys.transmission_queue with transmission_status field with the error....
"Error: Dialog security is unavailable for this conversation because there is no security certificate bound to the database principal (Id: 5). Either create a certificate for the principal, or specify ENCRYPTION = OFF when beginning the conversation."
I setup the certificate security like this...
use [master];
go
create master key encryption by password = 'masterhello1';
go
1- create certificate TrpCertServ1
with subject = 'TrpCertServer1',
start_date = '06/01/2005',
expiry_date = '06/01/2009'
go
2- BACKUP CERTIFICATE TrpCertServ1
TO FILE = 'C:ServiceBrokerTrpCertServ1Pub.cer';
go
3-CREATE ENDPOINT SSB1
STATE = STARTED
AS TCP
(
LISTENER_PORT = 4026
)
FOR SERVICE_BROKER
(
AUTHENTICATION = CERTIFICATE TrpCertServ1,
ENCRYPTION = REQUIRED
);
go
4-create login remconnlogin1
with password = 'remserver@1';
go
5-create user remconnuser1
from login remconnlogin1;
go
6-grant connect on endpoint::ssb1 to remconnlogin1
go
7- Repeated the above steps for SQL Server 2
8-create certificate TrpCertServ2Pub
authorization remconnuser1
from file = 'C:ServiceBrokerTrpCertServ2Pub.cer';
go
I know it has do something with certficates, I also tried setting encryption=off on Begin dialogue conversation but no luck , same error.
Any help will be appreciated, thanks,
leo
View 1 Replies
View Related
Sep 10, 2007
Hi,
iam having vs2005 installed on my machine and i also installed sqlserver2005 dev edition on my machine...Now iam devloping a Window Appplication in which I need to populate a grid from Sqlserver2000 (dev edition) which installed on remote (i.e another network)....when i try to run my application it gives me a error tht "Unable to connect to sqlserver2005".actaully i specified in my connection string to connect to Sqlserver2000 on the remote machine.
I feel to know how to enable remote connection on Sqlserver 2000.So tht i can access this sqlserver2000 from another machine
With regards
Mahender
View 1 Replies
View Related
Nov 10, 2006
Hi there
I am working on Visual Web Developer Express Edition 2005. When I right click on database explorer to create an SQL server database then I always find the option " Create New SQL Server database " Disabled.
Can any one tell me how to enable that option please ?
View 4 Replies
View Related
Jul 26, 2007
Hi,
Is there a way to allow specific databases access to the CLR. Currently, my understanding is that when this setting is enabled, it applies to all databases within the instance.
Kind regards,
Jan.
View 1 Replies
View Related
May 1, 2008
Hi Guys
I have sort of a weird problem; we havea sql server 2000 box which was virtualized using VMWare, the virtual server was then renamed and used as another sql server.
there is a simple .net framework 3.5 console application (running on the same sql server box) that reads and deletes data from that sql server, this console application opens 2 connections simultaneously, for some reason after creating the VM and renaming the server this app didn't work, the problem is that when there was one connection open the second connection command always times out though the command only deletes one record from the DB.
After several trials I found that if I ran this app from another server it works without problems and to get it working on the same box as the sql server I have to use the ip address instead of the server name in the connection string.
I had another problem related to editing the sql agent jobs on the renamed server but I found a solution for this one in KB article.
Any ideas?
View 6 Replies
View Related
Mar 3, 2008
Had to migrate to new hardware running Server 2003, sql 2005. Databases, logins, two SSIS(DTS) packages working great. But, System and User maintenance plans failing since name change.
So, recreated them, and (with minor problem to be addressed at another time) the recreations are working fine. But, I can't delete (or modify) the old plans or jobs. Get the following error when physically sitting in front of the server logging in "Exception has been thrown by the target of an invocation(mscorlib). An error has occurred while establishing a connection to the server. When connecting to sql server 2005, this failure may be cause by the fact that under the default settings, sql server does not allow remote connecitons. (provider: tcp provider, error: 0 no such host is know) error 11001
As I said, I've disabled both jobs, but would prefer to delete the plan/jobs. But, it won't let me. Any ideas?
View 2 Replies
View Related
Apr 9, 2008
We have renamed the 'sa' account on a SQL Server 2005 machine. Whenwe runSELECT * FROM sysloginsit appears that 'sa' no longer exists as a valid SQL login. However,when we look at running processes through sp_who, we see that 'sa' isstill being used in various background operations, even when we shutdown and restart the SQL Server. Can someone explain this?Bill E.Hollywood, FL
View 2 Replies
View Related
Sep 29, 2007
I recently changed the name of my pc to MYNEWPC ...but in SQL Server 2005 Security/Logins there are a couple of logins pointing to the old name...would i need to add these, change these or do something to make it point to the new pc name?
Here is what I see that needs to be changed from MYOLDPC to MYNEWPC, how do i go about doing this..is this needed?
MYOLDPCSQLServer2005SQLAgentUser$MYOLDPC$MSSQLSERVER
MYOLDPCSQLServer2005MSSQLUser$MYOLDPC$MSSQLSERVER
MYOLDPCSQLServer2005MSFTEUser$MYOLDPC$MSSQLSERVER
View 1 Replies
View Related
Mar 24, 2003
I have a following problem. I have installed the
Microsoft Search Service. It is visible in the Service
Manager and is shown as running. The platform is a
Windows XP professional machine running SQL Server 2000
developer. I am using the service off the local host. I
can not enable the Full-Text search on the database as
that field is grayed out in the tools menu. Having read
the KB article 270671 I tried to use the stored procedure
sp_fulltext_database 'enable' to achieve the desired
result, but recieved an error 7609 Full-Text Search is
not installed, or a full-text component cannot be
loaded. At least according to the Service Manager the
Microsoft Search service is up and running. Any ideas as
to what is causing this. Thanks a lot.
--eugene
View 2 Replies
View Related
Apr 8, 2015
The following is from an accidental dba perspective.To enable RCSI on a database, referencing these two parameters:
is_read_committed_snapshot_on (value 0 or 1)
and
snapshot_isolation_state (value of 0,1,2 or 3) - based on specific needs. At a minimum, it should be a 1..Both parameters are required.
View 5 Replies
View Related
Nov 22, 2006
Hi,
I currently have serverA importing data from an AS400 oledb connection and serverB on hot-standby as a mirror. The data import is being performed via an SSIS scheduled job.
I've yet to implement any solution in the following case:
If the database on serverA fails, it will failover to the mirror. But the jobs will still be on serverA. Ideally, I'm assuming the jobs should not run on serverB since it will be attempting to update the mirrored database. So, I am wondering if both servers can have identical copies of SSIS packages and jobs and simply (?) enable or disable them based on which server will be hosting the principal database.
Is there any solution where the jobs can automatically be disabled on the server with the mirrored database and enabled on the principal database depending on its status?
View 4 Replies
View Related
Sep 19, 2000
Our network people changed our machine name one character without our permission, they say their naming standards can't handle an "underscore" we put in our name...now the SQL Server won't run because it doesn't recognize the name of the machine.
Is there a way of bypassing or telling SQL server that we changed the name without having to reload all of our information?
View 2 Replies
View Related
Nov 2, 2015
The option:
SQL Server Configuration Manager>SQL Server Network Configuration>Protocol for SQL_xxx (right click)>Properties, we can see two Tabs:
Tab 1: Flags
Tab 2: Certificate
If I set the value of Hide Instance= Yes, does "Force Enctyption", need to be set YES as well?
Or Force Enctyption has to be enabled in order to hide instance?
What is the recommend settings?
[URL]
View 3 Replies
View Related
May 25, 2007
Hi,
I'm using MsSql 2000 data base, how to enable and disable user in mssql 2000 version
View 3 Replies
View Related
Sep 5, 2005
I have read that if I change "computer name" and then try to startup sql server it will recognize the changes automatically BUT you need to execute sp_dropserver and sp_addserver procedures too in order to set all thing right.But yesterday I tried it on a Personal edition on xp and after reboot sql server came up without any problem and I could connec it without executing sp_dropserver and sp_addserver! Was it a specific situation or no need to those SPs at all?
View 10 Replies
View Related
Apr 5, 2007
Hi,
I am struggling with the position SSB could take in an SOA. If I would want a broker in the general sense, meaning an intermediary sitting between applications which exchange information through messaging, would SSB be a good candidate? I know Biztalk is probably the primary candidate, but in my scenario I would end up with Biztalk apps with empty orchestrations. Also, I think Biztalk is more expensive to manage. So I am looking for a lightweight broker for a simple SOA targeted at application interoperability, no fancy business processes in sight.
I look forward to some responses.
Kind regards,
Neeva
View 2 Replies
View Related
Nov 10, 2015
How can i Trace Database Audit specification Enable and Disable. i want to maintain log for enable or disable database audit specification.
View 4 Replies
View Related
Jul 11, 2006
I'm trying to create a service broker on the same database...with one service and one queue. But my queue ends up with nothing in it. Here is the source...what's wrong?
Alter Database adventureworks set ENABLE_BROKER;
ALTER AUTHORIZATION ON DATABASE::[adventureworks] TO [SA];
create master key encryption by password = 'P@SSw0Rds';
CREATE MESSAGE TYPE CreateQBLetters VALIDATION = NONE
CREATE MESSAGE TYPE LetterResponse VALIDATION = NONE
CREATE CONTRACT BuildQBLetters (CreateQBLetters SENT BY INITIATOR, LetterResponse SENT BY TARGET)
CREATE QUEUE BuildLettersQueue with status=on
CREATE SERVICE CreateQBLetters ON QUEUE BuildLettersQueue
-- At this point, we can begin the conversation
DECLARE @conversationHandle UNIQUEIDENTIFIER
DECLARE @message NVARCHAR(max)
BEGIN
BEGIN TRANSACTION;
BEGIN DIALOG @conversationHandle
FROM SERVICE CreateQBLetters
TO SERVICE 'CreateQBLetters'
ON CONTRACT BuildQBLetters
-- Send a message on the conversation
SET @message = N'Hello World';
SEND ON CONVERSATION @conversationHandle MESSAGE TYPE CreateQBLetters (@message)
END CONVERSATION @conversationHandle
COMMIT TRANSACTION
END
GO
select * from sys.transmission_queue
select * from sys.conversation_endpoints
-- peek into the queue
select cast(message_body as nvarchar(max)) from BuildLettersQueue
GO
-- Receive a message from the queue
--RECEIVE CONVERT(nvarchar(max), message_body) AS message FROM BuildLettersQueue
-- Cleanup
DROP SERVICE CreateQBLetters
DROP QUEUE BuildLettersQueue
DROP CONTRACT BuildQBLetters
DROP MESSAGE TYPE CreateQBLetters
DROP MESSAGE TYPE LetterResponse
GO
-- you have to clean out the service broker first -- a conversation could be hanging around
alter database adventureworks set NEW_BROKER;
GO
DROP master key
go
View 3 Replies
View Related
Dec 27, 2007
I've search this forum and the web - tried this with and without sqlagent running and it always fails:
alter database dbname set enable_broker
I believe there are messages in queues somewhere, but have no idea how to see if and how many there are.
Maybe the broker for this database can't be enabled with too many messages in the queue?
I found code on here that was supposed to clear all message queues, but it never completes.
Anyway...someone else designed this entire system and I have no knowledge of the service broker.
Help!
View 3 Replies
View Related
Apr 17, 2014
I had a cluster running on 3 nodes (windows failover cluster) with server 2012 and SQL server 2012 running in the cluster. Well, I thought I'd just go ahead and rename all 3 of the hosts with new hostnames and it apparently broke the cluster pretty bad. Now when I open failover cluster manager I cannot see anything nor can I connect to the cluster object in AD. I re-named all of the hosts back to their original names but that didn't work.
View 5 Replies
View Related
Apr 1, 2015
I am using SQL 2012 SE and implementing transactional replication. I need to insert the rows from publisher database tables to new tables, drop the old tables and rename the new tables with the old table names.
For example:
Publisher database tables that are being replicated:
Table1
Table2
Table3
and I am going to create new tables in publisher database
Table1_new
Table2_new
Table3_new
Move data from
Table1--->Table1_new
Table2--->Table2_new
Table3--->Table3_new
Drop constraints from and then tables (does this require articles to be removed from replication?)
Table1
Table2
Table3
Rename
Table1_new to Table1
Table2_new to Table2
Table3_new to Table3
Does this require replication to set up from scratch or add the three articles only to replication? Is there a way this can be done without pausing or reinitializing replication or without removing articles and adding them back?
View 0 Replies
View Related
Jun 26, 2015
How does one enable sql connections limits for user connections per new and existing databases? how to do it on whole server per database but not set a limit per user.Looks like this must be run on each databases but what if you have 100s of databases:
USE AdventureWorks2012 ;
GO
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE ;
GO
EXEC sp_configure 'user connections', 325 ;
GO
RECONFIGURE;
GO
View 3 Replies
View Related
Nov 18, 2007
Hi,
I have visual studio 2005 with the sql server express edition that is installed by default when installing vs2005.
I am used to work from within vs when I want to create and work with databases for my web sites (I dont have visual manager installed).
I would like to enable full text search on a table's column.
Is there an easy way to do that from within vs or is it necessary to install another copy of sql server express with advanced services as well as sql server managment studio express?
How can I know if full text search is enabled?
Thanx in advance!
View 1 Replies
View Related
Jul 24, 2006
I read the blog about service broker and database mirroring. Have you actually gotten this to work? I have a database that is mirrored. A third party vendor's software is using query notification which in turn uses service broker for dirty cache notification. Based on your blog I created a route specifying a mirror address.
CREATE ROUTE ServiceBrokerMirrorRoute AUTHORIZATION dbo
WITH SERVICE_NAME = 'http://schemas.microsoft.com/SQL/Notifications/QueryNotificationService', BROKER_INSTANCE = '70D4070D-C739-43B3-9167-7156209F87BA', ADDRESS = 'TCP://10.128.183.210:5100',
MIRROR_ADDRESS = 'TCP://10.128.183.211:5100'
And then I tried to ALTER DATABASE SET ENABLE_BROKER but it fails with a
Server: Msg 9778, Level 16, State 1, Line 1
Cannot create a new Service Broker in a mirrored database "mydatabase".
Server: Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
Is there an order to this should I have enabled servicebroker on the database and then mirrored it?
Any help would be appreciated!
View 1 Replies
View Related
Feb 15, 2008
I have a database that we have running service broker. Its a web based application hitting the database. Occasionally I need to restore the database in the development environment. Every time I trie to restore I have issues because there is a service broker connection. I have tried various commands to stop it, and usually after 20 minutes I finally get it to stop and not recreate itself.
Can anyone point me to an article or provide information on the best way to stop/prevent service broker so that you can restore a database?
View 4 Replies
View Related
Feb 29, 2008
I am getting this message in the SQL Server error log:
Could not start Service Broker for database id: 10. A problem is preventing SQL Server from starting Service Broker. Check the SQL Server error log for additional messages.
It appears even when the broker is disabled on the database. How can I eliminate this error?
Thanks!
View 5 Replies
View Related
Feb 14, 2007
Hi
I tried to setup service broker to fail over to a mirror database. After the target database failed over, the message I send stays in sys.transmission_queue with no error in transmission_status. I check the mirror server log and I see the following.
An exception occurred while enqueueing a message in the target queue. Error: 15581, State: 3. Please create a master key in the database or open the master key in the session before performing this operation.
The database has the master key because its a mirrored database? Did I have to do something extra here
Paul
View 5 Replies
View Related