Friday, March 23, 2012
ISV using SQL Authentication and a small concern
I am an independent software vendor and my app will be deployed on users machine, it will use msde for db needs on clients machine. I am using sql authentication and my app will be connecting to the database using a fixed username and password always, fo
r e.g. sa as user and "myPassword$2" as password. (I know I know that this is not 100% great, but we want to keep things very very simple but dont want windows authentication)
Now, please imagine this situation:
a) small office environment
b) My app installed on three machines.
c) database on 4th machine
d) all 3 users running my app on their individual machines and talking to db.
my concern is, will this scenario work, I mean no matter who the user is, my app logs into msde using sa and "myPassword$2", so will MSDE allow 3 users with same logins to access database at the same time.
Looking forward to hearing from you..
Thanks
Hello,
It is working correctly, but if you want to have some security (for example
a part of the program is not enabled if a user is working on another part,
you will have some problems.). For example, if user 1 has a crash, the
program will still believe that user 1 is still connected. Unless you lock
the tables...
Marc Allard
Allcomp
"dev" <anonymous@.discussions.microsoft.com> a crit dans le message de
news:3C66C1B4-CD85-4473-8B9C-9BF40E84853F@.microsoft.com...
> Hi,
> I am an independent software vendor and my app will be deployed on users
machine, it will use msde for db needs on clients machine. I am using sql
authentication and my app will be connecting to the database using a fixed
username and password always, for e.g. sa as user and "myPassword$2" as
password. (I know I know that this is not 100% great, but we want to keep
things very very simple but dont want windows authentication)
> Now, please imagine this situation:
> a) small office environment
> b) My app installed on three machines.
> c) database on 4th machine
> d) all 3 users running my app on their individual machines and talking to
db.
> my concern is, will this scenario work, I mean no matter who the user is,
my app logs into msde using sa and "myPassword$2", so will MSDE allow 3
users with same logins to access database at the same time.
> Looking forward to hearing from you..
> Thanks
|||Hello, (sorry I was in hollidays)
For example, in our program, when a user is working on a project (Project 1)
, any user can enter a new or a position in Project 1, but no other one
modify the project.
Another user can work with project 2 without any restriction so we can not
lock the full table. We had to write a column str_Wholocked on the Project
table to know that the a specific project is locked.
The problem is that if a user crash, he will not free the wholocked field so
you have to know if a user that has locked a fiel is still connected or not.
To make it, when a user connect in my application, I write his connectionID,
login_time... on a table. After that, I look at all the users connected. If
they have a login_time or connection ID different than the one on my table,
it mean that they have crashed so I can free the wholocked field. I make
this test for every connection and every access to something that can be
locked.
PS : I hope that I am clear enough, if not, please tell me what you don't
understand.
"dev" <anonymous@.discussions.microsoft.com> a crit dans le message de
news:765961A8-8196-4B6F-B87A-228DDB63F1F9@.microsoft.com...
> Allcomp please elaborate my what you mean by saying "but if you want to
have some security (for example
> a part of the program is not enabled if a user is working on another part,
you will have some problems.)."
> Thanks
sql
Friday, March 9, 2012
Issue with Multiple Fact Tables
Hi,
I am having an issue with Multiple Fact Tables..
I have 2 fact tables with some common dimensions and some independent to each fact table.
When I execute a mdx query which fetches data only from the 1st fact table, for some reason it look’s to the second fact table and display the results accordingly.
For Example
Record-Id Fact table 1 Fact table 2
Measure -[Cut In] Measure -[Zro Cut In]
1 1 -
2 12 10
3 10 5
4 2 -
5 20 -
6 0 -
7 Null -
8 0 -
If I execute Query 1; I get record-Id 2 & 3 only ( I use Nonempty function), but when I execute query 2 (Without Nonempty) , I get all the 8 record-Id’s. Any idea what it could be and why it’s dependent on measure from another fact table which is not being used in the query ?
Query 1
SELECT
{
[Measures].[Cut In]
} ON COLUMNS,
{
ORDER(
nonempty([Dim Product].[Principal Id].children)
,[Measures].[Cut In],
desc
)
} ON ROWS
FROM [SIFDW]
WHERE (
{ [Dim Period].[Period].&[200601] },
{ [Dim Period].[Period Type].&[M] },
{ [Dim Store].[organization name].&[CORERP]},
{ [Dim Product].[Team ID].&[1]}
)
Query 2
SELECT
{
[Measures].[Cut In]
} ON COLUMNS,
{
ORDER (
[Dim Product].[Principal Id].children
,[Measures].[Cut In],
desc
)
} ON ROWS
FROM [SIFDW]
WHERE (
{ [Dim Period].[Period].&[200601] },
{ [Dim Period].[Period Type].&[M] },
{ [Dim Store].[organization name].&[CORERP]},
{ [Dim Product].[Team ID].&[1]}
)
Thank you,
Manish
ManishNShah wrote:
If I execute Query 1; I get record-Id 2 & 3 only ( I use Nonempty function), but when I execute query 2 (Without Nonempty) , I get all the 8 record-Id’s. Any idea what it could be and why it’s dependent on measure from another fact table which is not being used in the query ?
Since you didn't explictly specify a measure for the NonEmpty(), it may have defaulted to a measure in the other measure, group, so you could try adding the measure in Query 1:
Code Snippet
SELECT
{
[Measures].[Cut In]
} ON COLUMNS,
{
ORDER(
nonempty([Dim Product].[Principal Id].children,
{[Measures].[Cut In]})
,[Measures].[Cut In],
desc
)
} ON ROWS
FROM [SIFDW]
WHERE (
{ [Dim Period].[Period].&[200601] },
{ [Dim Period].[Period Type].&[M] },
{ [Dim Store].[organization name].&[CORERP]},
{ [Dim Product].[Team ID].&[1]}
|||Hi Deepak,
Thank you for your quick response, but still have couple of issues with it.
If a cube has multiple measure groups, and each group has few measures; but the mdx query is just using measures from one measure group, they why it's looking for measures in other measure group which is not mentioned in the MDX Query?
Also, let's say we have 2 measure group (Each measure group has 1 measure in it), sometime it's empty in first and at time it's empty in 2nd, how can we mimic Left outer join, right outer join and Inner join considering 2 measure groups as 2 tables?
Thank you,
Manish
|||
ManishNShah wrote:
but still have couple of issues with it.
But did it work - that would be useful to know, as well?
ManishNShah wrote:
but the mdx query is just using measures from one measure group, they why it's looking for measures in other measure group
The query applies to the cube, not just to a specific measure group. So if a measure is not specified, explicitly or by context, the default cube measure would be used, which could be from another measure group:
SQL Server 2005 Books Online
Key Concepts in MDX (MDX)
...
The default measure is the first measure specified in the cube, unless a default measure is explicitly defined. For more information, see Defining a Default Member and DefaultMember (MDX).
...
ManishNShah wrote:
Also, let's say we have 2 measure group (Each measure group has 1 measure in it), sometime it's empty in first and at time it's empty in 2nd, how can we mimic Left outer join, right outer join and Inner join considering 2 measure groups as 2 tables?
You might want to start a separate thread for this - but keep in mind that extrapolating from SQL may not always be the best approach in MDX.