Showing posts with label source. Show all posts
Showing posts with label source. Show all posts

Thursday, March 29, 2012

DSN madness

I have an app that accesses a SQL db via a DSN (and MSDE). The user name and
password are contained in the app, and passed to the data source at run
time.
Everything works fine if the user is an Adminstrator (on Windows), but can't
connect if the user is a User or Power User. If I promote the user to
Administrator, it works; if I demote him back again, it doesn't.
The really strange thing is, this used to work just fine!
This is driving me nuts. Anyone have a solution?Paul Pedersen (nospam@.no.spam) writes:
> I have an app that accesses a SQL db via a DSN (and MSDE). The user name
> and password are contained in the app, and passed to the data source at
> run time.
> Everything works fine if the user is an Adminstrator (on Windows), but
> can't connect if the user is a User or Power User. If I promote the user
> to Administrator, it works; if I demote him back again, it doesn't.
> The really strange thing is, this used to work just fine!
> This is driving me nuts. Anyone have a solution?
And the error message is?
From what you say it sounds like a permission problem on the DSN.
(Disclaimed: I never liked or understood DSN. I prefer to live in a
DSN-less world.)
By the way... I don't know what sort of app this is, but embedding
username/password into the app, does not sound like something I would
do. Would it not be better to use Windows authentication?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9798CEF77432EYazorman@.127.0.0.1...
> Paul Pedersen (nospam@.no.spam) writes:
> And the error message is?
Something on the order of "Database does not exist or access denied".
Like I said, this used to work fine. After a few ws, it began to get
slow. Then it began to have occasional errors signing in. Now it won't sign
in at all. Bizarre.
I have reinstalled and re-configured MSDE several times. Recreated the DSN
too. Works fine for Adminstrators, doesn't work at all for others. Perhaps I
made a mistake in configuration, but I can't think what it might be.

> From what you say it sounds like a permission problem on the DSN.
> (Disclaimed: I never liked or understood DSN. I prefer to live in a
> DSN-less world.)
> By the way... I don't know what sort of app this is, but embedding
> username/password into the app, does not sound like something I would
> do. Would it not be better to use Windows authentication?
The user name that is passed is assigned a specific role in the database.
Although there's only one instance of the app at present, eventually it
could be run by a number of users from a number of different machines. I
prefer not to have to track all those users, who have no other business in
the database anyway. This way, I can just track the app. Wherever it's
running from, it can sign in and get its data.
At present, the database is local to the machine the app is running on.
Within a couple ws, the database will be moved to a server.|||Paul Pedersen (nospam@.no.spam) writes:
> Something on the order of "Database does not exist or access denied".
> Like I said, this used to work fine. After a few ws, it began to get
> slow. Then it began to have occasional errors signing in. Now it won't
> sign in at all. Bizarre.
Since it goes slower and slower, it sounds like a networking problem.
What is the contents of the DSN?
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns9799687B2B9DYazorman@.127.0.0.1...
> Paul Pedersen (nospam@.no.spam) writes:
> Since it goes slower and slower, it sounds like a networking problem.
I don't see what that might be. 1, It's not currently running on a network.
It's all local. 2, It works fine for Adminstrators, or even the account in
question if I promote it to Administrator (which I have done, just to get it
running - it's mission critical - but of course I don't want to leave it
that way). 3, Not everything was getting slow, just first getting access to
the data. Queries ran well enough.

> What is the contents of the DSN?
Nothing special. Created in the ODBC Control Panel as a System DSN. Set as
SQL Server authentication (user name & password) rather than Windows login.
User name and password are not saved (they are provided by the app). Default
database setting is ignored, because that's specified in the db for the app
user. Basically it has nothing but a name, which the app looks for, a
specification of the SQL Server driver, and the instance name of MSDE (I use
a named instance).
At present, there is no other access to that MSDE instance, which is the
only SQL Server instance on the machine.
It works fine, for Administrators. And it used to work for Limited Users,
too.|||Hey Paul,
It could be something obvious, like you set up a User DSN instead of a
System DSN; in that case, only the original user and/or the
Administrator group would have access to that DSN entry. Or, it could
be that the accounts don't have access to the Windows registry entry
required to load the System DSN information.
Take a look at :http://support.microsoft.com/kb/306345/EN-US
and see if it helps.
Stu|||Paul Pedersen (nospam@.no.spam) writes:
> "Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
> news:Xns9799687B2B9DYazorman@.127.0.0.1...
> I don't see what that might be. 1, It's not currently running on a
> network. It's all local. 2, It works fine for Adminstrators, or even the
> account in question if I promote it to Administrator (which I have done,
> just to get it running - it's mission critical - but of course I don't
> want to leave it that way). 3, Not everything was getting slow, just
> first getting access to the data. Queries ran well enough.
I've seen issues like this on a local machine. It that case I was logged
as admin, the problem is that shared memory freaked out.
I guess that this machine is in a domain, and not a solitary workstation?
Then there may be contacts with the domain controller. (Windows networking
is nothing I know well, so exactly what problems that may be, I don't know.)

> Nothing special. Created in the ODBC Control Panel as a System DSN. Set
> as SQL Server authentication (user name & password) rather than Windows
> login. User name and password are not saved (they are provided by the
> app). Default database setting is ignored, because that's specified in
> the db for the app user. Basically it has nothing but a name, which the
> app looks for, a specification of the SQL Server driver, and the
> instance name of MSDE (I use a named instance).
I had hoper that you have posted it as is.
What I wanted to know is whether you specify any network library.
In any case, verify in the Client Network Utiility that shared memory
is enabled. Although I mentioned that I've had problems with shared
memory, shared memory is what works best on a local computer.
Oh, since this is an MSDE machine, the Client Network Utility is probably
not available from the start menu, but running "CLICONFG" from command-
line should bring you to the version that comes with the MDAC.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Stu" <stuart.ainsworth@.gmail.com> wrote in message
news:1143942800.875293.89510@.j33g2000cwa.googlegroups.com...
> Hey Paul,
> It could be something obvious, like you set up a User DSN instead of a
> System DSN; in that case, only the original user and/or the
> Administrator group would have access to that DSN entry.
No, it was a system DSN. But thanks for trying.

> Or, it could
> be that the accounts don't have access to the Windows registry entry
> required to load the System DSN information.

> Take a look at :http://support.microsoft.com/kb/306345/EN-US
Hmm, that sounds interesting. I don't understand how that could have
happened, because it used to work.
I'll take a look at it.|||"Erland Sommarskog" <esquel@.sommarskog.se> wrote in message
news:Xns97998597D1CA0Yazorman@.127.0.0.1...
> Paul Pedersen (nospam@.no.spam) writes:
> I've seen issues like this on a local machine. It that case I was logged
> as admin, the problem is that shared memory freaked out.
> I guess that this machine is in a domain, and not a solitary workstation?
> Then there may be contacts with the domain controller. (Windows networking
> is nothing I know well, so exactly what problems that may be, I don't
> know.)
It was in a domain, but the server's motherboard died, so I moved the
database from MSDE on the server to the local machine, and set up MSDE on
it, and have been running it all locally. That machine no longer has any
network connection; it's completely standalone now. Like I said, it's been
working fine for a while.
I should have a new server up within a couple ws (it's a volunteer job,
so it gets lower priority), this time with actual SQL Server instead of
MSDE, so maybe I can get it working again since I'll have the Enterprise
Manager to play with.

>
> I had hoper that you have posted it as is.
How would I do that? As far as I know, the ODBC control panel has control
over that. I don't even know where the control panel stores its DSNs - I
just assumed in the registry somewhere. It's a system DSN, not a file DSN.

> What I wanted to know is whether you specify any network library.
There's nothing unusual in the way I set it up. I just chose SQL Server
driver, gave it the expected name, typed in the instance name of the server
(for some reason, it doesn't show up in the list), set it for SQL Server
authentication, and left everything else at the default.

> In any case, verify in the Client Network Utiility that shared memory
> is enabled. Although I mentioned that I've had problems with shared
> memory, shared memory is what works best on a local computer.
> Oh, since this is an MSDE machine, the Client Network Utility is probably
> not available from the start menu, but running "CLICONFG" from command-
> line should bring you to the version that comes with the MDAC.
Thanks. I would never have found it without that tip.
OK, I'll check that.
Thanks for all your help.sql

Tuesday, March 27, 2012

Dropping Data Connect String

I've created a data source connection using the sa login and password with
the save password option. Running the stored procedure returns a good result
set. Ok, I'm feeling pretty good at this point . But after clicking on the
Preview tab, I receive the following message: "A connection cannot be made
to the database. Set and test the connection string. Login failed for
DIM\tj."
Of course testing the connection works fine, but why is trying to
authenticate using my credentials when it should be use the connect string?
I'm running RS SP1 against a SQL 2000 db.
--
Any and all contributions are greatly appreciated ...
Regards TJIt couldn't be something inside the stored procedure, could it? Can you do a
straight select?
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"TJ" <nospam@.nowhere.com> wrote in message
news:Oi3Y$gzpEHA.556@.tk2msftngp13.phx.gbl...
> I've created a data source connection using the sa login and password with
> the save password option. Running the stored procedure returns a good
> result
> set. Ok, I'm feeling pretty good at this point . But after clicking on the
> Preview tab, I receive the following message: "A connection cannot be made
> to the database. Set and test the connection string. Login failed for
> DIM\tj."
> Of course testing the connection works fine, but why is trying to
> authenticate using my credentials when it should be use the connect
> string?
> I'm running RS SP1 against a SQL 2000 db.
> --
> Any and all contributions are greatly appreciated ...
> Regards TJ
>|||If it is, I'm not seeing any errors when I execute the stored procedure on
the Data Tab. Is there an error log for the Data Tab?
"Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
news:ek08dp7pEHA.592@.TK2MSFTNGP11.phx.gbl...
> It couldn't be something inside the stored procedure, could it? Can you do
a
> straight select?
> --
> Brian Welcker
> Group Program Manager
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no
rights.
> "TJ" <nospam@.nowhere.com> wrote in message
> news:Oi3Y$gzpEHA.556@.tk2msftngp13.phx.gbl...
> > I've created a data source connection using the sa login and password
with
> > the save password option. Running the stored procedure returns a good
> > result
> > set. Ok, I'm feeling pretty good at this point . But after clicking on
the
> > Preview tab, I receive the following message: "A connection cannot be
made
> > to the database. Set and test the connection string. Login failed for
> > DIM\tj."
> >
> > Of course testing the connection works fine, but why is trying to
> > authenticate using my credentials when it should be use the connect
> > string?
> >
> > I'm running RS SP1 against a SQL 2000 db.
> > --
> > Any and all contributions are greatly appreciated ...
> > Regards TJ
> >
> >
>|||I am running into the exact same issue... Any resolution to this yet?
"TJ" wrote:
> If it is, I'm not seeing any errors when I execute the stored procedure on
> the Data Tab. Is there an error log for the Data Tab?
> "Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
> news:ek08dp7pEHA.592@.TK2MSFTNGP11.phx.gbl...
> > It couldn't be something inside the stored procedure, could it? Can you do
> a
> > straight select?
> >
> > --
> > Brian Welcker
> > Group Program Manager
> > SQL Server Reporting Services
> >
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> > "TJ" <nospam@.nowhere.com> wrote in message
> > news:Oi3Y$gzpEHA.556@.tk2msftngp13.phx.gbl...
> > > I've created a data source connection using the sa login and password
> with
> > > the save password option. Running the stored procedure returns a good
> > > result
> > > set. Ok, I'm feeling pretty good at this point . But after clicking on
> the
> > > Preview tab, I receive the following message: "A connection cannot be
> made
> > > to the database. Set and test the connection string. Login failed for
> > > DIM\tj."
> > >
> > > Of course testing the connection works fine, but why is trying to
> > > authenticate using my credentials when it should be use the connect
> > > string?
> > >
> > > I'm running RS SP1 against a SQL 2000 db.
> > > --
> > > Any and all contributions are greatly appreciated ...
> > > Regards TJ
> > >
> > >
> >
> >
>
>|||Here are a couple of things you might try:
a) I was calling a stored procedure from within a stored procedure using the
exec command; The report data connection account didn't have permissions for
the stored procedure inside the main stored procedure. I found the
permissions issue by running the main stored procedure in Query Analyzer,
but you need to open your Query Analyzer connection using the same data
connection information being used in your report.
b) You can hard code the User Id and password setting in the Connection
String on the Data Source Tab for the report.
Good Luck
TJ
"StanDaMon" <StanDaMon@.discussions.microsoft.com> wrote in message
news:102E7428-08C9-467E-8DC6-B69A4E8D094E@.microsoft.com...
> I am running into the exact same issue... Any resolution to this yet?
> "TJ" wrote:
> > If it is, I'm not seeing any errors when I execute the stored procedure
on
> > the Data Tab. Is there an error log for the Data Tab?
> >
> > "Brian Welcker [MSFT]" <bwelcker@.online.microsoft.com> wrote in message
> > news:ek08dp7pEHA.592@.TK2MSFTNGP11.phx.gbl...
> > > It couldn't be something inside the stored procedure, could it? Can
you do
> > a
> > > straight select?
> > >
> > > --
> > > Brian Welcker
> > > Group Program Manager
> > > SQL Server Reporting Services
> > >
> > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > >
> > > "TJ" <nospam@.nowhere.com> wrote in message
> > > news:Oi3Y$gzpEHA.556@.tk2msftngp13.phx.gbl...
> > > > I've created a data source connection using the sa login and
password
> > with
> > > > the save password option. Running the stored procedure returns a
good
> > > > result
> > > > set. Ok, I'm feeling pretty good at this point . But after clicking
on
> > the
> > > > Preview tab, I receive the following message: "A connection cannot
be
> > made
> > > > to the database. Set and test the connection string. Login failed
for
> > > > DIM\tj."
> > > >
> > > > Of course testing the connection works fine, but why is trying to
> > > > authenticate using my credentials when it should be use the connect
> > > > string?
> > > >
> > > > I'm running RS SP1 against a SQL 2000 db.
> > > > --
> > > > Any and all contributions are greatly appreciated ...
> > > > Regards TJ
> > > >
> > > >
> > >
> > >
> >
> >
> >

Sunday, February 19, 2012

DRILLTHROUGH MDX statement or SQL statement

Hi

Ours is homogeneous OLAP with source data coming from SQL Server.The staging server pulls data from Production server and serves the purpose of source for the Analysis server.

We are using web based client to display data returned after executing queries these queries can be of both types SQL as well as MDX.We can use DRILLTHROUGH MDX statement to get row level information but the same can also achieved by writing SQL statements that can be executed against the Staging database to get the desired records [rows].

I think 2nd option would be better in the case where we need the row level details in reports. The main reason for my assumption is, since the row level data doesn’t contain any aggregation; MDX or analysis server is useful if we require aggregation. So I believe the 2nd [executing SQL query] option would be better/faster in the case where we need the row level details in reports.

Please tell me what you think about the same. Which option is better; MDX with DRILLTHROUGH or SQL queries for row level detail reports?

I hope; I am clear with what I mean to say :)

Thanks in advance for any feedback.

Regards;

Rakesh

Hi Rakesh,

Assuming that you're using AS 2005, this Aug. 2005 OLAP Newsgroup thread also discusses drillthrough vs. straight SQL, amongst other issues:

http://groups.google.co.uk/group/microsoft.public.sqlserver.olap/browse_frm/thread/b67c7fc032e313a3?hl=en&

>>

From: Mosha Pasumansky [MS] - view profile
Date: Wed, Aug 24 2005 7:46 pm
Email: "Mosha Pasumansky [MS]" <mos...@.online.microsoft.com>
Groups: microsoft.public.sqlserver.olap

> What I'm still seeking for is how to manage
> query performance and overhead with this increased flexibility, so that
> the solution works well.

As long as you don't query these fact (aka degenerate dimensions), there
will be no impact on performance. You can even make them hidden, so users
don't drag-and-drop them accidently, but you can still refer to them inside
your report or drillthrough actions.

> It seems that now, the only way for doing so is to write an application
> who
> SQL queries the relational database having the cell coordinates. Do you
> agree?

This may turn out to be pretty complex application, because it will have to
support all the flexibility and power of DSVs in addition to having to deal
with multiple partitions etc. So creating fact dimensions, is indeed the
correct approach.

--
==============================­====================
Mosha Pasumansky - http://www.mosha.com/msolap
Analysis Services blog at http://www.sqljunkies.com/WebL­og/mosha
Development Lead in the Analysis Server team
>>