SignalR BackPlane - signalr

I have implemented SignalR BackPlane and it seems to be working fine.
Have used this URL for reference.
I am creating a new SQL Database to achieve SingalR. My Doubt is: why do I have to create a new DB, or why can't I make use of existing Database?
Can I use the existing DB to achieve the same rather than creating new DB?
What SQL permissions have to be taken care of to create a new table in an existing DB?

You can use the same DB , however for performance it is better to have DB with Service Broker enabled.
(That is why I have a seperate DB for my singlR use cases)
Permissions:
"Requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created."
Taken from here http://msdn.microsoft.com/en-us/library/ms188264.aspx

Related

OpenEdge SQL DBA Account Setup

I'm setting up SQL access in a newly created OpenEdge 11.5 database.
In checking the contents of the sysdbauth table using "select * from sysprogress.sysdbauth", I see that there are two users setup by default: sysprogress and a user with the name of the Linux user account that was used to create the database.
I'm looking for recommendations as to how to handle these two accounts. Obviously I want to have an account to use for DBA tasks. Should I use one of these accounts for the purpose? If so, what should I do with the other account?
Is it possible (and safe) to be deleting either of these predefined accounts?
On page 175 of the Database Administration guide you can read about default users and why they are created:
Tables used from SQL only
An SQL database administrator (DBA) is a person assigned a sysdbauth record in the database.
SQL DBAs have access to all meta data and data in the database. To support internal schema
caching, every OpenEdge database begins with a DBA defined as "sysprogress." However,
OpenEdge restricts the use of "sysprogress."
When you create an OpenEdge database using the PROCOPY or PRODB commands, and the
database does not have any _User records defined (from the source database, for example), then
a DBA is automatically designated with the login ID of the person who creates the database. This
person can log into the database and use the GRANT statement to designate additional SQL DBAs,
and use the CREATE USER and DROP USER statements to add and delete user IDs.When creating
users, this DBA can also specify users as SQL-only users, who can only access the database
through SQL.
There are several knowledge base entries around the task of deleting or disabling the default users.
http://knowledgebase.progress.com/articles/Article/P5094
http://knowledgebase.progress.com/articles/Article/P161411
This suggests that it's really safe to delete or disable these accounts but you should:
1) Create replacing accounts first.
2) As always: test in a separate environment first and not in production!
Yes, in fact Progress kind of expects you to do so. Create a root account and get rid of both. It's fine.

Is Schema in Oracle is equivalent to Database in Microsoft SQL Server?

I am new to Oracle database and I wanted to create a database in Oracle. I followed this link to create a database:
http://www.fehily.com/books/createdb/createdb_oracle_11g_2.html
In Microsoft SQL Server, when we create a database, we use the create database command and the database creation is instantaneous [within fraction of seconds], but the Database Tool as described in link above took couple of minutes to create the database. Is database creation in Oracle this much slower?
Searching more about it, I have a feeling that this database created using above tool in Oracle is not equivalent to the database we create in SQL Server. Rather, the schema/user in oracle is appearing to be equivalent to database in SQL Server. Is it true?
So, If I want multiple databases in Oracle, do I create a single database and then multiple schemas inside that single database? And then are those multiple Schemas are my databases?
I am very much confused about all this. Can someone please refer me to a nice article/book that explains these things in oracle in detail?
For most purposes, yes you would indeed map a SQL server database to an Oracle schema (=user).
The term "database" in Oracle does not mean the same as in SQL Server. An Oracle "database" (from a technical point of view) is more like a SQL Server instance/installation, rather than a "database" in SQL Server.
SQL Server has two levels of namespace: database and schema. Whereas Oracle only has a single level of namespaces: a schema (which has a 1:1 relation to a user)
SQL Server and Oracle both support Schema.
A Schema is like a new database but it is not a new database
Maybe you are confused, Mysql doesn't support schemas but SQL server offers full support for it.
In mysql your database is a schema, to only difference is that it doesn't support multi schemas
For the part of creating multi databases or a single database if multiple schemas it all depend in your specific situation, you should test thinks like performance and how much money you want to spend, a multi database approach can be very expensive unlike a multi Schema approach

How to create multiple instance in sql server dynamically in a SAAS environment?

I want to create a new project on contract management system. In this I have to manage multiple organizations and want to create new instance in sql server dynamically for each organization in a saas environment. How is this posiible? I am using asp.net for development. Any help would be appreciated.
A true SaaS application has a single application and database. It has the ability to have multiple tenants use the application. All data in the database needs to know what tenant it belongs too.
For instance if you have a booking system: Your customers sign up to use the software and become a row in the customer table with an ID. When a booking is made it has a customerID column as a foreign key to the customer table. Then all reports, booking views etc are done for that tenant using their customer id. You as a service provider can then run reports on all customers/tenants for your own purposes. Multiple tenants can use the system and all their data be in the same set of tables. This then means when you need to cluster replicate backup etc it is a single db, and a single migration for schema updates.
See these wiki's on multitenancy and SaaS
This of course requires your DB schema (and your app) to support this - if you are unable to change the schema then there are a number of options to up a new DB based upon the technology you are using. If you are using code first EF, then there will be db creation and migration scripts you can use. Otherwise it may justhave to be a sql script you have to generate and then maintain and run this each time a new customer is required. Personally i would rather have a single DB with an appropriate schema.

How to create federation in an existing azure sql database

Am very new to azure federation.In my project there is an existing SQL azure database and now we want to use azure federation for scaling that database.
How can I achieve this on my existing table myCustomer. Am planning to federate the table based on customer_Id. any relevant tutorial available?.From where should i begin.
By Federation do I have to change my existing queries used in the project.?
Thanks.
A rough summary of the changes you need to make to federate your database are:
Decide on an id you will federate on (e.g. user id)
For each table you wish to federate alter your table schema so the federation key is part of the primary key, and annotate the table so it knows which column is the federation key.
For each query that is run against a federated table you need ensure that the connection used is redirected towards the correct federation.
This last step is currently done by adding the USE FEDERATION statement to your queries. It can be a little tricky to implement if you are using Entity Framework or Linq. Something else to be cautious of in this area is making sure the USE FEDERATION statement is re-run if your transient error handling kicks in.
The links Alexander posted are all good to read.
Did you read the article by George Huey in MSDN Magazine?
It covers transition from an existing SQL or Azure SQL DB to a DB with federations in the section called "Migrating Database Schema from SQL Server or SQL Azure to SQL Azure Federation".
Right after that I would recommend to read the tutorial on data querying (part1, part2).
You will have to change your queries if they want to access the data from federations. Basically, every federation is an independent SQL database and you have first to establish connection to correct federation before querying for data.
There are also some peculiarities how to use federations with Entity Framework, partially due to additional overhead for connection to federation instance, and partially because federations do not provide support for MARS operations (article).

Connect to SQL Server (view)

I developed a web application running on MySQL and now I need to get some data from another database (Microsoft SQL Server).
The SQL Server administrator creates a view to give me the data I need. Now the question is:
How can I work with this data on my current Symfony2 application?. This data will be only read only data, but eventually I´ll record some of this data on MySQL.
Do I need to develop another app, in python for example, to extract that SQL Server view data and save them into MySQL table?
It doesn't matter for Doctrine that your entities refer to a view or a real table, so declare the entity of view like other entities and use it as you want for queries, relations with other entities, etw.

Resources