I am trying to script out a new login in SQL 2000. I can script the login, but I am trying to assign the correct permissions, (e.g. db_datawriter, db_owner) and I am have trouble scripting the permissions. Here is a snippet of what I am looking to accomplish in my script. Remeber, this is 2000 not 2005...
-- This works
exec sp_addlogin @loginame = 'LoginName'
,@passwd = 'Password'
,@defdb = 'Database'
go
-- This doesn't. I am not even sure if this is what I need...
exec sp_addrolemember @rolename = 'AdminCVB'
,@membername = 'db_owner'
go
The company for which I work did not have a DBA until I started a few weeks ago. Whoever installed SQL2K used the wrong CD so they have been running Personal Edition on their servers. I have installed a new SQL2K standard instance and have restored everything except the jobs and DTS packages. Can the msdb from the Personal edition be restored to the standard instance?
Is it possible to downgrade SQL from Enterprise to Standard Edition, or do you have to remove the previous installation (uninstall) and reinstall. Meaning you would also have to restore all user databases? Thanks.
I have an VB .NET 2005 application which should create a database and a user on an SQL server both for SQL 2000 and SQL 2005. The last not tested yet. I use SQLConnection to comunicate with the server. I can make the database no problem, but I can't add a new user.The user that runs this stored procedure has rights to execute this procedure. When I try to use the stored procedure: "sp_addlogin" I get the following error :
"-- 'sp_addlogin' was found in the text of this event. -- The text has been replaced with this comment for security reasons."
I want to add a windows user login which looks like: MachineNameUserName, however back slash "" is not allowed in ap_addlogin. With UserName only, the privileges are not granted correctly as far as I tested. How can I walk around? Any ideas? I use SQL express.
I am using sp_addlogin ...,@encryptopt = 'skip_encryption' to transfer logins from one machine to another. This works fine for most users but there is a problem with some. As far as I can tell the only pattern is that the ones that fail were originally upgraded from 6.5. They all have a xstatus of 2050 in the sysxlogins table.
We have a mixed environment consisting of some SS2005 with most servers still running on SS2000. Several operating systems are in use. We use mixed mode authentication. To date, all of our SS2005 servers have been installed on Windows Server 2003. In each of these environments we have the password policies disabled on the operating system side (Administration Tools | Local Security Policy). On these servers we have been able to successfully use SP_ADDLOGIN to add logins for SQL Server authentication.
Recently I installed SQL Server 2005 on Windows 2000 SP4 (old I know) as a test environment. Like the 2003 servers, password policies and complexity are shutoff. When I attempt to use SP_ADDLOGIN, however, here I receive:
Server: Msg 15118, Level 16, State 1, Line 1 Password validation failed. The password does not meet Windows policy requirements because it is not complex enough.
Is this a know occurance on the older operating system?
I am trying to add a new user (SQL Server 6.5) from an application program (Delphi 4.0). I was hoping I could do this in a stored procedure that basically acts a a wrapper around the SQL Server stored procedures.
It partially works - here is my procedure:
create procedure AddUserToSQLServer(@loginame varchar(30), @Password varchar(30) ) as begin
-- Add User to SQL Server Database exec mydb.dbo.sp_addlogin @loginame,@Password,'mydb'
exec mydb.dbo.sp_adduser @loginame
end
The sp_addlogin adds the login and sets the default database as mydb. This is OK, except the user still can not login to the application. So I added the sp_adduser. This gives the user access to the application, but I still have a problem. When I go into Executive Manager, and go to the Manage Logins screen by double-clicking on the newly added user, I get the message "Error 21770: The name 'loginame' was not found in the users collection" where loginame is the users login. I click OK to this message, and the user is displayed on the manage logins screen. Their default database is mydb, a check is in the Permit box and their username is in the User column. Alias and Group are blank. When I try to drop the user, I get the same error again (2 times), then error "Error 15175: [SQL Server] login 'loginame' is aliased or mapped to a user in one or more database(s), drop user or alias before dropping login".
The only thing I found that works is to go to SQL and issue sp_dropuser loginame, then I can drop the user.
Anybody see what's wrong? Or know of a FAQ that addresses this situation?
i have an asp.net web application that uses SQL2000 backend. any users login to the application using a proper SQL login. so each user has unique logins
One of the roles within the application is to allow the user to create new logins for the application which inturn creates a SQL login. for this i have been using the following special sp's within an application specific sp:-
the only way ican get this to run is if the user executing the sp is a member of sys admin, ideally i dont want to be giving anyone access to sys admin. i thought security admin would allow me to do the above but it doesnt. Is there any other ways or ideas to get around this problem
Hi,I am having a problem in moving data from execl to sql2k. The data looks like 16.70% , 12.5% etc and when I move it it changes to 0.16700000000000001 etc.. any idea what datatype I should use so that it don't changes it's mode... Thanks in advance
Hi, I am new to sql 2k. Iam been asked to install sql2k on a new box . What all things I should keep in mind when I go for the installation of sql2k? Any / All suggestions appreciated. Jai
Hi, I have to move 2 fields from sql 7 to sql 2k . the field is text. feild a is text field b is text. I have to add field a and field b and move it to another field (say field c which is also text )in sql 2k. How to go about it? TIA. Jsi
I moved my DB from SQL7.0/NT to SQL2k/WIN2k. Everything was fine from the last few months but suddenly I start getting timeout errors. I checked and rebuild all the indexes - there are no deadlocking at all - everything looks quite normal to me - I am all lost now as what to monitor and where to see for this timeout error messages. Anyone has any idea as what is going on what should I check to see if that's the cause. I also ran Profiler but there too nothing too long as to timeout. My sql box is attached to IIS box and pager is set on IIS box. The problem is not with IIS box cuz when I shift the applications to another SQL box everything runs fine and there is no timeout messages. Any thoughts appreciated.
I have been sent a backup file from a supplier that I have been trying to restore. I have succesfully installed it on my SQL2K5 instance, however, we need to put it on our SQL Server in our DMZ . . . Which is running SQL2K . . . Supplier was informed of this and says that you can restore to a SQL2K DB as long as you use SQL Management Studio . . . Tried that and got an error message Saying That Restore Headeronly is terminating - Too many backup devices specified. . . only 64 are allowed. . . .Supplier suggests that its a SP4 issue . . . Installed SP4 and tried again . . . Got the Same Error again (SQL Server Error :3205)
Am I out of my gourd I am sure that restoring a SQL2K5 Backup to a SQL2K instance is not possible?
I should say that I am Running SQLExpress as my 2K5 Instance and MSDE as my 2K instance . . . Before I invest more time on this and trying it on a development server running Standard edition.
i'm hoping somone can shed some light on why this isn't working. basically i have a webform which that passes data back to a database (SQL Server 2000) and uses Windows authentication to perform the UPDATE, INSERT, whatever.
i've defined a role within the database, specifically for the application. for my tests, i've added a global security group from my Windows domain to the logins on the SQL instance. this group has been added to the custom role in the application database.
since i'm a member of this global security group, i was under the impression that my credentials would pass through and everything would be ok, however, it's not recognizing my login - or others in the group as well.
the application web (in IIS5.0) has been set to Windows Authentication, and i've flagged the impersonate=true attribute in the app's web.config file.
lastly, my connection string for the sqlconnection object grabs my user name (or the current user for that matter) in the format of DOMAINaccount. for the sake of argument, i was able to successfully connect using a custom SQL login that was assigned to the custom role.
the error that's returned specifically states that the "Login failed for DOMAINaccount"
any thoughts on what's up here? i guess i'm not understanding SQL Server security to well. thanks in advance.
I don't have any extra machines, so I'm thinking of evaluating SQL2K on one of my existing boxes with SQL 7 already installed. My experience is that SQL 6.5 co-existed extraordinarily well with SQL 7. Does the same apply to the SQL 7 / SQL 2K combination? Thanks!
I don't have any extra machines, so I'm thinking of evaluating SQL2K on one of my existing boxes with SQL 7 already installed. My experience is that SQL 6.5 co-existed extraordinarily well with SQL 7. Does the same apply to the SQL 7 / SQL 2K combination? Thanks!
I am planning to use XP_CRYPT for encrypting and decrypting cc#'s, passwords etc., at database level. Any suggestions or experiences on this. More info about this product at http://www.activecrypt.com/faq.htm
I tried to install SQL Server 2K on a W2K server running IIS and SSL. The SQL installation failed until I deleted the certs from my system. Now, the SQL logs say "SuperSocket Info: Bind failed on TCP port 1433". I have tried everything on the MS KB, TechNet, and MSDN sites that I could find. I have also uninstalled IIS and Certificate Services from the server. Since there are no certs left, I suspect that SQL Server is getting in it's own way on startup. Does anyone know of a way to trap/log this kind of conflict?
I have scheduled a job using Job Agent in SQL2K (Management). Every once in a while i get an error when i view job history:
Executed as user: xxx. Transaction (Process ID 53) was deadlocked on lock | communication buffer resources with another process and has been chosen as the deadlock victim. Rerun the transaction. [SQLSTATE 40001] (Error 1205). The step failed.
The process ID changes for every error. Sometimes its 51, 56, or 54 as well.
I have checked several times, but there is no other process that runs at that time. I even rescheduled it for a different time, but even then it fails about once every week or two.
How can i check what is the other procedure it is deadlocking with, if it is? OR what exactly is the problem, if it is not with any other process?
Here is a strange one. Have a sql2k box that I upgraded from 6.5 back. Conversion went fine, everything was ok with the sql install. Created and scheduled maintenance jobs while logged on to the box. A few days after the conversion, Enterprise Manager cannot register the server(error message is 'Data source name not found and connection libraries do not exist'). This inablilty to register the server only occurs when working on the server itself. You can register the server while connecting from another box with EM.
So, do some checking and find that the box itself does not recognize SQLSRV32.dll (etc) as even existing on the box BUT IT DOES EXIST in the normal places, it was a working install just a few days prior. As far as the box is concerned, the network libraries do not exist. Therefore, cannot register the server locally, cannot create a Data Source using the SQLSRV32 driver, cannot start the Sql Server Agent(so no scheduled back ups, etc).
Went so far as to re install the connectivity and client tools, which did not fix the issue.
I am trying to configure a 2 node SQL cluster. MSCS is configured and is failing over correctly, however when I start the installation of SQL Server, and specify the IP address of the virtual server and hit next, the installation hangs, and stops responding. I have configured MS DTC and verified that it shows up in the cluster administrator. I am not sure what else to do, please help.
I have an sql server with very high usage. The web which is connected to the sql server has approx. 1000 unique visitors every time. The database is optimized and the site goes really fast now.
But a problem we've had since the beginning is that SQL Server constantly uses 1.8 GB of RAM. Never less, never more.
Do you have any idea on how to decrease the usage of RAM. I am sure that this high usage is necessary.
I had a peculiar problem yesterday with SQLserver2000 database restore from one server to the other. I copied the .BAK file ( 11.2 GB) from source server to target server. Target server already had the same name database. I use SEM to do restore the database using the disk file .BAK as source to restore. The NT drive space was 13.5 GB available after copying. Restore failed with an error that not enough disk space is available to restore and it needs 23 GB of space for expansion. What does it mean? The database went into "Loading" state and it got corrupted. I tried to drop the database and cleared the DBF and LDF files on the drive and again tried to restore from .BAK file but it failed again with the same error message that not enough space is available for expansion. Now I do not have the original database or am not able to build the new database.
Finally I did attach/detach methods where I could bring back the database in running state.
What is it complaining about not enough space? Why did it ask for almost 100% more space for some expansion in restore process? Why it did not fail when doing attach/detach methods from other server.
I have installed a dual node active passive W2K3 Clusters with SQL 2K. The cluster has RAID10 for data and RAID1 for Quorum and Transaction Logs. How do I put the Transaction logs on the RAID1 disk as at install SQL2K only asks where you would like to put the SQL data ?
When I access SQL2K using ODBC (linked table manager), I am not able to display any data. The columns show #Deleted as their data values. How do I display data in ACCESS from SQL2K tables?