We are running SQL server 2003 with SP3. I'm trying to shrink a data files with the emptyfile option so I can eventually remove the file using the alter database command. However, I get the following error message when I run the alter database command:
Error: the file PRADATA4 cannot be removed because it is not empty.
The file that I'm trying to remove still has 62 extents on it. I looked MS Knowledge base 254253 and 279511 on this problem but they say it is corrected by SQL server 7.0 with service pack 3. commands that I'm running are as follows:
1) USE PRA DBCC TRACEON(8901) DBCC SHRINKFILE ('PRADATA4', EMPTYFILE) DBCC TRACEOFF(8901)
2) USE PRA GO ALTERDATABASE PRA REMOVE FILE PRADATA4 GO
Apologies if this is something very easy that i've overlooked but I've never used 2005 and cant seem to find my answer anywhere else. Ok, Im trying to move my DB from one server to another. Ive got the bak and sql files from the old database. I've installed MS SQL server Management Studio and connected to the new database ok. I then select Taks>Restore>Database>From device>Add File And I get the error: Cannot access the specified path or file on server, verify that you have privelidges or the path exists: c:program filesmicrosoft sql servermssql.1mssqlackup Ive tried creating the folders but to no avail. Have I forgotten to set something up? thanks in advance! Tom
I tried to remove AdventureWorksDB in the "Add or Remove Programs" of Contol Panel and I got the following errors: (1) AdventureWorksDB Error 1326: Error getting file security: CProgram FilesMicrosoft SQL ServerMSSQL1MSSQLGetLastError: 5. |OK| and (2) Add or Remove Programs Fatal Error during installation (after I clicked the |OK| button). Please help and tell me how I can solve this problem.
I have uninstalled the CTP version of the SQL Server express so that I can install the released version but CTP version is still listed in the add/remove program list but without the change/remove button. I have been to different sites to find information on cleaning this up and I have ran all the uninstall tool I can find but the problem still prevails. I cannot install the released version without completely getting rid of the CTP version. Please help anyone.
Hi all, i encountered this problem.. whenever i tried to create publications it always prompt me this error msg "sql server replications does not support nicknames,such "." or "(local)". i know i need to delete the registration and register a new server with a different name.. i just want to double confirm whether deleting the registration will affect the databases or not ? :
In the login properties on the Database Access tab, a user's name saysdbo instead of his name. I do not want him to have dbo permissions. Icannot drop the db_owner permissions that he has on the databasebecause I get the error "Error 15405: Cannot use the reserved user orrole name 'dbo'."How do I remove these permissions from this user?
BEGIN TRANSACTION Copy records from live to archive END TRANSACTION with commit or rollback execute sproc to write audit log with success or fail IF transaction was committed BEGIN TRANSACTION Delete records from live the archive END TRANSACTION with commit or rollback execute sproc to write audit log with success or fail End IF
END TRANSACTION OUTERTXN with commit if both inner transactions were successful or rollback if either failed
If either inner transaction rolled back execute sproc to write audit log saying whole process is rolling back End IfMy problem is that if the outer transaction rolls back then I am losing the two audit records because they are part of the transaction scope. I want these executes to commit even if the master transaction fails.
Can anybody explain what database user with a prefix of "" in the public role indicates. I have the same two users in every database and cannot remove them?
I have a customer that wants to remove a power user from her company.
She has given him the SA password (against my advise) and he has his own user account setup in the database.
I am not sure if he has created any backdoor(s) into the SQL box or not - I left him kinda on his own and didn't pay too much attention to him.
I assume people have faced this problem before, and i am looking for a best practices or "here is what we did" post mortem of how they handled the issue.
i'm using the Enterpirse library logger to write logs into a database. When choosing connection string i choose the database i want in the "connection properties" dialog box and push 'Test connection' button. everything goes well.
then i open the SQL Server Management studio express and connect to the databse to check some things, from that point on , when i push the 'Test Connection' button in the Enterprise library i get the error:
"cannot open user default database. Login failed. login failed for user My'server/MyuserName'"
even when i close the sql server manager , it is still stuck - the connection test doesn't work anymore.... it only work when i restart the computer.
Hi, I have a bunch of data from tables on MS SQL 2000 and i want to transfer this data to my new database running on MS SQL 2005. How do i perform bcp on this? thanks :D
I have an Evaluation version of Enterprise edition MSSQL2005 for development. I tried to install MSSQL2005 sp1 and it is necessary to upgrade to the release version of SQL2005. Currently, I just got the release CD on hand, how can I upgrade the evaluation version to release version except uninstalling the eval and install with the release edition? Thanks in advance
This is my first time to deploy an asp.net2 web site. Everything is working fine on my local computer but when i published the web site on a remote computer i get the error "Failed to generate a user instance of SQL Server due to failure in retrieving the user's local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed" (only in pages that try to access the database) Help pleaseee
When i try to login using SQL server Authentication i get a problem:- A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (.Net SqlClient Data Provider)
but when i try to login windows authentication it is ok and login with out any problem!!
1)what is the problem??? 2)how to avoid this problem??
Installed SQL2005, connect via (the new) SQL Nativ Client ODBC Vers. 2005.90.1399.00 works, just as (the old) SQL Server ODBC-Driver 2000.85.1117.00. Works fine.
I was wanting to know. I am making a site that might be come big. And me and this dude are considering pickering abotu GUID. I don't want to use them but he does. And I was wondering what should we do? I know nothing about guids
I've just finished writing a script to install our SSIS packages using dtUtil.exe
We also have a whole bunch of legacy dts packages that we maintain. At the moment we rely on these being manually installed - I'm looking to automate this effort (I'm holding back a rant about 6hr production deployments due to people not being able to follow simple instructions)
Didn't find too much out there on this.. unless I'm missing something obvious, it wouldn't be the first time.
Hello. I have recently installed MS SQL SERVER 2005 and when I was installing it, it asked me for the username and password, and there I had 2 options: either write my own, either select "Use Windows Authentification". I selected the "Windows Authenthification" ( I guess that means that it uses my username and password from Windows ).
Now, Im trying to connect to the Server using Java and JDBC, but I have a problem: I have to specify the username and the password of the connection! My windows' only account is "Vlad" and I have no password. I tried these options, but it didn't work. I also tried with empty string "", and with "sa", "sa" but it didn't work either. I get an error saying that "Login failed for user 'Vlad'. The user is not associated with a trusted SQL Server Connection."
Any ideea of what the username/passwords are or how to get them?.
Can you explain please why Extended SP does not work under Vista ?
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.0 (Build 6000: )
UAC turned off. MSQSL runs under Administrator account.
Any call of user esp - and SQL server goes to loop. If I call system esp - all works fine.
If I try to read properties of ESP from Management Studio - I have the same effect - SQL server is in loop.
Question: I have searched here and on Microsofts site already but it seems that all solutions require already either some ASP2 knowledge or MSSQL knowledge .. I am quite new in both but need to realise this for a project.
I have installed a MSSQL 2005 server running MSSQL2005 Standard in mixed authentication mode. Services running using a domain account created for this purpose. I have then created a simple database called test with a table called testtable
All I need to achieve now is a simple ASP2 page, which is located on the DC IIS, which connects to the SQL server (in same domain but different server) using WINDOWS authentication and returns the result of
SELECT * FROM TESTTABLE
I try now for a couple of days so I hope someone could help me with this .. I really need a step by step guide what I need to do on the SQL server side (so a specific user can connect to this particular database) and on the IIS side ..
I know it is always painful to help someone with little knowledge but I am getting desperate.
I work with Microsoft SQL Server 2005 on windows XP professional. I'd like to create stored procdure to add image to my database (jpg file). I managed to do it using VARCHAR variable in stored procedure and then using EXEC, but it don't work directly.
My Table definiton: CREATE TABLE [dbo].[Users]( [UserID] [int] IDENTITY(1,1) NOT NULL, [Login] [char](10), [Password] [char](20), [Avatar] [image] NULL, CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED ( [UserID] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
My working solution using stored procedure: ALTER PROCEDURE [dbo].[AddUser] @Login AS VARCHAR(255), @Password AS VARCHAR(255), @AvatarFileLocation AS VARCHAR(255), @UserId AS INT OUTPUT AS BEGIN SET @Query = 'INSERT INTO USERS ' + CHAR(13) + 'SELECT '''+ @Login + ''' AS Login, ' + CHAR(13) + '''' + @Password + ''' AS Password,' + CHAR(13) + '(SELECT * FROM OPENROWSET(BULK ''' + @AvatarFileLocation + ''', SINGLE_BLOB) AS OBRAZEK)' EXECUTE (@Query) SET @UserID = @@IDENTITY END
I'd like to use statement in the stored procdure: ALTER PROCEDURE [dbo].[AddUser] @Login AS VARCHAR(255), @Password AS VARCHAR(255), @AvatarFileLocation AS VARCHAR(255), @UserId AS INT OUTPUT AS BEGIN DECLARE @Query AS VARCHAR(MAX)
SET @AvatarFileLocation = 'C:hitman1.jpg' INSERT INTO USERS SELECT @Login AS Login, @Password AS Password, (SELECT * FROM OPENROWSET(BULK @AvatarFileLocation, SINGLE_BLOB) AS OBRAZEK)
SET @UserID = @@IDENTITY
END
It generates error: Incorrect syntax near '@AvatarFileLocation'.
My question is: Why it does not work and how to write the stored procedure code to run this code without errors.
i need to do patching of the application servers, some of the databases are configured in availability group .as part of this need to remove the database from availability and rejoin the db after doing patching .
Loooks like I have a corrupt database. I cannot delete it because "database is used for replication" I am told in an error box . There are no items shown when trying to expand the database. Opening Query anylizer the database is not shown in the dropdown box. If I try to create a database with same name SqL says it is already there. Also the database icon is grey not yellow like the active working databases. Anyone have an Idea of how to get rid of this rogue database. This was a temp entry and no backup was made
I have a database created in server 2000, and now I have moved it to server 2005.
All works do fine, but there is a user which cannot be removed.
In the user properties window, the assigned schema is empty. The user is a db_owner of the database. When I was trying to update the user, it asked me for the login. The login is empty, but the field is disabled.