Using Service Broker with Sql Server Express 2008 - sql-server-express

Is it possible to use external activation on sql express without going thru sql enterprise/standard?
I would like to send a message to sql express service broker, then have it notify my external application service running on the same box, in order to kick off a console app to pickup the message and process it. I do this already successfully from a remote Sql Enterprise db.
But now I need everything self contained on one box with Sql express, without using the remote Sql Enterprise.
However sql express has limitations so I'm wondering if I can use sql express as described in a stand alone configuration, without going thru Sql Enterprise. Thanks for your help!

You can do that, as long as the box sending the message is non-express edition.
The edition-related limitation of Service Broker is that a message must go through at least one non-express instance on its way from the sending service to the receiving service. There are no limitations on the External Activator service itself.

Related

SQL Server Service Broker and Linked Servers

I've setup a Service Broker on one of databases to automatically pick up stored procedures in a specific schema (Build) and run them on a daily basis. So far everything has been running fine, however we've now got a need where we need to access a remote sql server which is running SQL Server 2017 and has the latest Machine Learning Service installed.
I've given the service account that runs the primary SQL Server (SQL 2016) access on the remote server, and ensured the Service Broker is executing under the service account, rather than the local SQL account (sa).
Whenever we try to access the remote server, we are getting the following error:
Linked servers cannot be used under impersonation without a mapping
for the impersonated login.
I've tried adding an EXECUTE AS to the process, however this doesn't seem to make a difference. I've also ensured it is running under the service account, and it is.
I can get it to work using a mapped login on the linked server, however this isn't ideal, as we don't want to run the sql server in mixed authentication as this has been determined as an IT risk.
I've run out of ideas or what I can do here, and can't find any other help pieces with this same problem. I did want to roll this process out to more of our warehouse builds, however this is a deal breaker at this stage.
help?

access message queue SQL Server from nodejs

I'm writing a webAPI in nodejs. I want to expose a socket.io to clients so they can get realtime notifications. The information I want to send to the clients is stored on a SQL Server 2008 R2 database. I'm clear on how to send the data from nodejs to the clients... what I can't figure out is how to send the notification from SQL Server to nodejs?
There seems to be a possible solution using a new service bus module from Microsoft but installing and managing a service bus looks like asking for trouble.
I read about a lot of MQ solutions for nodejs like node_redis, node_stomp, etc. but none of they speak directly with MSMQ or SQL Server.
I'm a total newbie on the MQ world, but I guess I'll manage to put the data I need from SQL Server to a MSMQ queue, so my question is, how can I access a MSMQ queue from nodejs?
Thanks.-

Creating a Database Server for home use in SQL Server 2005 Express

I am looking to create a database server that can be used to store data using a VB.net application. When I initially installed SQL Server 2005 Express edition, I believe I installed this using the LocalDB option.
As it stands my application is a simple tool which utilises the Process.Start command under certain situations, depending on user input, to launch Game Servers for use at a gaming LAN I assist in running.
I wish to progress the application by being able to update, delete and query a database created in SQL Server 2005 Express. I understand the use of connection strings etc, however I am wondering if the installation using LocalDB will mean that I cannot connect to the server to process the data I require.
Can I continue to use the LocalDB option and create a Database Server for specific use using my application or is a different installation option required?
Secondly, can someone point me in the right direction of how to create a new Server for this purpose? All of my searches so far have provided results for creating a database only, and not the server.
I have a couple questions about what you are trying to do.
First, why are you installing SQL Server 2005? It was released almost a decade ago.
I would go with 2012 express edition.
http://www.microsoft.com/en-us/download/details.aspx?id=29062
Second, install the management tools. SSMS is a nice GUI to do work in.
Third, If you are spinning up anything other than express, there are licensing costs which are quite high. 9K for standard and 25K for enterprise per socket or such.
Here are the versions and features list from microsoft.
http://technet.microsoft.com/en-us/library/ms144275.aspx
Last but not least, having the express edition on another computer is fine. However, you will have to use a network protocol such as TCP/IP instead of shared memory.
It will take longer to send Tabular Data Stream (TDS) to the other computer versus talking to memory on the same computer.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c4f06669-41fd-42e6-b4a9-564cf04ca9f7/how-to-choose-between-shared-memory-named-pipes-tcpip-via?forum=sqlgetstarted
Good luck with your project.
You can use a local instance of SQL Server just fine, if you want to set up a separate server for some reason then you'll need either a 2nd machine on which to install SQL Server, or to spin up a virtual machine. If running Windows 8 (and barring hardware limitations) you have Hyper-V at your fingertips.
This is not a complete answer for you but may give you some things to think about.
First you might want to think about your choice of database. If you don't have a compelling reason for using 2005 you will probably at least want to move to SQL Express 2008.
Second, to answer the part about creating a server... A server is something that serves data. In a general sense a computer configured to be contacted by external machines and respond with data is a server. A web server runs a program like IIS or Apache to respond with web pages. A database server contains a database and allows connections to that database. So as long as you install the database on a computer and configure it to allow external connections, you have your database server.
In MS SQL there are several things that need to be set up to allow a database to accept external connections. One is that the SQL Server Browser service will need to be active. Another is that the database itself will need to be configured to allow external connections (SQL Authentication type probably).
Hope this helps.
Addition:
SQL Remote Connection Configuration
Disclaimer, I don't have SQL Express 2005 installed but I think the settings are found in the same place in 2008. If the info here is not exact to SQL Express 2005, the general terminology used here should be enough to get you headed in the right direction to find the specifics.
While viewing the database in Server Management Studio or Enterprise Manager, right click the database server instance name (the root of the tree) and select properties. There should be a section title Connections and within this section there should be an option "Allow remote connections to this server". Make sure it is checked. The other setting you need in this properties menu is under the security area. There is a radio button for "Windows Authentication Mode" and "SQL Server and Windows Authentication Mode", you want the second that allows both.
The next step you have may be to create a new user, add a password, and connect the user to the database. That will give you the credentials you will use in your database connection string while programming. I usually add new users through the security section of the database then set the User Roles for each database that I need to connect to. It is good practice to limit the permissions to those needed by the application. Typically this is read and write, but sometimes you can get away with just read. The less the better.

Create Windows Desktop widget which connects to SQL Server

I want to create a desktop widget for Windows 7.
My requirements are below
I can provide SQL Server login credentials
It should connect to SQL Server
List out all the jobs in the server
Can anyone guide me on how to do this and where to start from?
Perhaps create a middle layer, that returns XML/JSON/HTML/..., that your widget can call through HTTP?
SQL Server 2005 supported native XML web services using SOAP/HTTP endpoints.
It's been deprecated in sql server 2008.
Your best bet would be to create a small HTTP server that acts as a broker between your SQL Server and desktop widgets.
You can find C# example code for HTTP server on Google.
http://www.google.is/search?hl=is&q=c%23+simple+http+server
Then let your widget just call the HTTP server for the information you want to display.
PS: Make your HTTP server log on and talk to the SQL Server, don't send database credentials (or ay other for that matter) over HTTP.

Reporting Services running on SQL Server 2008 Express

I know I can run Reporting Services on SQL Server Express w/ Advanced Services. The articles I have read do not touch on my question. I'm wondering, in this scenario, can remote users execute reports from the report server remotely using URL access ex:)http://mySQLExpressBox/ReportServer/rptMyReport....... etc - Or will reports only be served if the request comes from the same box/server?
This is possible -- it works the same way non-express editions work. Were you running into any specific issues when you attempted to do this?
The restriction that ewall was referring to is not a restriction on remotely executed reports, but on remote data sources. The Express edition is limited to local data sources (although you can get around this with Linked Servers). Ex: ClientA can remotely execute http://mySQLExpressBox/ReportServer/rptMyReport but mySQLExpressBox can only retrieve the data for the report from itself.