At our site, we page DBAs whenever an alert with a severity of 20 or greater is raised. This never was an issue until SQL Server 2005. Now every SSPI error is paged since it is a severity 20. I don't believe the errors are severe enough to qualify an assignment of 20. Anybody else have any thoughts on this?
I have the following severity errors 19-25. I am a new using to SQL Server 7.0 and would like some advice in dealing with these errors. I am going to run the DBCC CHECKDB to determine what the errors are. Is this the right approach. Thanks!!!
We are seeing random 605 Severity 21 Errors. We applied SP4 over the weekend, but sure enough Monday night we received another one.
We repaired the DB and don't have a copy of it when it was correct, so I can't send my DBCC results. I do have this from the Errorlog though. It occurred during our database load process.
2005-08-08 19:39:25.95 spid77 Getpage: bstat=0x9, sstat=0, cache 2005-08-08 19:39:25.95 spid77 pageno is/should be:objid is/should be: 2005-08-08 19:39:25.95 spid77 (1:1787)/(1:1787)610101214/1266103551 2005-08-08 19:39:25.95 spid77 ... IAM indicates that page is allocated to this object 2005-08-08 19:39:25.97 spid77 Getpage: bstat=0x9, sstat=0, cache 2005-08-08 19:39:25.97 spid77 pageno is/should be:objid is/should be: 2005-08-08 19:39:25.97 spid77 (1:1787)/(1:1787)610101214/1266103551 2005-08-08 19:39:25.97 spid77 ... IAM indicates that page is allocated to this object 2005-08-08 19:39:25.97 spid77 Getpage: bstat=0x9, sstat=0, cache 2005-08-08 19:39:25.97 spid77 pageno is/should be:objid is/should be: 2005-08-08 19:39:25.97 spid77 (1:1787)/(1:1787)610101214/1266103551 2005-08-08 19:39:25.97 spid77 ... IAM indicates that page is allocated to this object 2005-08-08 19:39:25.97 spid77 Error: 605, Severity: 21, State: 1 2005-08-08 19:39:25.97 spid77 Attempt to fetch logical page (1:1787) in database 'db1' belongs to object 'IEFPROD_FACA_GEO_LOC', not to object 'FacilityInterest'..
I'm getting an intermittent alert on SQL 7.0. This alert is firing on a severity 24 hardware error. This has now happened twice and both times I have looked at both the SQL error logs and the SQL Server event viewer. There are no references to the severity 24 errors in either the SQL error logs or the event viewer. What could cause this alert and why isn't it being logged properly?
how to handle sql errors with severity less then 10 in .NETi call to stored procedure which raise error with severity 10 for examplehowever in c# i can't cach this error (with severiry >= 11 it going to thecatch block in my c# app), also the @@ERROR is equal to zero when severity<= 10--Message posted via http://www.sqlmonster.com
I am moving some code that was created in visual studio 2002 into Visual Web Developer 2005 express edition and am getting a warning on some of my code before compilation. The warning is "Variable lSqlTransaction is used before it has been assigned a value. A null reference exception could result at runtime". I experienced no problems in vs2002. The offending line is the rollback command within the exception. If I move it out of the exception it no longer flags the warning, if I move it after the throw statement it now longer flags the warning. Any help appreciated. Heres the code Public Shared Sub ExecuteNonQuery(ByVal lSQLCommand As SqlCommand)
Dim lSQLConnection As New SqlConnection(SQLConnString(enmSQLDB.enmSQLDB_TPSDB)) Dim lSQLTransaction As SqlTransaction
Try '----------------------------------------------------- 'Try and open the database '----------------------------------------------------- lSQLConnection.Open()
'----------------------------------------------------- 'Create a transaction '----------------------------------------------------- lSQLTransaction = lSQLConnection.BeginTransaction
'----------------------------------------------------- 'Assign the connection and transaction to our object '----------------------------------------------------- lSQLCommand.Connection = lSQLConnection lSQLCommand.Transaction = lSQLTransaction
'----------------------------------------------------- 'Execute the stored proc '----------------------------------------------------- lSQLCommand.ExecuteNonQuery()
'----------------------------------------------------- 'Use the transaction to commit the changes '----------------------------------------------------- lSQLTransaction.Commit()
Catch ex As Exception '----------------------------------------------------- 'If any errors have been thrown then roll back without 'commiting.... '----------------------------------------------------- lSQLTransaction.Rollback()
Throw New Exception("An error has occured whilst trying to update the database. " & _ "Your changes have not been saved.", ex)
Finally If lSQLConnection.State = ConnectionState.Open Then lSQLConnection.Close() End If End Try
I'm tryin to copy information from a fact table from one server to another server but when try using a DTS package to do this, an error pops up that says "the Filegroup <filegroup_name> has no files assigned to it."
We have a standard audit trigger on one of our tables. The trigger type is "after insert, update". The trigger populates four table columns, telling us the login and time the row was created and last updated.
We use replication to synchronize three servers. The trigger specifies "not for replication" on all servers.
The code used to grab the identity and time of the last update is shown below.
LastEditedDate = GETUTCDATE(),
LastEditedBy = SUSER_SNAME()
What I observe is that the LastEditedBy value is sometimes different for the same row on different servers even though the time value is identical. I don't know how to explain this. It looks like the login value is being recalculated during replication while the edit time is not.
For the record, the correct login will be something like "MYDOMjoe" while the incorrect value on another server will read "NT AUTHORITYNETWORK SERVICE". Do these symptoms ring a bell with anyone?
I have a problem with datatype mismatches. In my Data Flow I am reading a Flat File that includes a DateOfBirth which SSIS correctly assigns a datatype of [DT_DATE]. I need to check to see if the record has previously been submitted, so I do a Lookup that uses a SQL statement that combines fields (LastName, Zip & BirthDate) from three different tables. My problem is that SSIS assigns a datatype of [DT_DBTIMESTAMP] to BirthDate, which I can't use because of the mismatch. I have tried every form of re-formating the field in SQL that I can think of, but it still gets assigned that DT. And I'm unaware of a way of changing the DT once SSIS assigns it in the Lookup task.
I need to update a table using a stored procedure that "UPSERTS". In this case, @OfficeId is passed with ParameterDirection.OutputSo when I update I assign the value to OfficeId like this (the office id value is being correctly assigned): SqlParameter OfficeIdParam = new SqlParameter("@OfficeId", SqlDbType.Int, 4); if (_officeId > 0) { OfficeIdParam.Value = _officeId; } OfficeIdParam.Direction = ParameterDirection.Output; The following segment of the stored procedure is throwing an error that the OfficeId does not exist: Update --- @OfficeId int output if not exists (select 1 from ORG_Office where OfficeId=@OfficeId) begin RAISERROR ('OfficeId does not exist in ORG_Office: E002', 16, 1) -- OfficeId does not exist. return -1 end May this approach work, and if the operation turns out to be an Insert I may do this:select @error_code = @@ERROR, @OfficeId= scope_identity() Thank you,jspurlin
Hello, Is there a way to assign multiple variables to one select statement as in the following example? DECLARE @FirstName VARCHAR(100) DECLARE @MiddleName VARCHAR(100) DECLARE @LastName VARCHAR(100) @FirstName, @MiddleName, @LastName = SELECT FirstName, MiddleName, LastName FROM USERS WHERE username='UniqueUserName'
I don't like having to use one select statement for each variable I need to pull from a query. This is in reference to a stored procedure.
I have a report where certain columns have values that get repeated, but the client has a rigid requirement for not wanting these columns as groups in the reports (other programs and exports doing specific tasks with those values). In these reports, the "hide duplicates" value is checked, so as to give an aesthetic sense of grouping.
The data for the report, in raw form is:
Value 1 A
Value 1 B
Value 1 C
Value 2 D
Value 2 E
Value 2 F
Value 3 G
Value 3 Hetc...
In its aesthetic form, it is:
Value 1 A
B
C
Value 2 D
E
F
Value 3 G
H
My question is, how can I use RunningValue() to give me the following row numbers based upon those repeated values acting as grouping, since I'm not using formal grouping in the report design?
This seems like a simple question but I still haven't been able to get an answer from Microsoft Canada. We're looking at buying 75 device cals to connect to a single instance of SQL Server Standard Edition. Our question is on how those licenses are assigned and/or activated.
Do we need to manually do something for each station or is it an automated process done the first time a station connects to the server? We also wat to understand what happens when a workstation dies and is replaced by another one. Do you have to do something on the server to transfer the license to the new station ?
In other words, when using device cals (and/or user cals), do you have to do any type of license management or is it all transparent ?
Hi, In SQL Server Express Edition, what are the rights that are assigned to a Normal Windows User and PowerUser by default ? When I install SQL Express on a clean machine and login as Power User I can add/edit/delete data but when I login as Normal Windows User I can see the data but not change it. Please help me in this regard.
We have SELECT INTO queries that use the IDENTITY function to assign a sequential row number to a result set based upon a sort order. This has been helpful in SQL Server 2000 for median determination. It appears, however, that in SQL Server 2005, the row numbers are not assigned sequentially, or maybe they are assigned before the sort order is applied.
Can anyone verify whether the IDENTITY function has changed behavior between 2000 and 2005? We would prefer not to have to make changes to existing queries. Thank you.
(BTW, the workaround we found so far is to put the initial SELECT...ORDER BY in a subquery, but then we had to include a phrase like TOP 10000000 to pass syntax check. Is there a better way?)
I restored a sql server database today. There is a problem though. In SQL server, right next to the name of the database are the words "Restricted User". Their seem to be some limitations on my access to this database now as I am not able to run some of my C# code against the database. How can I fix this in SQL server so that I am not a Restriced user.
Example of what I am talking about. In SQL server my database is named Gorlaz. Just to the left of this is a yellow Icon that represents the database "Gorlaz". For illustration purposes I will use the character "$" to substitute for the yellow database icon. So this is how it reads in SQL server management studio. $Gorlaz(Restricted User)
Can anyone help me with this? The objective is to allow an application user (with db_datareader & db_datawriter database roles assigned) to be able to create tables in the assigned schema (dbo) via a new role.
-- Create User
use master
go
create login DBA with password='xx', CHECK_EXPIRATION=ON, CHECK_POLICY=ON
use AdventureWorks
go
create user dba from login DBA alter user dba with DEFAULT_SCHEMA=dbo
go
-- Create Role
use AdventureWorks
go
create role sp_ddl_role AUTHORIZATION dbo
grant CREATE TABLE to sp_ddl_role
-- assign user to Role
use AdventureWorks
go
exec sp_addrolemember sp_ddl_role, dba
go
-- Create Table statement then run with following error Error:
Msg 2760, Level 16, State 1, Line 1
The specified schema name "dbo" either does not exist or you do not have permission to use it.
Remedy: Grant ALTER on schema::dbo to sp_ddl_role
My problem is that I want to restrict user permissions via this role to just the CREATE TABLE and granting ALTER on a SCHEMA will open up a whole lot more permissions from a security standpoint.
Question: How do I restirct this role to just the CREATE TABLE within a SCHEMA?
In SQL2000, when the Guest account was assigned into a role, such as db_datareader, then querying across databases worked just fine.
Specifically: I have a Report Writer application that connects to the SQL Server with a login (ReportRunner) that actually has very limited permissions on a database. The connection is then set (sp_setapprole) to use an Application role (App_RR) that has the necessary permissions. The report-writer app calls a Stored Procedure that gathers data from several other databases (on the same SQL instance). In SQL 2000, accessing these other databases was done through Guest - we assigned Guest to the db_datareader role. All worked fine.
We've just upgraded to SQL2005: reports started failing. It seems that although guest is assigned to the db_datareader role, the permissions for Guest don't allow selecting from tables via the db_datareader role: we've had to GRANT SELECT TO Guest specifically on the tables necessary for the report.
Is anyone aware of a design change withing SQL Server such that the Guest principal's roles are disregarded when assessing permission? Is there a new and better way to structure the permissions?
We have been storing packages in the File System folder. We had noticed that there seemed to be times when re-importing an existing package did not seem to update it properly. We tried deleting the existing package first rather than overwriting it, but to no avail.
Today we noticed that there were two DTS90Packages folders, one on the C drive and one on the D drive. The dates on the files in those folders showed that sometimes the import put the file on one drive, and other times on the other drive.
The MsDtsSrvr.ini.xml file shows this: "<StorePath>..Packages</StorePath> ".
We intend to stored the packages in the msdb database instead in order to work around this problem.
When I restore DB from testing to production, we want to remove extra access rights granted to public group. Is there a simple way to query to find out for which objects (table, view, sp, fn) that public group were granted select, delete, update insert, or execute rights?
My objective is to write a sp to remove all user assigned rights to public group (role), but not to deny any rights. How to do it?
Is there a way to find a list of Windows User accounts that are directly or indirectly (through Windows Group membership) assigned to a database role?
I could put work in to CLR programming or using a Linked Server to Active Directory, but if there is a sys.* view available that can provide me this information directly it would be much easier.
I'll be looking into this further myself anyway and posting an answer if I can find one, but if anyone has suggestions... well, thanks!
which is the string I would like to use for normal web access. This string works fine on my development system (where I use XP Pro and IIS 5.1)
In IIS6 on the "production server" the directory security on the virtual dir is set to allow anonymous access, using user IUSR_WS1 (where WS1 is the name of the system) and to integrated security.
I was trying out the Building an End-to-End Application (VB.Net) exercises on Web Matrix Guided Tour and encountered the mentioned errors. Please help. Thanks.
' TODO: Update the ConnectionString and CommandText values for your application Dim ConnectionString As String = "server='WRPBI'; user id='sa'; password='sa';database=MatrixOrders;Integrated Security=SSPI"
Dim CommandText As String = "select OrderID, OrderDate, CustomerName from Orders"
Dim myConnection As New SqlConnection(ConnectionString) Dim myCommand As New SqlDataAdapter(CommandText, myConnection)
Dim ds As New DataSet() myCommand.Fill(ds)
MasterGrid.DataSource = ds MasterGrid.DataBind()
End Sub
Sub BindDetailGrid()
' get the filter value from the master Grid's DataKeys collection If MasterGrid.SelectedIndex <> -1 Then
' TODO: update the ConnectionString value for your application Dim ConnectionString As String = "server='WRPBI'; user id='sa'; password='sa';database=MatrixOrders;Integrated Security=SSPI"
' TODO: update the CommandText value for your application Dim filterValue As String = CStr(MasterGrid.DataKeys(MasterGrid.SelectedIndex)).Replace("'", "''") Dim CommandText As String = "select OrderDetailID, ProductName, Quantity, UnitPrice from OrderDetails where OrderID = '" & filterValue & "'"
Dim myConnection As New SqlConnection(ConnectionString) Dim myCommand As New SqlCommand(CommandText, myConnection)
Cannot generate SSPI context. 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.
I am getting error once in a while. It can be while either updating/inserting/selecting a record. I may have about 100000 hits give or take a few to the database.
The VB Application identified by the event source logged this Application MODE: Thread ID: 3300 ,Logged: ------------------------------------------------------------------------------------ Error Number :-2147467259 Error Description :Invalid connection string attribute Error Source :Microsoft OLE DB Provider for SQL Server ------------------------------------------------------------------------------------ System Error Number: 0 System Error Description: System Error Source: ------------------------------------------------------------------------------------ Context/Detail Error Description : :: updateOpsRecord :: ADO Error :: Error #-2147467259 Cannot generate SSPI context (Source: Microsoft OLE DB Provider for SQL Server) (SQL State: HY000) (NativeError: 0) No Help file available
This is intresting to see. I tried looking up in all the forums and help file but no ansewers. Help would be appreciated.
All of a sudden I cannot connect to sql server from Visual Studio. Nor I can't conenct to Sql server through IIS and it gives me the same error saying "Login failed: Cannot Generate SSPI Context". Lots of my development projects got stuck because of the SSPI Issue. I know there was a network upgrade from Windows NT (users) to Active directory. I can only access the sql server from the host machine.if someone can guide or give me a quick run down on things to look for that would be wonderful.
HiMy company uses a Windows 2000 server with MS SQL Server 2000.We have many clients with administrative software that use the MS SQLserver, the problem is that we experimented randomly the error"Cannot Generate SSPI Context" and the only way to work with DB is logout the client.I'm looking the MS Technical sheet but there's no resolving hints thatcan help.Anyone has a similar problem ?Thanks.
Win Server 2003 SQL Server 2000 SP4 SharePoint Server
Win Server 2000 (Domain Controller / Active Drectory)
Clients: Win XP / Access XP
I have two clients that can access the SQL Server and one that can not. All clients can access SharePoint (SLQ Server Back end) and directories controlled by AD.
The one that cannot access the SQL Server errors: "Cannot Generate SSPI Context". I have verified: 1) date and time 2) occurances of Security.DLL (win/system32; program file/common files/AOL...; Service Pack Files/i386 (x2)) 3) Not using cached credentials
we recently moved our network and did not change any settings on any of the computers. I read KB811889; those suggestions did not resolve the issue.
Please assist me in touble shooting this connection problem. Also, how does changing the SQL Server Port on the server affect SharePoints connection to its database?
I have a SQL Server 2000 in a specific W2K server, that belongs to a domain that is administered by a W2003 server.
There is a client that has a new computer with WXP in the same domain. It used to have an old machine with W2K pro. and with the same user it worked OK.
When accesing SQL from the client with an Office2003 application via ODBC with windows authentication, after several minutes working OK, suddenly it gets this message:
Conection error. SQL state: S1000
Cannot generate SSPI context.
In the client I have executed cliconfg.exe and created a piped name protocol, but still it won't work.
Firstly, I have read through so much information on this, that my eyes are starting to bleed and I am right at the end of my rope with it all..
This issue has only started showing since I re-installed my dev box, so my server has not changed at all..
Server is 2003 with SQL 2005.
Dev box is
Vista (Ultimate)
Visual Studio Pro 2005..
A quick but painful solution is for me to log out of my box and then back in, but this is unworkable at times... about the only difference I can think of this install from the last is that now I have also installed SQLExpress on the dev box. I have gone into services and made sure that the service does not start auto. I have connection to the server and am running as administrator on both until such time as I can sort this out, but the error still occurs.
Authentication for the dbase is both windows and credential.
Can someone please give me a stratight out solution for this.
I'm signing into a sqlexpress 2005 local server using windows integration and it fails with a "Cannot generate SSPI context". After 2 years of working with this, it just started to happen after I installed a new piece of software to test. My colleague thinks it hosed our domain names. I've read all the articles and most of them have to do with a non-local server. I also read that this is caused with TCP/IP so I disabled it for sqlexpress and tried again. Then I get "An error has occurred while establishing a connection to the server. When connecting to the sql server 2005, this failure may be caused by the fact that under the default settings sql server does not allow remote connections." I know I have remote enabled so that isn't true. If it uses VIA, "Login failed for user '(null)'. Not a trusted sql connection" or something like that. Anyway, I think something is hosed in my domain and my colleague fixed it by downloading some xp tool that he can't remember where it came from. Any chance anyone else knows about this tool?
Hai, I'm having Windows XP SP2 version and I have installed SQL server 2005. Whenever I'm opening SQL server management studio in Windows Authentication Mode I get a pop message indicating that "SSPI context error message". What may be the problem and how to sort it out?
Hai, I usually connect SQL Server 2005 using Windows authentication mode (trusted connection). I have one server to which four client machines are connected and all the clients are windows XP SP2. The SQL Server 2005 I have installed is Standard Edition. When I'm connecting I get a pop message indicating that "SSPI context error message". I have seen the Troubleshooting Article ID : 811889. I was'nt able to resolve it. What may be the problem and how to sort it out ?