Friday, March 16, 2012
"The request failed with HTTP status 401: Unauthorized."
I'm having a few problems with getting SQL RS running and wondered
whether anyone could give me some help.
I have just installed RS and have never got into the Report Manager
yet. I think it is basically an IIS permissions problem as I am
getting a page that says "The request failed with HTTP status 401:
Unauthorized." whenever I try to get to
http://reporting.[domain].com/Reports, even if I add myself to the
domain Administrators group. I have all of the IIS settings as they
are specified in documentation.
My setup: Reporting Services SP2, IIS6, Windows 2003 Server, SQL Server
2000, installed on a non-default website following instructions on
SQLJunkies.com by Trent Miesner(although I'm pretty sure this isn't the
problem).
Thanks in advance,
SamJust check if this helps
http://support.microsoft.com/kb/896861/en-us
Sam wrote:
>Hi,
>I'm having a few problems with getting SQL RS running and wondered
>whether anyone could give me some help.
>I have just installed RS and have never got into the Report Manager
>yet. I think it is basically an IIS permissions problem as I am
>getting a page that says "The request failed with HTTP status 401:
>Unauthorized." whenever I try to get to
>http://reporting.[domain].com/Reports, even if I add myself to the
>domain Administrators group. I have all of the IIS settings as they
>are specified in documentation.
>My setup: Reporting Services SP2, IIS6, Windows 2003 Server, SQL Server
>2000, installed on a non-default website following instructions on
>SQLJunkies.com by Trent Miesner(although I'm pretty sure this isn't the
>problem).
>Thanks in advance,
>Sam
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200602/1|||As a few others have mentioned, the article(method 1) did fix my problem. I
had everything working but started getting this error when I required SSL in
the RS configuration/report server virtual directory configuration.
http://support.microsoft.com/kb/896861 I rebooted after doing it.
I'm using SQL2005 SP1 on Win2k3 SP1.
--Forrest
"BALAJI K via SQLMonster.com" wrote:
> Just check if this helps
> http://support.microsoft.com/kb/896861/en-us
>
>
> Sam wrote:
> >Hi,
> >
> >I'm having a few problems with getting SQL RS running and wondered
> >whether anyone could give me some help.
> >
> >I have just installed RS and have never got into the Report Manager
> >yet. I think it is basically an IIS permissions problem as I am
> >getting a page that says "The request failed with HTTP status 401:
> >Unauthorized." whenever I try to get to
> >http://reporting.[domain].com/Reports, even if I add myself to the
> >domain Administrators group. I have all of the IIS settings as they
> >are specified in documentation.
> >
> >My setup: Reporting Services SP2, IIS6, Windows 2003 Server, SQL Server
> >2000, installed on a non-default website following instructions on
> >SQLJunkies.com by Trent Miesner(although I'm pretty sure this isn't the
> >problem).
> >
> >Thanks in advance,
> >
> >Sam
> --
> Message posted via SQLMonster.com
> http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200602/1
>
Sunday, March 11, 2012
"SQL Server Registation failed
Am getting the following msg when trying to do sql server
registration :
"SQL Server Registation failed ....
SQL Server does not exist or access denied
ConnectionOpen(Connect())"
After reading through the related discussions posted to this
workgroup. I'm able to create an alias and added in the sql
server registration to the sql server successfully.
Now the problem is that for that SQL server, it's becoming
very slow when i try to browse through the items in the
enterprise manager until it's stop responding.
It's even faster to access that sql
server through another server(with sql installed also) which
i added in the server registration and access it remotely.
Any idea what's wrong with that server? Thks!
"SQL Server Registation failed ....
SQL Server does not exist or access denied
ConnectionOpen(Connect())"
If I understand your question correctly, you are saying that when you open
SQL Enterprise Manager on one Client1 and connect to Server1, it browses
extremely slowly. However if you open Enterprise Manager on Client2 and
connect to Server1, everything is fine. If this is true, then this could be
an issue with your client1 machine (and not the server).
You should check -
1. What other apps are running on Client1. Is there some type of memory
pressure causing this behavior?
2. Is there a possible network problem between Client1 and Server1? If this
is the case then most likely you will see erratic behavior at other times
and with other apps connecting to SQL also.
If you still suspect that it is your server that is slow, you could run
Profiler trace on Server1 to see what happens when you open the SQL
Enterprise Manager on Client1 (as opposed to Client2)
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.
|||hi!
what i meant is that i opened the sql enterprise manager from the sql server
itself is slow. When i access it remotely by opening antoher sql enterprise
manager from another sql serverit's fine.
what;s Profiler trace? where to run this program thk~
"Pankaj Agarwal [MSFT]" wrote:
> If I understand your question correctly, you are saying that when you open
> SQL Enterprise Manager on one Client1 and connect to Server1, it browses
> extremely slowly. However if you open Enterprise Manager on Client2 and
> connect to Server1, everything is fine. If this is true, then this could be
> an issue with your client1 machine (and not the server).
> You should check -
> 1. What other apps are running on Client1. Is there some type of memory
> pressure causing this behavior?
> 2. Is there a possible network problem between Client1 and Server1? If this
> is the case then most likely you will see erratic behavior at other times
> and with other apps connecting to SQL also.
> If you still suspect that it is your server that is slow, you could run
> Profiler trace on Server1 to see what happens when you open the SQL
> Enterprise Manager on Client1 (as opposed to Client2)
> Thank you for using Microsoft newsgroups.
> Sincerely
> Pankaj Agarwal
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
"SQL Server Registation failed
Am getting the following msg when trying to do sql server
registration :
"SQL Server Registation failed ....
SQL Server does not exist or access denied
ConnectionOpen(Connect())"
After reading through the related discussions posted to this
workgroup. I'm able to create an alias and added in the sql
server registration to the sql server successfully.
Now the problem is that for that SQL server, it's becoming
very slow when i try to browse through the items in the
enterprise manager until it's stop responding.
It's even faster to access that sql
server through another server(with sql installed also) which
i added in the server registration and access it remotely.
Any idea what's wrong with that server? Thks!
"SQL Server Registation failed ....
SQL Server does not exist or access denied
ConnectionOpen(Connect())"If I understand your question correctly, you are saying that when you open
SQL Enterprise Manager on one Client1 and connect to Server1, it browses
extremely slowly. However if you open Enterprise Manager on Client2 and
connect to Server1, everything is fine. If this is true, then this could be
an issue with your client1 machine (and not the server).
You should check -
1. What other apps are running on Client1. Is there some type of memory
pressure causing this behavior?
2. Is there a possible network problem between Client1 and Server1? If this
is the case then most likely you will see erratic behavior at other times
and with other apps connecting to SQL also.
If you still suspect that it is your server that is slow, you could run
Profiler trace on Server1 to see what happens when you open the SQL
Enterprise Manager on Client1 (as opposed to Client2)
Thank you for using Microsoft newsgroups.
Sincerely
Pankaj Agarwal
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||hi!
what i meant is that i opened the sql enterprise manager from the sql server
itself is slow. When i access it remotely by opening antoher sql enterprise
manager from another sql serverit's fine.
what;s Profiler trace? where to run this program thk~
"Pankaj Agarwal [MSFT]" wrote:
> If I understand your question correctly, you are saying that when you open
> SQL Enterprise Manager on one Client1 and connect to Server1, it browses
> extremely slowly. However if you open Enterprise Manager on Client2 and
> connect to Server1, everything is fine. If this is true, then this could be
> an issue with your client1 machine (and not the server).
> You should check -
> 1. What other apps are running on Client1. Is there some type of memory
> pressure causing this behavior?
> 2. Is there a possible network problem between Client1 and Server1? If this
> is the case then most likely you will see erratic behavior at other times
> and with other apps connecting to SQL also.
> If you still suspect that it is your server that is slow, you could run
> Profiler trace on Server1 to see what happens when you open the SQL
> Enterprise Manager on Client1 (as opposed to Client2)
> Thank you for using Microsoft newsgroups.
> Sincerely
> Pankaj Agarwal
> Microsoft Corporation
> This posting is provided AS IS with no warranties, and confers no rights.
>
Tuesday, March 6, 2012
"ODBCcall failed" Error
It has been weeks now that I have been trying to fix an error that I
encounter everytime it gets to the code at runtime:
SQLStmt = "SELECT Sum([Quantity in Stock]) As TotalInStock,
Sum([Cost] * [Quantity in Stock]) AS TotalCost " & _
"FROM [Inventory Products] WHERE [Item
Number] = '" & ItemNum & "'"
Set InvP = CurDB.OpenRecordset(SQLStmt, DB_OPEN_DYNASET) '
==>it gets the error here
I tried also to implement the same code using ADODB but still go the same
error: "ODBC--call failed".
There are other events where similar code is executed without any problems
at all.
Any guidance would be helpful.
ThanksBen,
The error is not very intuitive. You might want to try a SQL Trace and an
ODBC trace to get more information. Profiler has an Errors and Warnings /
Exception event you can trace, and the following link will show you how to
set up an ODBC trace:
http://support.microsoft.com/kb/274551
-- Bill
"Ben" <pillars4@.sbcglobal.netwrote in message
news:C7zxh.71351$qO4.32683@.newssvr13.news.prodigy. net...
Quote:
Originally Posted by
Hi!
It has been weeks now that I have been trying to fix an error that I
encounter everytime it gets to the code at runtime:
>
SQLStmt = "SELECT Sum([Quantity in Stock]) As TotalInStock,
Sum([Cost] * [Quantity in Stock]) AS TotalCost " & _
"FROM [Inventory Products] WHERE [Item
Number] = '" & ItemNum & "'"
>
Set InvP = CurDB.OpenRecordset(SQLStmt, DB_OPEN_DYNASET)
' ==>it gets the error here
>
I tried also to implement the same code using ADODB but still go the same
error: "ODBC--call failed".
There are other events where similar code is executed without any problems
at all.
Any guidance would be helpful.
>
>
Thanks
>
Quote:
Originally Posted by
It has been weeks now that I have been trying to fix an error that I
encounter everytime it gets to the code at runtime:
>
SQLStmt = "SELECT Sum([Quantity in Stock]) As TotalInStock,
Sum([Cost] * [Quantity in Stock]) AS TotalCost " & _
"FROM [Inventory Products] WHERE [Item
Number] = '" & ItemNum & "'"
>
Set InvP = CurDB.OpenRecordset(SQLStmt, DB_OPEN_DYNASET) '
>==>it gets the error here
>
I tried also to implement the same code using ADODB but still go the same
error: "ODBC--call failed".
There are other events where similar code is executed without any problems
at all.
It would be interesting to see a little more of the code. How you set
up the command and so. Particularly when you do it with ADO. (Since I know
ADO better this other thing (DAO?)).
Have you extracted what is in SQLStmt an tried to run that in Query
Analyzer? Maybe there is some simple error?
Also, an advice on how you get ItemNum into the query string. Most APIs
support parameterised commands, for instance ADO does. Parameterised
is much simpler to use than interpolated strings, and it protexts you
against SQL Injection. It also uses the query cache in SQL Server better.
--
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
Saturday, February 25, 2012
"Logon failed" when attempting to connect to cube.
create a Report Model in SRS 2005 against an Analysis Services 2005 cube. I
am an admin on the AS box. I am using this tutorial:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rptsrvr9/html/8e5d2bd3-48ec-45f3-afee-6d86797c8f28.htm
I set up the data source, then I hit "generate model". I type in my model
name, hit "OK", and get the "Logon failed (rsLogonFailed)" message. I am
using "credentials supplied by the user running the report" dialog box with
the "Use as Windows..." checkbox checked. For good measure I have even added
myself to a cube Role with admin privelages. Alos, I can in fact browse and
manipulate the cube.
Any ideas?
TIA, ChrisRHi
I think the issue here is not the users priviliges in SSAS , rather
the priviliges in SSRS. Try using report manager to configure
permissions for the user in question .
Cheers
Shai
On Nov 20, 12:34 am, ChrisR <Chr...@.discussions.microsoft.com> wrote:
> Greetings. I am brand new to SRS, so please bear with me. I'm trying to
> create a Report Model in SRS 2005 against an Analysis Services 2005 cube. I
> am an admin on the AS box. I am using this tutorial:
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/rptsrvr9/html/8e5d2bd3-48ec-45f3-afee--6d86797c8f28.htm
> I set up the data source, then I hit "generate model". I type in my model
> name, hit "OK", and get the "Logon failed (rsLogonFailed)" message. I am
> using "credentials supplied by the user running the report" dialog box with
> the "Use as Windows..." checkbox checked. For good measure I have even added
> myself to a cube Role with admin privelages. Alos, I can in fact browse and
> manipulate the cube.
> Any ideas?
> TIA, ChrisR
"Login Failed" for SQL Express
Whenever I try to connect to my SQL Express Database with C# code,(.net 2.0), it says "Login failed for user 'TUser'. The user is not associated with a trusted SQL Server connection."
But I can connect with SQL Express Manager.
I've heard somewhere this is a SQL authentication problem, I didn't enable it during installation.
So is there a way to fix this? How can I enable SQL authentication without uninstalling it?
Is there anyone to help me?"Login failed for user" on external webhosting
I get the following error message when trying to access SQL server database hosted by Godaddy.com. I've enabled ASP.net 2.0 and setup SQL 2005 schema, followed their directions for the connectionstring and am using the SQL account and password I setup on Godaddy's website to access the SQL database. When I attempt to use the built in create user or login form that I created from visual studio express that works while using sql 2005 express on my localmachine, it gives the following error message:
Login failed for user 'ysatrifecta'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'ysatrifecta'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[SqlException (0x80131904): Login failed for user 'ysatrifecta'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734931
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
System.Web.Security.SqlMembershipProvider.CreateUser(String username, String password, String email, String passwordQuestion, String passwordAnswer, Boolean isApproved, Object providerUserKey, MembershipCreateStatus& status) +3612
System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +305
System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +105
System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +453
System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +149
System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +17
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
Can anyone help?
I had misspelled the hostname in the connectionstring...doh!"Login failed for user" error
I'm having trouble connecting to my database using ASP.NET
I have been getting the error below whenever i try open the connection using connection.open using vb.net
I have this error in when using plain text editor as and even using
the visual studio.nets data tools (sqlconnection,sqldataadapter tool.)
The strange thing is that i can easily preview the data in any table in northwind db using the connections i've created in the solution explorer using visual studio.net.
This is the connection string created by visual studio.net (i also tried to use this connectionstring manually in code)
"initial catalog=Northwind;integrated security=SSPI;persist security info=False;workstation id=COMPI;packet size=4096"
Here is the error (same error for plain text and vs.net):
Login failed for user 'COMPI\ASPNET'
...
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'COMPI\ASPNET'.
...
[SqlException: Login failed for user 'COMPI\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction)
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction)
System.Data.SqlClient.SqlConnection.Open()
BegCh12.WebForm1.Page_Load(Object sender, EventArgs e) in C:\BegASPNet\BegCh12\WebForm1.aspx.vb:153
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()...
can someone help pls
Im using sql server 7 sp3, windows xp pro.I may have miss read this so let me restate your problem.
You have an application thaat can view and access data in the NorthWind DB but not the DB your app is written for. If that is true then it sounds like your userid "ASPNET" needs to be granted access to the db in question as well as execute or Select/Delete/Update permissions of all needed objects.|||How do i do what ur saying, is it from SQL server or using Windows XP.
I have just installed sql server and havent done any changes to permission or account (not sure how)?|||Use Enterprise Manager
Open your server, expand Security and then click on Users. right click on your UserID and select properties. Under the Database Access tab click on the Permit check box next to your database. Under the Permit in Database Role, you will want to select public, and probably db_datareader/datawrite OR you can open things up a bit and select db_owner, but I wouldn't use it for very long.
Books Online covers this very well.
"Login failed for user" error
I have installed sql server on my standalone PC.
I used "window and sql mix authentication" for the sql server in the enterprise manager set up.
when I try to use the sql server login name for the startup service account, I have this error. "No Mapping between names and security IDs ".
So Even though I use mix authentication, I am still using window login name.
Then I create the DSN file.
But when I run the ASP program, I have this error "login fail for user-("user name that I used for dsn file configuration").
I try to configure the dsn file set up with both authentications, windows and sql login names.
But I got the error again.
I am really lost here.
Please help me. thanks...What's your connection string?|||when I try to use the sql server login name for the startup service account, I have this error. "No Mapping between names and security IDs ".
You cannot use a sql server login for the service accounts, these need to be windows accounts (domain or local user, or system account). The mixed authentication only applies to logins to the server.
"Login failed for user MyPC/ASPNET"
Hi
I created my DB in SQL 2005 Express in VS IDE. I have my app in IIS. When I try to use the DB (e.g. try to login a user in the app) it gives me the following error:
Cannot open database "cvRepository" requested by the login. The login failed.
Login failed for user 'MyPC\ASPNET'.
My guess was that I had to give permissions to ASPNET user so I did in SQL Server Management. Still not working! Checked my Connection string and I think it's fine...
connectionString="Data Source=.\SQLEXPRESS;Database=cvRepository;Integrated Security=True;User Instance=True"Still not working!
Can anyone explain me what's wrong and to solve this?!
Try replacing Database=cvRepository withAttachDBFileName=|DataDirectory|cvRepository.mdfin your connectionString.
Hope this helps.
Mike
|||Do you have a database namedcvRepositoryon your SQL server? Or you're using a database file attached at runtime? Anyways you have to ensure the ASPNET account has login permission to the SQL server, as well as access permissions on the required database.|||Hi
Tried using the AttachDBFileName but nothing:
<
addname="cvRepositoryConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDBFileName=|DataDirectory|cvrepository.mdf;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient" />I don't understand much of this but I'll shoot out something... When running the app in debug mode (http://localhost:2431/cvRepository/Default.aspx) it creates an instance of the SQL Server but when not doing so (http://localhost/cvRepository/Default.aspx) it doesn't, that's why I can't access the DB. Is this correct? If so, how to solve it?Any explanation/article would be helpful!
Thx
|||Try to add the ASPNET login to a member ofsysadminordbcreatorserver role.|||Hi
Instead of using User Instances I defined a particular user to access the DB. Used this:
connectionString
="Server=.\SQLEXPRESS;Database=cvrepository;User ID=user1;Password=user1pass"Thx for your help
Cheers
Friday, February 24, 2012
"Load report failed"
Any ideas why?Just an idea, but have you downloaded all of the hotfixes, and SP's for the version you are using.
GJ|||what is the os that you are using and what is the version of crystal reports?|||i just downloaded the hotfix and it still happens...
i'm using cr 9.0 build-in visual studio 2003
and have an xp pro.
Sunday, February 19, 2012
"HTTP status 400: Bad Request" - Reporting Services 2005
"The request failed with HTTP status 400: Bad Request."
I can deploy and access reports directly, but I receive the above error when
hitting the http://localhost/Reports URL (i.e. ReportManager)
Also, I'm seeing DCOM errors in the NT event log whenever this happens. A
search in the registry find CLSID references to network components (Network
Connection Manager Class, Network Connection Manager Connection Enumerator
Class, LAN Connection Manager Class, etc). Any ideas? Is there a security
configuration that I'm missing?
Here's an example entry:
Event Type: Error
Event Source: DCOM
Event Category: None
Event ID: 10016
Date: 11/8/2005
Time: 8:23:48 AM
User: NT AUTHORITY\NETWORK SERVICE
Computer: *SERVERNAME*
Description:
The application-specific permission settings do not grant Local Activation
permission for the COM Server application with CLSID
{BA126AD1-2166-11D1-B1D0-00805FC1270E}
to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security
permission can be modified using the Component Services administrative tool.
For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.I have the same problem and it turns out that you need to change the IP
address of your default website to "(all Unassigned)", instead of
specifiying a specific IP address.
thuan wrote:
> Has anyone ran into this error yet while testing Report Manager?
> "The request failed with HTTP status 400: Bad Request."
> I can deploy and access reports directly, but I receive the above error when
> hitting the http://localhost/Reports URL (i.e. ReportManager)
> Also, I'm seeing DCOM errors in the NT event log whenever this happens. A
> search in the registry find CLSID references to network components (Network
> Connection Manager Class, Network Connection Manager Connection Enumerator
> Class, LAN Connection Manager Class, etc). Any ideas? Is there a security
> configuration that I'm missing?
> Here's an example entry:
> Event Type: Error
> Event Source: DCOM
> Event Category: None
> Event ID: 10016
> Date: 11/8/2005
> Time: 8:23:48 AM
> User: NT AUTHORITY\NETWORK SERVICE
> Computer: *SERVERNAME*
> Description:
> The application-specific permission settings do not grant Local Activation
> permission for the COM Server application with CLSID
> {BA126AD1-2166-11D1-B1D0-00805FC1270E}
> to the user NT AUTHORITY\NETWORK SERVICE SID (S-1-5-20). This security
> permission can be modified using the Component Services administrative tool.
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
Thursday, February 16, 2012
"Failed to open a rowset"
Dim cr As New crptCMR
Dim crtableLogoninfos As New TableLogOnInfos
Dim crtableLogoninfo As New TableLogOnInfo
Dim crConnectionInfo As New ConnectionInfo
Dim CrTables As Tables
Dim CrTable As Table
Dim TableCounter
Dim crReportDocument As New crptCMR
With crConnectionInfo
.ServerName = sname
.DatabaseName = dbname
.UserID = uid
.Password = pwd
End With
CrTables = crReportDocument.Database.Tables
For Each CrTable In CrTables
crtableLogoninfo = CrTable.LogOnInfo
crtableLogoninfo.ConnectionInfo = crConnectionInfo
CrTable.ApplyLogOnInfo(crtableLogoninfo)
Next
CRVcmr.ReportSource = crReportDocumentOpen the report and do verify database
"Failed to obtain TransactionDispenserInterface"
Failed to obtain TransactionDispenserInterface: Result
Code = 0x8004d01b
It occurs about the 10th line in Errorlog and follows:
Attempting to initialize Distributed Transaction
Coordinator.
What causes it? How to fix it?
(SQL Server 7.0, SP4, NT 4.0)
Thank you.This error is reported if the MSDTC service is not running
when SQL starts. Makse sure the MSDTC service is
running and set it's startup to automatic if it's required
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"bd" <bruce.drechsler@.delphi.com> wrote in message
news:098c01c34bd0$69906f60$a001280a@.phx.gbl...
This msg. appears in the startup messages in Errorlog.
Failed to obtain TransactionDispenserInterface: Result
Code = 0x8004d01b
It occurs about the 10th line in Errorlog and follows:
Attempting to initialize Distributed Transaction
Coordinator.
What causes it? How to fix it?
(SQL Server 7.0, SP4, NT 4.0)
Thank you.|||MSDTC is not required at this time. I'll consider the
messages informational, only.
Thank you.
Bruce
>--Original Message--
>This error is reported if the MSDTC service is not running
>when SQL starts. Makse sure the MSDTC service is
>running and set it's startup to automatic if it's required
>--
>HTH
>Jasper Smith (SQL Server MVP)
>I support PASS - the definitive, global
>community for SQL Server professionals -
>http://www.sqlpass.org
>"bd" <bruce.drechsler@.delphi.com> wrote in message
>news:098c01c34bd0$69906f60$a001280a@.phx.gbl...
>This msg. appears in the startup messages in Errorlog.
>Failed to obtain TransactionDispenserInterface: Result
>Code = 0x8004d01b
>It occurs about the 10th line in Errorlog and follows:
>Attempting to initialize Distributed Transaction
>Coordinator.
>What causes it? How to fix it?
>(SQL Server 7.0, SP4, NT 4.0)
>Thank you.
>
>.
>
"Failed to generate a user instance of SQL Server" using sql server express and vwde. why?
I've set up a website on another computer using sql server express and visual web developer express, and it works as expected. However halfway through the development i've had to move to another computer. I installed visual web developer express + sql server express, and copied the project files across, but now when I attempt to run it I get the error:
Failed to generate a user instance of SQL Server due to afailure in starting the process for the user instance. The connectionwill be closed.
I've tried reinstalling the software and it doesn't help. Any idea why this is happening, and what I can do to fix it?
thanks
How to fix it is covered in the link below change the configuration. Hope this helps.
http://blog.krisvandermast.com/FailedToGenerateAUserInstanceOfSQLServerDueToAFailureInStartingTheProcessForTheUserInstanceTheConnectionWillBeClosed.aspx
|||Hi,
I changed the built in account to 'local system' in the SQL server configuration manager, and deleted my SQLEXPRESS folder, then restarted the computer, but the same thing is happening. Is there anything else I need to do to fix this?
thanks for your help
|||I am sorry you error sent me on the wrong track because moving a database created in one box and moving it to another is not a simple copying files over. That is the reason the solution I gave you did not fix your problem so delete the folder. When you are moving your database to a new computer you need to do it manually through code like the second link below. You need to check your access permissions to the new computer and follow the guide created by Microsoft in the second link if the forum posting in the first link below did not fix your problem. Hope this helps.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=125227&SiteID=1
http://support.microsoft.com/default.aspx?scid=kb;en-us;224071
"Failed to generate a user instance of SQL Server" - Redux
I have SQL Server 2005 SP1 Dev Edition installed on my laptop along with Visual Web Developer 2005. I installed SQL Server Express 2005 SP1. I then created a new web site using the Club Web Site template.
I did the recommended initial build to get the Membership database installed and got an error page (http://localhost:1667/WebSitesVB2/):
SQLExpress database file auto-creation error:
Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
There were 4 recomme4ndations from the error page. I have met three of them: (1) the AppDaa folder that was created when I used the Club Web Site template; (2) my machine's ASPNET user set up with full control permissions on the APP Data Folder; (3) SQL Server Express successfully installed on my machine.
The 4th recommendation from the error page is "The process identity for the web server account must have a local user profile. See the readme document for details on how to create a local user profile for both machine and domain accounts. ". I have no idea of how to do this or how/where to find the elusive the "readme" file.
I am at a loss as to what to do next. I have spent the day going over forums on this error and none seem to provide consistent or relevant answers.
Try to remove User Instance=true from your connection string, if you don't need to generate a user instance at runtime. For more information about the user instance attribute, you can refer to:
http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(VS.80).aspx|||
Changed userinstance = TRUE to userinstance=FALSE. Same result - failure to generate userinstance.
Is it possible that there is some setting in VWD that provides a connection string for the ASPNET db that is to be created? The only connection string in the WebConfig from the original template is the one for the ClubSite DB. There is none for the ASPNET db (because the template does not provide the ASPNET DB.
After 2 tries, I still get this error and when I look at the database explorer, there is only one DB file: Club.MDF.
Anyone else have any answers?
|||I probably should have included this stack trace:
Stack Trace:
[SqlException (0x80131904): Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +115 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +346 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +3244 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +56 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +1084 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +272 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +355 System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) +91 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +115 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +122 System.Data.SqlClient.SqlConnection.Open() +229 System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +110[HttpException (0x80004005): Unable to connect to SQL Server database.] System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) +181 System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) +167 System.Web.Management.SqlServices.Install(String database, String dbFileName, String connectionString) +46 System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) +681
|||Sorry I forgot to mention: there is a connection string named LocalSqlServer, which is used by .NET 2.0 built-in providers (Profile, Membership, RoleManager, etc.). You can override it and try again, for details you can refer to:
Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005
Monday, February 13, 2012
"DROP INDEX failed because the following SET options have incorrect settings: 'ARITHABORT
I've got a big import routine that brings a lot of data in raw tables into
another database - the routine is about 2000 lines long. I have a DTS
package that first brings the data in from CSV files and other sources, then
it runs this sproc to bring the data into the other database, then finally
it truncates the logs, and shrinks the databases. In the sproc, I EXEC a
sproc in the target database which drops all indexes on the target database,
start a transaction, bring all of the data in, then EXEC another sproc on
the target database to recreate the indexes again. Like I said, it's a
monster! :)
This sproc worked flawlessly for about six months, but now when I run the
DTS package it fails on the sproc step with the error mentioned in the
Subject line. The table on which this is failing has a clustered unique
index and 8 other standard indexes, but there are no indexes on calculated
columns or indexed views or anything like that. I am able to run the sproc
on the data from Query Analyzer with no errors, and I have tried DROPping
INDEXes with ARITHABORT on and ARITHABORT off, with no complaints.
Can anybody help out with this?
Thanks, JimDo you have any hypothetical indexes created by the ITW ?
select * from sysindexes where name like 'hind_%'
If you have no "real" indexes on computed columns or views its woeth
dropping any hypothetical ones and seeing it that helps
It may be worth explicitly setting the correct set options in your sproc
anyway to be on the safe side
set ANSI_PADDING,ANSI_WARNINGS,
CONCAT_NULL_YIELDS_NULL,ARITHABORT,
QUOTED_IDENTIFIER,ANSI_NULLS on
set NUMERIC_ROUNDABORT off
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Jim" <jim@.x.com> wrote in message
news:erLkiH%23JEHA.3276@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I've got a big import routine that brings a lot of data in raw tables into
> another database - the routine is about 2000 lines long. I have a DTS
> package that first brings the data in from CSV files and other sources,
then
> it runs this sproc to bring the data into the other database, then finally
> it truncates the logs, and shrinks the databases. In the sproc, I EXEC a
> sproc in the target database which drops all indexes on the target
database,
> start a transaction, bring all of the data in, then EXEC another sproc on
> the target database to recreate the indexes again. Like I said, it's a
> monster! :)
> This sproc worked flawlessly for about six months, but now when I run the
> DTS package it fails on the sproc step with the error mentioned in the
> Subject line. The table on which this is failing has a clustered unique
> index and 8 other standard indexes, but there are no indexes on calculated
> columns or indexed views or anything like that. I am able to run the
sproc
> on the data from Query Analyzer with no errors, and I have tried DROPping
> INDEXes with ARITHABORT on and ARITHABORT off, with no complaints.
> Can anybody help out with this?
> Thanks, Jim
>
Saturday, February 11, 2012
"Conversion failed when converting from a character string to uniqueidentifier."
This is probably a simple wuestion but i would appreciate some help
I am trying to get and insert theuserId into a table called "Orders"
I got the user id as
Dim CustomerId As Object = Membership.GetUser(User.Identity.Name).ProviderUserKey.ToString
The button on click command is
worldshop.ShoppingCart.CreateOrder(CustomerId,...................
The Function Has the parameter for Customer Id as follows
Dim dbParam_CustomerId As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_CustomerId.ParameterName = "@.CustomerId"
dbParam_CustomerId.Value = CustomerId
dbParam_CustomerId.DbType = System.Data.DbType.String
command.Parameters.Add(dbParam_CustomerId)
When i run this I am getting the error message
"Conversion failed when converting from a character string to uniqueidentifier."
Can anyone tell me where I am going wrong
many thanks
Martin
What type is CustomerID defined as in the database? It sounds like it is NOT a string, but rather a uniqueidentifier (a GUID).|||thanks for your reply. i got it sorted out
martin
|||Do you mind sharing with us what your solution was? as I am having the same problem...|||I'll check and get back to you
martin
|||sorry about the delay in getting back to you
I was having the same problem. I solved it by instantiating the userid as an object
Dim userId As Object = Membership.GetUser(User.Identity.Name).ProviderUserKey
i passed the object to the function as a guid
ByVal userId As Guid
Dim dbParam_userId As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_userId.ParameterName = "@.UserId"
dbParam_userId.Value = userId
dbParam_userId.DbType = System.Data.DbType.Guid
command.Parameters.Add(dbParam_userId)
last i put the guid into the database as char 36
@.UserId char (36)
HTH
Thursday, February 9, 2012
"cannot open user default database. Login failed"
his error message: "cannot open user default database. Login failed".
My OS is WinXp v2002 SP2. This issue started after I deleted a database on
my local server, prior to that it was working fine.
ThanksIt looks like you deleted the database that was the default database for
your login. One method to fix the problem is to connect using the OSQL
command-line utility, overriding the default database. You can then change
the default DB to one that exists.
The example below connects to the local server with SQL authentication and
changes the default database to 'master':
OSQL -d master -U MyLogin -P MyPassword -Q"EXEC sp_defaultdb 'MyLogin'
,'master'"
Hope this helps.
Dan Guzman
SQL Server MVP
"Brent Stevenson" <essexbs@.insightbb.com> wrote in message
news:u6aIYXRwFHA.3864@.TK2MSFTNGP12.phx.gbl...
When attempting to connect to my local instance of SQL server I am getting
this error message: "cannot open user default database. Login failed".
My OS is WinXp v2002 SP2. This issue started after I deleted a database on
my local server, prior to that it was working fine.
Thanks|||Dan,
Thanks for the reply! But infortunaley that fails with a "login failed for
'user' error."
According to OSQL help: "If neither the -U or -P options are used, SQL
Server 2000 attempts to connect using Windows Authentication Mode." Well
that would be my network account & password and if I just enter OSQL -d
master and then my network account password at the prompt, it fails (login
failed for user). I know I'm correctly entering my current network account
password.
Any ideas?
Thanks
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:Oex4GfRwFHA.464@.TK2MSFTNGP15.phx.gbl...
> It looks like you deleted the database that was the default database for
> your login. One method to fix the problem is to connect using the OSQL
> command-line utility, overriding the default database. You can then
> change the default DB to one that exists.
> The example below connects to the local server with SQL authentication and
> changes the default database to 'master':
> OSQL -d master -U MyLogin -P MyPassword -Q"EXEC sp_defaultdb 'MyLogin'
> ,'master'"
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Brent Stevenson" <essexbs@.insightbb.com> wrote in message
> news:u6aIYXRwFHA.3864@.TK2MSFTNGP12.phx.gbl...
> When attempting to connect to my local instance of SQL server I am getting
> this error message: "cannot open user default database. Login failed".
> My OS is WinXp v2002 SP2. This issue started after I deleted a database
> on my local server, prior to that it was working fine.
> Thanks
>|||My machines gives an error if I don't use -U or -E. Did you try using the -E
switch to login using
your Windows account?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Brent Stevenson" <essexbs@.insightbb.com> wrote in message
news:OCxkkudwFHA.1028@.TK2MSFTNGP12.phx.gbl...
> Dan,
> Thanks for the reply! But infortunaley that fails with a "login failed for
'user' error."
> According to OSQL help: "If neither the -U or -P options are used, SQL Ser
ver 2000 attempts to
> connect using Windows Authentication Mode." Well that would be my network
account & password and
> if I just enter OSQL -d master and then my network account password at the
prompt, it fails (login
> failed for user). I know I'm correctly entering my current network account
password.
> Any ideas?
> Thanks
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:Oex4GfRwFHA.464@.TK2MSFTNGP15.phx.gbl...
>|||Using the -E go me in & allowed me to change my default DB & resolve the
issue.
Thanks a million!! Have a good day.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23vKLtxdwFHA.3556@.TK2MSFTNGP12.phx.gbl...
> My machines gives an error if I don't use -U or -E. Did you try using
> the -E switch to login using your Windows account?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Brent Stevenson" <essexbs@.insightbb.com> wrote in message
> news:OCxkkudwFHA.1028@.TK2MSFTNGP12.phx.gbl...
>|||The example I posted assumed a SQL login. Like Tibor mentioned, you can
specify '-E' to establish a trusted connection using your current Windows
account. You never need to specify a Windows account with the '-E'
parameter but you still need to specify the name of the account to
sp_defaultdb. For a local Windows account:
OSQL -d master -E -Q"EXEC sp_defaultdb 'MyMachine\MyAccount','master'"
or for a domain account:
OSQL -d master -E -Q"EXEC sp_defaultdb 'MyDomain\MyAccount','master'"
If your SQL Server access is via membership of the local Administrators
group, you'll need to change the default database for that group instead:
OSQL -d master -E -Q"EXEC sp_defaultdb 'BUILTIN\Administrators','master'"
Hope this helps.
Dan Guzman
SQL Server MVP
"Brent Stevenson" <essexbs@.insightbb.com> wrote in message
news:OCxkkudwFHA.1028@.TK2MSFTNGP12.phx.gbl...
> Dan,
> Thanks for the reply! But infortunaley that fails with a "login failed for
> 'user' error."
> According to OSQL help: "If neither the -U or -P options are used, SQL
> Server 2000 attempts to connect using Windows Authentication Mode." Well
> that would be my network account & password and if I just enter OSQL -d
> master and then my network account password at the prompt, it fails (login
> failed for user). I know I'm correctly entering my current network account
> password.
> Any ideas?
> Thanks
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:Oex4GfRwFHA.464@.TK2MSFTNGP15.phx.gbl...
>|||I just had the same problem, and used this same solution. Deleted a
database, didn't realise it was my default DB (or that it mattered), and
couldn't figure out the account credentials problem I was having using the
command line suggestions found elsewhere. Was using a domain admin account.
Thanks very much!
Bryan
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:u9z7NBewFHA.2540@.TK2MSFTNGP09.phx.gbl...
> The example I posted assumed a SQL login. Like Tibor mentioned, you can
> specify '-E' to establish a trusted connection using your current Windows
> account. You never need to specify a Windows account with the '-E'
> parameter but you still need to specify the name of the account to
> sp_defaultdb. For a local Windows account:
> OSQL -d master -E -Q"EXEC sp_defaultdb 'MyMachine\MyAccount','master'"
> or for a domain account:
> OSQL -d master -E -Q"EXEC sp_defaultdb 'MyDomain\MyAccount','master'"
> If your SQL Server access is via membership of the local Administrators
> group, you'll need to change the default database for that group instead:
> OSQL -d master -E -Q"EXEC sp_defaultdb 'BUILTIN\Administrators','master'"
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Brent Stevenson" <essexbs@.insightbb.com> wrote in message
> news:OCxkkudwFHA.1028@.TK2MSFTNGP12.phx.gbl...
>
"cannot open user default database. Login failed"
My OS is WinXp v2002 SP2. This issue started after I deleted a database on my local server, prior to that it was working fine.
Thanks
It looks like you deleted the database that was the default database for
your login. One method to fix the problem is to connect using the OSQL
command-line utility, overriding the default database. You can then change
the default DB to one that exists.
The example below connects to the local server with SQL authentication and
changes the default database to 'master':
OSQL -d master -U MyLogin -P MyPassword -Q"EXEC sp_defaultdb 'MyLogin'
,'master'"
Hope this helps.
Dan Guzman
SQL Server MVP
"Brent Stevenson" <essexbs@.insightbb.com> wrote in message
news:u6aIYXRwFHA.3864@.TK2MSFTNGP12.phx.gbl...
When attempting to connect to my local instance of SQL server I am getting
this error message: "cannot open user default database. Login failed".
My OS is WinXp v2002 SP2. This issue started after I deleted a database on
my local server, prior to that it was working fine.
Thanks
|||Dan,
Thanks for the reply! But infortunaley that fails with a "login failed for
'user' error."
According to OSQL help: "If neither the -U or -P options are used, SQL
Server 2000 attempts to connect using Windows Authentication Mode." Well
that would be my network account & password and if I just enter OSQL -d
master and then my network account password at the prompt, it fails (login
failed for user). I know I'm correctly entering my current network account
password.
Any ideas?
Thanks
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:Oex4GfRwFHA.464@.TK2MSFTNGP15.phx.gbl...
> It looks like you deleted the database that was the default database for
> your login. One method to fix the problem is to connect using the OSQL
> command-line utility, overriding the default database. You can then
> change the default DB to one that exists.
> The example below connects to the local server with SQL authentication and
> changes the default database to 'master':
> OSQL -d master -U MyLogin -P MyPassword -Q"EXEC sp_defaultdb 'MyLogin'
> ,'master'"
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Brent Stevenson" <essexbs@.insightbb.com> wrote in message
> news:u6aIYXRwFHA.3864@.TK2MSFTNGP12.phx.gbl...
> When attempting to connect to my local instance of SQL server I am getting
> this error message: "cannot open user default database. Login failed".
> My OS is WinXp v2002 SP2. This issue started after I deleted a database
> on my local server, prior to that it was working fine.
> Thanks
>
|||My machines gives an error if I don't use -U or -E. Did you try using the -E switch to login using
your Windows account?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Brent Stevenson" <essexbs@.insightbb.com> wrote in message
news:OCxkkudwFHA.1028@.TK2MSFTNGP12.phx.gbl...
> Dan,
> Thanks for the reply! But infortunaley that fails with a "login failed for 'user' error."
> According to OSQL help: "If neither the -U or -P options are used, SQL Server 2000 attempts to
> connect using Windows Authentication Mode." Well that would be my network account & password and
> if I just enter OSQL -d master and then my network account password at the prompt, it fails (login
> failed for user). I know I'm correctly entering my current network account password.
> Any ideas?
> Thanks
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:Oex4GfRwFHA.464@.TK2MSFTNGP15.phx.gbl...
>
|||Using the -E go me in & allowed me to change my default DB & resolve the
issue.
Thanks a million!! Have a good day.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:%23vKLtxdwFHA.3556@.TK2MSFTNGP12.phx.gbl...
> My machines gives an error if I don't use -U or -E. Did you try using
> the -E switch to login using your Windows account?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Brent Stevenson" <essexbs@.insightbb.com> wrote in message
> news:OCxkkudwFHA.1028@.TK2MSFTNGP12.phx.gbl...
>
|||The example I posted assumed a SQL login. Like Tibor mentioned, you can
specify '-E' to establish a trusted connection using your current Windows
account. You never need to specify a Windows account with the '-E'
parameter but you still need to specify the name of the account to
sp_defaultdb. For a local Windows account:
OSQL -d master -E -Q"EXEC sp_defaultdb 'MyMachine\MyAccount','master'"
or for a domain account:
OSQL -d master -E -Q"EXEC sp_defaultdb 'MyDomain\MyAccount','master'"
If your SQL Server access is via membership of the local Administrators
group, you'll need to change the default database for that group instead:
OSQL -d master -E -Q"EXEC sp_defaultdb 'BUILTIN\Administrators','master'"
Hope this helps.
Dan Guzman
SQL Server MVP
"Brent Stevenson" <essexbs@.insightbb.com> wrote in message
news:OCxkkudwFHA.1028@.TK2MSFTNGP12.phx.gbl...
> Dan,
> Thanks for the reply! But infortunaley that fails with a "login failed for
> 'user' error."
> According to OSQL help: "If neither the -U or -P options are used, SQL
> Server 2000 attempts to connect using Windows Authentication Mode." Well
> that would be my network account & password and if I just enter OSQL -d
> master and then my network account password at the prompt, it fails (login
> failed for user). I know I'm correctly entering my current network account
> password.
> Any ideas?
> Thanks
>
> "Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
> news:Oex4GfRwFHA.464@.TK2MSFTNGP15.phx.gbl...
>
|||I just had the same problem, and used this same solution. Deleted a
database, didn't realise it was my default DB (or that it mattered), and
couldn't figure out the account credentials problem I was having using the
command line suggestions found elsewhere. Was using a domain admin account.
Thanks very much!
Bryan
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:u9z7NBewFHA.2540@.TK2MSFTNGP09.phx.gbl...
> The example I posted assumed a SQL login. Like Tibor mentioned, you can
> specify '-E' to establish a trusted connection using your current Windows
> account. You never need to specify a Windows account with the '-E'
> parameter but you still need to specify the name of the account to
> sp_defaultdb. For a local Windows account:
> OSQL -d master -E -Q"EXEC sp_defaultdb 'MyMachine\MyAccount','master'"
> or for a domain account:
> OSQL -d master -E -Q"EXEC sp_defaultdb 'MyDomain\MyAccount','master'"
> If your SQL Server access is via membership of the local Administrators
> group, you'll need to change the default database for that group instead:
> OSQL -d master -E -Q"EXEC sp_defaultdb 'BUILTIN\Administrators','master'"
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Brent Stevenson" <essexbs@.insightbb.com> wrote in message
> news:OCxkkudwFHA.1028@.TK2MSFTNGP12.phx.gbl...
>
