Friday, March 23, 2012
Login failed for user <null>
I have RS (client and server components) installed on a test machine
(Win2k), with the SQL-Server database on a remote machine. I'm able to create
reports, preview them with data, and deploy them with no issues. However,
when I try to execute any of them from the Report Manager, I get: "Login
failed for user '(null)'. Reason: Not associated with a trusted SQL Server
connection".
The connection object is set up in the Report Manager as a shared data
source, with the credentials stored in the report server, the credentials I'm
using have access to the database, and I have the "Use as windows credentials
when connecting to the datasource" check box checked (the database uses
Windows authentication).
Between all of the logins/security settings in use by IIS, the Windows
Services, the database, aspnet, etc. I'm at a loss as to where the issue
might lie. Any thoughts?
Thanks in advance!
BrianI had similar problems as recently as last week.
Are the SQL Server box and the RS box in the same domain ?
My setup is similar to yours but on Win2003 on both sides. and problem
was due to i dint have them in the same domain.
So i created an SQL Account with admin credentials and then
Checked the "use windows and SQL Auth" in the SQL server and configured
RS to use SQL credentials.
this is NOT the most secure solution, but i am able to move forward.
Hope this helps
Bofo|||Yes, both computers are on the same domain. The strange thing is, when I
change the data source properties (from within Report Manager) to 'Windows NT
Integrated Authority' everything runs fine...unfortunately it doesn't seem
that you can create subscriptions to reports unless you're saving the
credentials.
Doesn't seem like it should be this difficult :)
"Win2003InstallIssues" wrote:
> I had similar problems as recently as last week.
> Are the SQL Server box and the RS box in the same domain ?
> My setup is similar to yours but on Win2003 on both sides. and problem
> was due to i dint have them in the same domain.
> So i created an SQL Account with admin credentials and then
> Checked the "use windows and SQL Auth" in the SQL server and configured
> RS to use SQL credentials.
> this is NOT the most secure solution, but i am able to move forward.
> Hope this helps
> Bofo
>|||I think you found it out by trial and error, though just FYI, stored
credentials are required if you want to support subscriptions.
--
Adrian M.
MCP
"bmcelhany" <bmcelhany@.discussions.microsoft.com> wrote in message
news:E2B8822B-8437-4E7C-878A-0D0A8A011EFD@.microsoft.com...
> Yes, both computers are on the same domain. The strange thing is, when I
> change the data source properties (from within Report Manager) to 'Windows
> NT
> Integrated Authority' everything runs fine...unfortunately it doesn't seem
> that you can create subscriptions to reports unless you're saving the
> credentials.
> Doesn't seem like it should be this difficult :)
> "Win2003InstallIssues" wrote:
>> I had similar problems as recently as last week.
>> Are the SQL Server box and the RS box in the same domain ?
>> My setup is similar to yours but on Win2003 on both sides. and problem
>> was due to i dint have them in the same domain.
>> So i created an SQL Account with admin credentials and then
>> Checked the "use windows and SQL Auth" in the SQL server and configured
>> RS to use SQL credentials.
>> this is NOT the most secure solution, but i am able to move forward.
>> Hope this helps
>> Bofo
>>|||If you are connecting to Report Manager using Win Auth, and the data source
connects to the remote DB using Win Auth, you may need to enable Kerberos.
Depending on how your domain is configured, Windows credentials can be
passed across one computer connection before they expire. A user connection
to a report server counts as the first connection. If the user opens a
report that retrieves data from a remote server, that login counts as a
second connection and will fail if you are using Windows Authentication and
Kerberos is not enabled.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rswork/htm/rms_datasources_v1_87e9.asp
--
Adrian M.
MCP
"bmcelhany" <bmcelhany@.discussions.microsoft.com> wrote in message
news:717CD26C-F4E2-426B-80E7-4E2CB99CA11E@.microsoft.com...
> Hello,
> I have RS (client and server components) installed on a test machine
> (Win2k), with the SQL-Server database on a remote machine. I'm able to
> create
> reports, preview them with data, and deploy them with no issues. However,
> when I try to execute any of them from the Report Manager, I get: "Login
> failed for user '(null)'. Reason: Not associated with a trusted SQL Server
> connection".
> The connection object is set up in the Report Manager as a shared data
> source, with the credentials stored in the report server, the credentials
> I'm
> using have access to the database, and I have the "Use as windows
> credentials
> when connecting to the datasource" check box checked (the database uses
> Windows authentication).
> Between all of the logins/security settings in use by IIS, the Windows
> Services, the database, aspnet, etc. I'm at a loss as to where the issue
> might lie. Any thoughts?
> Thanks in advance!
> Brian|||Right, I definitely need to support schedules/subscriptions, so stored
credentials are my only option...unfortunately I can only get the reports to
work using Windows NT Integrated Security. Here are the various data source
settings I've tried:
Assumptions: all RS components are installed on one machine (no SQL Server)
with the database on another machine within the same domain. The SQL Server
uses Windows authentication. Both the 'Reports' and the 'ReportServer'
virtual directories are using anonymous authentication.
1) Windows NT Integrated Security: the reports run perfectly, however I am
unable to schedule any of them.
2) Credentials stored in the report server: I get a "login failed for user
'bmcelhany'. Reason: not associated with a trusted SQL Server connection"
error.
3) Credentials stored in the report server with the "Use as Windows
credentials when connecting to the data source" check box checked: I get a
"login failed for user 'null'. Reason: not associated with a trusted SQL
Server conenction" error.
Any thoughts?
"Adrian M." wrote:
> I think you found it out by trial and error, though just FYI, stored
> credentials are required if you want to support subscriptions.
> --
> Adrian M.
> MCP
> "bmcelhany" <bmcelhany@.discussions.microsoft.com> wrote in message
> news:E2B8822B-8437-4E7C-878A-0D0A8A011EFD@.microsoft.com...
> > Yes, both computers are on the same domain. The strange thing is, when I
> > change the data source properties (from within Report Manager) to 'Windows
> > NT
> > Integrated Authority' everything runs fine...unfortunately it doesn't seem
> > that you can create subscriptions to reports unless you're saving the
> > credentials.
> >
> > Doesn't seem like it should be this difficult :)
> >
> > "Win2003InstallIssues" wrote:
> >
> >> I had similar problems as recently as last week.
> >>
> >> Are the SQL Server box and the RS box in the same domain ?
> >>
> >> My setup is similar to yours but on Win2003 on both sides. and problem
> >> was due to i dint have them in the same domain.
> >>
> >> So i created an SQL Account with admin credentials and then
> >> Checked the "use windows and SQL Auth" in the SQL server and configured
> >> RS to use SQL credentials.
> >>
> >> this is NOT the most secure solution, but i am able to move forward.
> >> Hope this helps
> >> Bofo
> >>
> >>
>
>|||Have you tried the userid-pw login from the Visual Studio IDE? Also - the
obvious question - is mixed mode security enabled on SQL Server?
"bmcelhany" <bmcelhany@.discussions.microsoft.com> wrote in message
news:8D8CB6D4-8FE2-4E03-99AD-BFAFAB4B9B98@.microsoft.com...
> Right, I definitely need to support schedules/subscriptions, so stored
> credentials are my only option...unfortunately I can only get the reports
to
> work using Windows NT Integrated Security. Here are the various data
source
> settings I've tried:
> Assumptions: all RS components are installed on one machine (no SQL
Server)
> with the database on another machine within the same domain. The SQL
Server
> uses Windows authentication. Both the 'Reports' and the 'ReportServer'
> virtual directories are using anonymous authentication.
> 1) Windows NT Integrated Security: the reports run perfectly, however I am
> unable to schedule any of them.
> 2) Credentials stored in the report server: I get a "login failed for user
> 'bmcelhany'. Reason: not associated with a trusted SQL Server connection"
> error.
> 3) Credentials stored in the report server with the "Use as Windows
> credentials when connecting to the data source" check box checked: I get a
> "login failed for user 'null'. Reason: not associated with a trusted SQL
> Server conenction" error.
> Any thoughts?
> "Adrian M." wrote:
> > I think you found it out by trial and error, though just FYI, stored
> > credentials are required if you want to support subscriptions.
> >
> > --
> > Adrian M.
> > MCP
> >
> > "bmcelhany" <bmcelhany@.discussions.microsoft.com> wrote in message
> > news:E2B8822B-8437-4E7C-878A-0D0A8A011EFD@.microsoft.com...
> > > Yes, both computers are on the same domain. The strange thing is, when
I
> > > change the data source properties (from within Report Manager) to
'Windows
> > > NT
> > > Integrated Authority' everything runs fine...unfortunately it doesn't
seem
> > > that you can create subscriptions to reports unless you're saving the
> > > credentials.
> > >
> > > Doesn't seem like it should be this difficult :)
> > >
> > > "Win2003InstallIssues" wrote:
> > >
> > >> I had similar problems as recently as last week.
> > >>
> > >> Are the SQL Server box and the RS box in the same domain ?
> > >>
> > >> My setup is similar to yours but on Win2003 on both sides. and
problem
> > >> was due to i dint have them in the same domain.
> > >>
> > >> So i created an SQL Account with admin credentials and then
> > >> Checked the "use windows and SQL Auth" in the SQL server and
configured
> > >> RS to use SQL credentials.
> > >>
> > >> this is NOT the most secure solution, but i am able to move forward.
> > >> Hope this helps
> > >> Bofo
> > >>
> > >>
> >
> >
> >
Friday, March 9, 2012
Logim mode
I connect to SQL-server from my application with 'sa' account.
It works when SQL-server is configured 'Windows Authentication'
and doesn't work for ' Mixed Mode Authentication'.
How it can be?Mixed authentication means that you can connect with windows user accounts and with sql server logins, Windows authentication only allows windows user accounts. The user 'sa' is a sql server builtin login, which means that you can't connect to a sql server configured with windows authentication.
Futhermore, the 'sa' user is standard configured as the administration account for maintaining the databases. Using this account from within an application is not a good choice (to say the least). If you want to use a sql server login for your application, it's best you create a new login and only grant the privileges needed for your application.|||Thanks Jora,
I created another sql server login.
The question is :
Why does this sql server login work from my application with
"Windows Authentication' SQL-server configuration and doesn't
work with Mixed Mode Authentication?
It have to be vice versa, no?|||Yes it should be vice versa. How did you create your sql server login? And how do you connect in your application to the database?|||Enterprise manager ->Security->Logins-> new login (with checkbox -SQL server authentication)
I connect to Sql server from Delphi application (BDE or ADO - both work
properly.
We also checked in registry for 'Logintype' value - it's OK.|||And within delphi? With a connection string or a udl file? How is this configured? We use Delphi and ADO with an udl file. In this udl file you specify the user that is connecting. The user specified has to be the sql server user and not set it to Windows authentication.|||I have two Delphi applications.
One is in Delphi7 (ADO connection) and you are true.
I used the connection string with 'NT integrated security' . Thank you.
But !
My another old Delphi4 application uses BDE alias for connection with
SQL server user name and password and it works !|||How have you created your bde connection? With an odbc dsn or directly in bde?|||Directly in BDE, SQL native driver. See an attached file.|||We only use mixed mode databases. When I create an alias of type 'mssql' i cannot login with a windows account but I can login with sql server login. When I use the type 'sql server' (through odbc) i can login with both windows as sql server login. That's all i can make of it. Hope it helps.
Monday, February 20, 2012
Logging SQL Queries
Hi,
I′m currently playing around with ASP.NET.
Is there a way to log all Queries that are send to the SQL-Server? Something like the query.log of a Mysql.
You can write your own logging system (I have done that when working with dynamic TSQL), however you can just run a SQL Trace from within SQL Server.
Thanks for your reply.
An own logging system won′t help if I use, for example, a sql datasource for a gridview. It would bypass the logging class.
I′ve searched the onlinehelp and it seems, that a SQL Trace is a bit overpowered for a simple querylog.
>I′ve searched the onlinehelp and it seems, that a SQL Trace is a bit overpowered for a simple querylog.
You would need to tune one of the standard selection else otherwise the volume of log data would be overwhelming.
logging of activity on database
means not only logins , but I want to know also the sql-commands which are
done. Is this already logged and captured in a database (in msdb for
example).
A second question: can i also see the CPU-activity of the computer where the
sql-server is put on. I have full connection to the sql-server, but i do not
have administration permission to that computer.
Thank you.
Johan
Use SQL Server Profiler for this purpose
http://www.sql-server-performance.co...filer_tips.asp
"johan Goris" <johangoris@.rewah.com> wrote in message
news:40d155cc$0$26690$a0ced6e1@.news.skynet.be...
> I want to make an investigation on the activity of the sql-server. This
> means not only logins , but I want to know also the sql-commands which are
> done. Is this already logged and captured in a database (in msdb for
> example).
> A second question: can i also see the CPU-activity of the computer where
the
> sql-server is put on. I have full connection to the sql-server, but i do
not
> have administration permission to that computer.
> Thank you.
>
|||Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
though I understand SQL 2005 would not need that. If you want to see the
CPU activity, the best you can do is SELECT @.@.CPU_BUSY. For SQL related
counters, you can use SELECT * FROM master..sysperfinfo
You could set up Performance Monitor on your server to log counters to a
table on your database, though I think it's only available on WinXP and
Win2003 (someone correct me here). Alternatively, I use a custom built tool
to collect and store local and remote performance counters from Win2000
servers to a SQL Server table.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uq3zLjEVEHA.3512@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Johan
> Use SQL Server Profiler for this purpose
> http://www.sql-server-performance.co...filer_tips.asp
>
>
>
> "johan Goris" <johangoris@.rewah.com> wrote in message
> news:40d155cc$0$26690$a0ced6e1@.news.skynet.be...
are
> the
> not
>
|||Peter Yeoh wrote:
> Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
> though I understand SQL 2005 would not need that.
i don't like that. i hope there's a way to prevent people that aren't
SAs from running profiler.
|||Perhaps I misphrased my statement regarding SQL2005. What I meant to say
was that to run Profiler in SQL2005, you still need to assign rights, but
not the sysadmin rights. It's actually an improvement then.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Try MiniSQLBackup
"ch" <ch@.dontemailme.com> wrote in message
news:40D19EF9.5B69D37E@.dontemailme.com...
> Peter Yeoh wrote:
> i don't like that. i hope there's a way to prevent people that aren't
> SAs from running profiler.
logging of activity on database
means not only logins , but I want to know also the sql-commands which are
done. Is this already logged and captured in a database (in msdb for
example).
A second question: can i also see the CPU-activity of the computer where the
sql-server is put on. I have full connection to the sql-server, but i do not
have administration permission to that computer.
Thank you.Johan
Use SQL Server Profiler for this purpose
http://www.sql-server-performance.c...ofiler_tips.asp
"johan Goris" <johangoris@.rewah.com> wrote in message
news:40d155cc$0$26690$a0ced6e1@.news.skynet.be...
> I want to make an investigation on the activity of the sql-server. This
> means not only logins , but I want to know also the sql-commands which are
> done. Is this already logged and captured in a database (in msdb for
> example).
> A second question: can i also see the CPU-activity of the computer where
the
> sql-server is put on. I have full connection to the sql-server, but i do
not
> have administration permission to that computer.
> Thank you.
>|||Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
though I understand SQL 2005 would not need that. If you want to see the
CPU activity, the best you can do is SELECT @.@.CPU_BUSY. For SQL related
counters, you can use SELECT * FROM master..sysperfinfo
You could set up Performance Monitor on your server to log counters to a
table on your database, though I think it's only available on WinXP and
Win2003 (someone correct me here). Alternatively, I use a custom built tool
to collect and store local and remote performance counters from Win2000
servers to a SQL Server table.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uq3zLjEVEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Johan
> Use SQL Server Profiler for this purpose
> http://www.sql-server-performance.c...ofiler_tips.asp
>
>
>
> "johan Goris" <johangoris@.rewah.com> wrote in message
> news:40d155cc$0$26690$a0ced6e1@.news.skynet.be...
are[vbcol=seagreen]
> the
> not
>|||Peter Yeoh wrote:
> Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
> though I understand SQL 2005 would not need that.
i don't like that. i hope there's a way to prevent people that aren't
SAs from running profiler.|||Perhaps I misphrased my statement regarding SQL2005. What I meant to say
was that to run Profiler in SQL2005, you still need to assign rights, but
not the sysadmin rights. It's actually an improvement then.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Try MiniSQLBackup
"ch" <ch@.dontemailme.com> wrote in message
news:40D19EF9.5B69D37E@.dontemailme.com...
> Peter Yeoh wrote:
> i don't like that. i hope there's a way to prevent people that aren't
> SAs from running profiler.
logging of activity on database
means not only logins , but I want to know also the sql-commands which are
done. Is this already logged and captured in a database (in msdb for
example).
A second question: can i also see the CPU-activity of the computer where the
sql-server is put on. I have full connection to the sql-server, but i do not
have administration permission to that computer.
Thank you.Johan
Use SQL Server Profiler for this purpose
http://www.sql-server-performance.com/sql_server_profiler_tips.asp
"johan Goris" <johangoris@.rewah.com> wrote in message
news:40d155cc$0$26690$a0ced6e1@.news.skynet.be...
> I want to make an investigation on the activity of the sql-server. This
> means not only logins , but I want to know also the sql-commands which are
> done. Is this already logged and captured in a database (in msdb for
> example).
> A second question: can i also see the CPU-activity of the computer where
the
> sql-server is put on. I have full connection to the sql-server, but i do
not
> have administration permission to that computer.
> Thank you.
>|||Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
though I understand SQL 2005 would not need that. If you want to see the
CPU activity, the best you can do is SELECT @.@.CPU_BUSY. For SQL related
counters, you can use SELECT * FROM master..sysperfinfo
You could set up Performance Monitor on your server to log counters to a
table on your database, though I think it's only available on WinXP and
Win2003 (someone correct me here). Alternatively, I use a custom built tool
to collect and store local and remote performance counters from Win2000
servers to a SQL Server table.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Try MiniSQLBackup
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uq3zLjEVEHA.3512@.TK2MSFTNGP12.phx.gbl...
> Johan
> Use SQL Server Profiler for this purpose
> http://www.sql-server-performance.com/sql_server_profiler_tips.asp
>
>
>
> "johan Goris" <johangoris@.rewah.com> wrote in message
> news:40d155cc$0$26690$a0ced6e1@.news.skynet.be...
> > I want to make an investigation on the activity of the sql-server. This
> > means not only logins , but I want to know also the sql-commands which
are
> > done. Is this already logged and captured in a database (in msdb for
> > example).
> > A second question: can i also see the CPU-activity of the computer where
> the
> > sql-server is put on. I have full connection to the sql-server, but i do
> not
> > have administration permission to that computer.
> >
> > Thank you.
> >
> >
>|||Peter Yeoh wrote:
> Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
> though I understand SQL 2005 would not need that.
i don't like that. i hope there's a way to prevent people that aren't
SAs from running profiler.|||Perhaps I misphrased my statement regarding SQL2005. What I meant to say
was that to run Profiler in SQL2005, you still need to assign rights, but
not the sysadmin rights. It's actually an improvement then.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backups? Try MiniSQLBackup
"ch" <ch@.dontemailme.com> wrote in message
news:40D19EF9.5B69D37E@.dontemailme.com...
> Peter Yeoh wrote:
> >
> > Unfortunately for SQL 2000, you need the sysadmin role to run Profiler,
> > though I understand SQL 2005 would not need that.
> i don't like that. i hope there's a way to prevent people that aren't
> SAs from running profiler.