Server user id is not a valid user in database

Good afternoon,

I just restored a database and am receiving the following error

		[Sybase][ODBC Driver][Adaptive Server Enterprise]Server user id 4 is not a 
valid user in database

Is there a system function or stored procedure or some other SQL that I can 
use to fix this issue - or do I have to create the master logins and redo 
the restore.

Thanks in advance.

Whatty


 

0
Whatty
10/26/2010 6:24:16 PM
sybase.ase.general 8655 articles. 0 followers. Follow

3 Replies
9609 Views

Similar Articles

[PageSpeed] 55

There is no magic wand...
This is for the experienced dba.
If you have a copy of master..syslogins in bcp native format then restore that too.
You may need to delete most logins except sa & probe.
use the "bcp -b1" to commit after ever record.


-- 
Cory Sane
[TeamSybase]
Certified Sybase Associate DBA for ASE 15.0
"Whatty" <steven.whatmore@purefacts.com> wrote in message news:4cc71cd0$1@forums-1-dub...
> Good afternoon,
> 
> I just restored a database and am receiving the following error
> 
> [Sybase][ODBC Driver][Adaptive Server Enterprise]Server user id 4 is not a 
> valid user in database
> 
> Is there a system function or stored procedure or some other SQL that I can 
> use to fix this issue - or do I have to create the master logins and redo 
> the restore.
> 
> Thanks in advance.
> 
> Whatty
> 
> 
> 
>
0
Cory
10/27/2010 4:28:41 AM
"Whatty" <steven.whatmore@purefacts.com> wrote in message 
news:4cc71cd0$1@forums-1-dub...
> Good afternoon,
>
> I just restored a database and am receiving the following error
>
> [Sybase][ODBC Driver][Adaptive Server Enterprise]Server user id 4 is not a 
> valid user in database
>
> Is there a system function or stored procedure or some other SQL that I 
> can use to fix this issue - or do I have to create the master logins and 
> redo the restore.
>
> Thanks in advance.
>
> Whatty
>

It depends upon what "the issue" is.  You restored the database on the same 
server that the backup was made from?  (That's how most of us would 
interpret your first sentence but I want to be sure.)  In which case the 
issue would be with logins created after the backup that are also added as a 
user to the database.  To find these run SQL like this in master:

select l.name, l.crdate
from syslogins l
where not exists (select u.name
                           from <db>..sysusers u
                           where u.suid = l.suid)
order by l.crdate

This will find candidate logins to add to the database via sp_adduser. 
Ignore the rows that have crdates earlier than the backup.  Or add the logic 
to the above SQL.  Figuring out the groups, if used, would require other 
resources.  The above query would also have to be augmented if there are new 
aliases.


0
Carl
10/27/2010 10:16:43 AM
Unfortunately no it is a different server that we restored the database too 
and you are correct we logins were created after the backup and they are 
also added as a user to the database.


"Carl Kayser" <kayser_c@bls.gov> wrote in message 
news:4cc7fc0b$1@forums-1-dub...
>
> "Whatty" <steven.whatmore@purefacts.com> wrote in message 
> news:4cc71cd0$1@forums-1-dub...
>> Good afternoon,
>>
>> I just restored a database and am receiving the following error
>>
>> [Sybase][ODBC Driver][Adaptive Server Enterprise]Server user id 4 is not 
>> a valid user in database
>>
>> Is there a system function or stored procedure or some other SQL that I 
>> can use to fix this issue - or do I have to create the master logins and 
>> redo the restore.
>>
>> Thanks in advance.
>>
>> Whatty
>>
>
> It depends upon what "the issue" is.  You restored the database on the 
> same server that the backup was made from?  (That's how most of us would 
> interpret your first sentence but I want to be sure.)  In which case the 
> issue would be with logins created after the backup that are also added as 
> a user to the database.  To find these run SQL like this in master:
>
> select l.name, l.crdate
> from syslogins l
> where not exists (select u.name
>                           from <db>..sysusers u
>                           where u.suid = l.suid)
> order by l.crdate
>
> This will find candidate logins to add to the database via sp_adduser. 
> Ignore the rows that have crdates earlier than the backup.  Or add the 
> logic to the above SQL.  Figuring out the groups, if used, would require 
> other resources.  The above query would also have to be augmented if there 
> are new aliases.
>
> 
0
Whatty
10/28/2010 1:02:07 PM
Reply:

Similar Artilces:

Each user as database user
Good day! I'm trying to implement my own MemebershipProvider. Problem is, that different users should be different database users. Not each user. Any idea, how to solve this? Because only way how to use some database user I know it is to change connection string...  Why dont you use Windows Authentication and let the Active Directory take care of your memberships. Is this an internal application?  It is not. I already wrote one post about it and I will tell it again. Application is based on classicla win application. The same database. Problem is, that usual dat...

Login user id not persistent after user logs in. Works locally but not on server side.
Hi, I've built a mini app that runs of SQL Express 2005 with VWD Express 2005 locally with no problems on XP Pro.  When I split the app and the SQL database across two servers (Server 2003) the ASP.Net 2.0 Web Admin Tool doesn't seem be to working properly.  I'm using Forms authentication.  The user can sign in on the login screen but no authentication or retention of the user ID occurs.  Pages that are blocked from that certain user are now available, whereas on my local XP machine the restrictions are in effect.  ...

Ebay user ID vs Comcast user ID
Name: Michael P Stevens Email: mpstvnsatcomcastdotnet Product: eBay Companion Summary: Ebay user ID vs Comcast user ID Comments: The "Companion" automatically brings up "mpstvns" as my user ID for Ebay. It has been changed, cannot be accessed or used until the merging of ebay use is completed in about 30 days. My new user ID for ebay is "u_need_it_123" Can the "Companion" be adjusted to reflect this or will it be automatic when the merge is completed? I do not know if this is a "bug" or not. Browser Details: Mozilla/5....

Server userid 35 is not valid user in database sybsystemprocs
Hi, we are using ASE11.5 on NT. I just droped a login and recreated it with the following script print 'keberle' exec sp_addlogin 'keberle', 'password',@fullname = 'Richard Keberle Ruecklastschri',@defdb = 'omitrans',@deflanguage = 'us_english' exec sp_locklogin 'keberle', 'unlock' exec sp_role 'grant', 'hotline', 'keberle' go exec sp_adduser 'keberle', 'R_KEBERLE', 'public' go If the user now trys to connect to the db omitrans he got the following message: ...

Cannot open user default database. Login failed. Login failed for user 'Server\Username'... again
I have been working for a few month on a project, when suddenly I can not access the local database I use for testing. Here are some details:Microsoft Visual Studio, C# application, The database is in the folder "App_Data," gets attached automatically, and is accessed using Windows authentication, and hence, no user accounts were created explicitely. Connection string:<add name="ASPNETDBConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="Sy...

Checking Username\ password against SQL Server database to validate users at login
I have login page (login.aspx) with a username and pasword textbox. I want to check if the username or the password exists in the database (let the table be named as "users"). If the username and the password exists in the table then I allow the user to the default.aspx page otherwise I generate the error message that "Either the username\password is invalid".Please advise how do I do check against the database in asp.net???thanks in advance You are looking to authenticate then to authorize users, Take a look at this articlehttp://msdn.microsoft.com/library/default.asp?url=/library/en...

New User
I have created a table to hold a userID, firstName, lastName, email, username and password.I currently have my code to enter in the values from text boxes except for the userID.             SqlDataSource1.InsertParameters("firstName").DefaultValue = txtFirstName.Text            SqlDataSource1.InsertParameters("lastName").DefaultValue = txtLastName.Text            SqlDataSource1.InsertParameters("email").DefaultValue = txtEma...

Replace user id with user name
Hi, I'm sure this has to be simple but so far I'm having problems finding a solution. I have two data tables: T_Users (id, lname, fname, etc...) T_EventDetails (id, user1, user2, user3, date, etc) These tables are not associated with each other (pk, fk, etc) and are part of a larger system. The "user" fields in T_EventDetails are populated with the "id" data for the various users from a set of DDLs on the main page. The DDLs get their data from the T_Users table (DataValueField="id") and each row in T_EventDetails will h...

user in limbo
Hello: I moved a user from one PO to another but something went wrong during the move. Now the user cannot login to her groupwise account getting an error "User ID "her id" not found". I have tried syncing her account with nds. I have also tried launching the client with the /u and /ph options to force the client to look in the correct database. I am now thinking it just might be easier to just delete her account and create a new one. The user has agreed to this altough it would be an inconvience. I have never lost one datum in GW and would like to keep my ...

User comments on user database catalogs
Hi all. How best do I include comments on the purpose / meaning of columns and tables within a Sybase user database? Is it 'safe' for instance to add a column for comments to table 'syscolumns' in database 'model' and existing user databases? My ultimate aim is to have these comments included within DataArchitect / PowerDesignor PDM files created using the reverse engineering function. Thanks for any response. Steven - Notes RDMS: Sybase ASE v11.5 Server OS: NT Server Enterprise v4 (SvP 5) Steven, Its not possible to alter system tables, you may...

user<id>.er$ and user<id>.dba
We had an issue over the weekend with our backup which caused a memory leak on the server that houses our POA. The server is back up and running and we did some GroupWise maintenance routines to verify everything is okay. The only thing that showed up in the Analyze/Fix was for structure check which returned a couple users having a .dba and a .er$ file. The user<id>.db appears to be okay for these users and the accounts are working. Can I just delete the .dba and .er$ files? Ive seen these before when a rebuild occurred on the user accounts and I think we were able ...

Prime user database of a deleted user
I have several prime user databases on our Post Offices that are owned by user's who have been deleted from GroupWise. Is there a way I can force GroupWise to delete or drop these databases from the system? I am seeing a lot of D101 user not found errors on the POA's, and I think it is related to these left over PU databases. Can I just delete the PU files? If there is no way to drop these databases from the system, at the very least is there a way for me to determine the sharee(s) of the PU? Any help would be appreciated. Thanks -- piggotl -----------------...

get User ID from current user
hi, i'm trying to log database activity. therefore i need the user-id of the currently logged-in user. For the login i used the login-controls that come with VWD and set up a MS SQL Server 2000 Database for data storage. That part works fine, but i've found no way to get the id.i'd be glad for some hints.Thx, SönkeP.S.: found things linke user.identity.name and membershipuser.providerkey (or sth) - but this didn't help me. Are you aware of where the users are stored in the database?  Did you configure the personalization providers from the default?  If not, open up ASPNETDB.MDF a...

get user name by user id
hi i send the user ID to a page and there i wanna find the user name. can you please let me know how to find a user name by user id? tanks  Are you using Active Directory? If so check out this tutorialCommunity Coder Hi you can pass the Guid USerId to Membership.GetUser method,MembershipUser usr = Membership.GetUser(UserIDAsGuid); string userName = usr.UserName; // to get the current logged in username , just use HttpContext.Current.User.Identity.Name;    Regards,Anas Ghanem.Note:Please Don't hesitate to click "Report Abuse" link if you noticed som...

Web resources about - Server user id is not a valid user in database - sybase.ase.general

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Social Side of Code, Database CI and REST API Testing in Methods & Tools Winter 2015 issue
... for software developers, testers and project managers – has published its Winter 2015 issue that discusses the social side of code, database ...

Enterprises want to run databases in containers
More than three out of four IT decision makers are interested in running stateful applications like databases within containers, according to ...

Huge database of 191 million U.S. voters found on the open Internet
... such bulk information online, a recent discovery seems to indicate. According to VentureBeat , a security researcher found the exposed database ...

Top US School District Switches to Rimini Street for Oracle Database and Oracle E-Business Suite Support ...
Douglas County School District using savings from Rimini Street independent support to develop district-wide data visualization capabilities ...

IDG Contributor Network: Shrinking an already ginormous SharePoint database transaction log
Last month, I wrote about how to avoid having ginormous transaction logs within SharePoint databases. But what if it’s too late, and your files ...

18 million targeted voter records exposed by database error
A second database containing voter records has been exposed due to a configuration error. While the first held records that some dismissed inconsequential ...

Former Ohio cop uses cop database to stalk victim
... stalked her like an average person would, but stalked her in the way that only a police officer could: he stalked her utilizing a police database ...

U.S. Attorney Suggests Password Cardinals Used To Access Astros Scouting Database Was “Eckstein123"
... scouting director Christopher Correa plead guilty to five counts of unauthorized access to a computer for hacking the Houston Astros database. ...

Resources last updated: 2/3/2016 11:07:39 PM