I have two drives in SQL Server Box. C and D drives. I am using below script to move mdf and log files from C: drive to D: Drive. However, I keep getting error : Directory lookup for the file "D:PackagesTestVGR.mdf" failed with the operating system error 5(Access is denied.).
USE MASTER;
GO
-- Take database in single user mode -- if you are facing errors
-- This may terminate your active transactions for database
ALTER DATABASE TestVGR
I get the following error in a log file created in the osql command:
Msg 3201, Level 16, State 1, Server KAC2KGS2, Procedure usp_Kaman_Full_SqlDB_Backup, Line 150 Cannot open backup device 'x:Servername_master_sqlbu_200703101930.bkf'. Device error or device off-line. See the SQL Server error log for more details. Msg 3013, Level 16, State 1, Server KAC2KGS2, Procedure usp_Kaman_Full_SqlDB_Backup, Line 150 BACKUP DATABASE is terminating abnormally.
The device is established in a CMD file right before the osql command is started that starts my stored procedure. The CMD in this file is:
for /f "tokens=15 delims=." %%i in ('ipconfig^|find "IP Address"^|find "192.168"') do set SUBNET=%%i
:loop if exist x: net use x: /del net use x: \192.168.%SUBNET%.1ackup if not ERRORLEVEL 1 ( goto continue ) else ( echo FAILED TO CONNECT TO BACKUP SERVER >> "%SystemDrive%LogFiles\%Computername%.log" sleep 60 goto loop )
:continue
echo IP ADDRESS OBTAINED
Echo delete old log file if it exists
if exist %3\%computername%_kaman_full_sqldb_backup_old.log del /Q %3\%computername%_kaman_full_sqldb_backup_old.log
In the stored procedure I try to use the x: drive and that does not work. I have tried obtaining the \192.168.x.x address and that only works on some of my servers. All are running SQL 2000, some are using Win2K and Win2003. It does not seem to matter. One of them that is using Win2003 only fails occationally.
I notice when I do a
exec master..xp_cmdshell 'x:'
The system cannot find the drive specified.
Yet, when I go to the server there is an x drive.
I am using the sqlserv user to run the job and that use is an administrator on the local machine. This is a virtual machine. We add the X before the osql and drop it after the command finishes.
I need to create a SQL server database and add some tables to it. Then access it with a C# application. The problem is that the new SQL server database and it's tables must reside on an external hard drive. How do I point SQL server to this external drive, so that I can create a database on this drive and then create tables and access data on it?
i have taken full database backup on tape drive one week ago,by automated scripts ,now when i check the maintenance plan history , it says the task failed and gives a message that unable to open the \. ape0 ,with error
([Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 3201: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open backup device '\. ape0'. Device error or device off-line. See the SQL Server error log for more details. [Microsoft][ODBC SQL Server Driver][SQL Server]BACKUP DATABASE is terminating abnormally. )
I have a network drive that is mapped as Z: on my local machine. When creating a new database, that drive does not show up in the list of available paths. If I try to hardcode the drive/path info, I get an error message: "The system cannot find the path specified."
I recently created a program that connects to a Microsoft SQL database that was stored on my computer and it worked fine. As soon as I tried to connect to the same database via a network drive I got an error stating that "The file Y:Filename.mdf is on a network path that is not supported for database files.". I can't seem to get it to work, if anybody has any ideas what I'm doing wrong I would appreciate your help.
I logged on to my SQL Server Express this morning and received the following error: Cannot connect to MICHELLEWSQLEXPRESS. An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
What is interesting is that its on a local computer. I followed one recommendation to enable the pipes and tcp but that didn't work either. How do I change the default settings to allow remote connections (on a local computer) when I can't log into the server?
Not sure if this is the right forum to post this...
After going through lot of old posts in various forums and changing lot of settings, i'm still not able to access my Server remotely.
This is Windows 2003 Server machine with Sonicwall Firewall, i have allowed Port 1433 in both Firewall and ISA and call is getting through but i'm getting following error msg :-
{"An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"}
This machine is also having Sql Server 2000, and the SQL Server 2005 is installed with named instance.
I've recently started working with a public sector organisation who have 4 clustered sql instances that has 80% of it's db mirrored.
Looking at the transaction log - it seems that a transaction log backup is a good idea as the log is 4x larger than the data file.But I'm not allowed access to the physical server to check onto which drive I can create the trn. No RDP, no vmware - let's be honest I'm not even allowed to launch cmd line Also the Server Manager informs me "We will need to carefully look at database backups if you guys want to start doing these backups on box, as that will break our off box backup routine (it will screw the transaction chain)."
I don't understand how backing up the transaction log could break the "transaction chain"?
I have deployed some reports on the reporting server, i have noticed that every one in the domain in which the reports are published can access the reports, except one user. when he tries to access the report he got the following error message or the blank report.
"An error occured during report processing"
"can no read the next data row for the data set dataset1".
Although this user has all the roles on the reporiting server kike browser,content manager etc.
I'm trying to connect to a database using a service account that we got created. The ID is an AD account and was added to the db as such. When I try to connect to the database using the account with the password I get [login failed for domainid]. The DBA mentioned that its setup to use windows auth, however, I can't connect with this service account using windows Auth, due to I'm using to connect via code.
How can I connect to the database from my code using this ID?
I have the ID and pwd in my code to connect with, does the ID have to be setup differently in the Database?
Had some big problems with my SQL Server 2008 R2 SP1 during the last maintenance running on Windows Server 2008 R2 Enterprise ( upgraded from Standard). I'm getting the following error,
"SQL Server blocked access to procedure 'dbo.sp_sqlagent_has_server_access' of component 'Agent XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Agent XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface Area Configuration" in SQL Server Books Online."
I did a google search and found others with the problem but the resolution isn't working for me. I ran the following commands, heck I ran them multiple times. No errors come back running these commands. But the same error keeps happening, I even restart the service and then the server again.
sp_configure 'show advanced options', 1; GO RECONFIGURE; GO sp_configure 'Agent XPs', 1; GO RECONFIGURE GO
The msdb got too big for the disk it was on. I had maintenance plans to clear out the all of histories but I didn't think of the mail items. When I finally saw this problem I tried clearing them out using the stored procedures only with it finally failing because the transaction log got full. Since we didn't have a lot of jobs scheduled I decided to just recreate the msdb. So I scheduled a maintenance window, download SQL Server Service Pack 3.
my steps are as follows: ->diff backup of msdb ->stopped the service and started it again with: NET START MSSQLSERVER /T3608 ->detached msdb with: SQLCMD -E -SP-SRVR-SQL-01 -dmaster -Q"EXEC sp_detach_db msdb" ->moved it off the drive ->restarted the service without any startup flags ->recreated msdb with: SQLCMD -E -SP-SRVR-SQL-01 -i"D:Microsoft SQL ->ServerMSSQL10_50.MSSQLSERVERMSSQLInstallinstmsdb.sql" -o"D:Microsoft SQL ServerMSSQL10_50.MSSQLSERVERMSSQLInstallinstmsdb62715.out"
I looked at the log file and there were no actual error messages so I applied service pack 3 and restarted server after it installed, was actually prompted to restart. In my tests I was never prompted to restart the server.Now I never started the agent service after recreating the msdb database since I knew it wasn't on the same version. I just went directly to the latest SP. Our applications are running fine but now I cant do scheduled backups.
My users have sa rights to our SQL servers. I want to restrict their access to the C: so that they do not restore DB's there.
I thought at first I could create a Windows user that runs the SQL Service then grant them read rights to the C:. This does not give the user enough rights to start the service.
My users have sa rights to our SQL servers. I want to restrict their access to the C: so that they do not restore DB's there.
I thought I could create a Windows user that runs the SQL Service then grant them read rights to the C:. This does not give the user enough rights to start the service.
I have just downloaded an evaluation version of SQL server from the microsoft website and installed it in my PC.
Now I want to create file data source.
I followed these steps: -From the control panel, ODBC datasource admin -click the DSN tab -click the add button -select the sql server driver, enter the data source file name -enter "local" in the server text box as I installed the sql server in my standalone PC. -click next After that I had this error. "Connection failed. SQL server does not exist or access denied."
But The sql server service is running.
Can anyone help me where did my configuration go wrong?? Thanks...
Being a very novice SQL Server administrator, I need to ask the experts a question.
How do I go about moving a database from 1 drive to another? The source drive (C is local to the server, but the target drive (E is on a Storage Area Network (SAN), although it is still a local drive for the server. I want to move the database from C: to E:. Can someone provide me with instructions?
How to backup half of dbs from a server on C drive and the other half on D drive and vice versa, first half on D drive and other half On C drive using only one job and one stored procedure??
Using scheduling from job add 2 schedules to the job so first schedule backup first half to C and second half to D , the second schedule backup first half to D and second half to D.
I have been trying to use openrowset with a shared drive, and even though the share has "full control" permissions granted to "everyone" and the accout that SQL runs under has been granted explicit full control permissions I am unable to open the file which itself has no security on it.
Can I not use a \ path and only use mapped drives?
Thanks
below works...
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:5People.xls', [Sheet1$])
below doesn't work...
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=\cluster02FileManager5People.xls', [Sheet1$])
Hi all, I encounter a problem of unable to access Remote Server after i placed my web application into the web server. An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.) So I googled and tried lot of different ways of connecting.By piped name, IP, trying instance which that server don't even have one :X.I also tried typing in cmd > telnet localhost 1433It appeared that the telnet fail, i tried it on other machine, it works. So is it cause by denied of access through that port?I checked at the sql client network, it show 1433, i check the server too, it show 1433.I also checked if there's any firewall, it appear there is no firewall at all.The sql server i trying to connect is SQL 2000, it run by Windows Server 2003 Any advise or more information you needed to help me solve this problem?Thanks
Hi, I have a SQL Server 2005 Express database dbase.mdf which I cannot access. It works fine in VWD and the development server using the following connection string: String connectionString = "Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\dbase.mdf;Integrated Security=True;User Instance=True"But when the site is not on the development server but on IIS, I get a SqlException saying "User does not have permission to perform this action." when I execute the connection.Open() command. I find it extremely frustrating that something which works in the development server fails on the real server. Can anyone help me with this? Do I have to change my connection string, or perhaps set some permissions...I have already given the IUSR_MACHINENAME account and the ASPNET account full access to dbase.mdf. Surely this must be an issue that lots of people deal with... How do other people manage to log to access databases? Any help would be much appreciated. Thanks,P1000
Hi All, Which some 1 can help me this. I've developed an application and everything work fine after deploy. But after restarted my PC, i'm unable to login to my application which tie to the xxx.mdf DB and prompt Database error with no description. Until when the i click second time, only i'm able to acess into it. What happened actually?
I'm using sql express as embedded db on my local pc. This is without any remoting access.
I can't run my web application on remote pc which is connected in flan with my pc.It works on my local pc but it is not working on remote pc. i m geeting an error like as blowAn error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) i have used sql server 2000 for my database but i my getting error for sql server 2005 which i have never used in my web application.Here is the Exception detailsException Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)i have used coonection string as followsData Source=neptune;Initial Catalog=azim;User ID=saso can anyone give me soluion of this problem
Hi,i'm at wit's end here. My problem:I'm trying to do an insert into a table with ExecuteNonQuery and keep getting the error:"input string is not in correct format"I am trying to insert a string into sql server 2000 type varchar(length=50) and it won't work so instead I just decided to get a count on the number of records existing and I got the same error (see above) when I tried this. The code for this last part:<CODE> Dim MyCmd As New System.Data.SqlClient.SqlCommand.' other code here.......Dim TempSQL As String = "SELECT COUNT(*) FROM tblUsers" MyCmd.CommandType = CommandType.Text MyCmd.CommandText = TempSQLDim a As Object = MyCmd.ExecuteScalar()</CODE>I am really stuck on this and cant find the answer anywhere online.Cheers,Joe
I'm unsure what happened, but I'm using SQL Server 05 Developer Edition. I've been working with a local database where I tried to add a clustered index on a huge table (about 50M records). Well, I had to stop the query since it was maxing out my work computer. Since then, I've been unable to open the database or run queries against it.
When I open SQL Server Management Studio the database says In Recovery. Once it's done, when I try to expand tables, I eventually get this error:
TITLE: Microsoft SQL Server Management Studio ------------------------------ Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=1222&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------
If I run a Select * from INFORMATION_SCHEMA.TABLES query, it will go on for a while
If I try to access the properties of the Database (right clicking), I get this error:
TITLE: Microsoft SQL Server Management Studio ------------------------------ Cannot show requested dialog. ------------------------------ ADDITIONAL INFORMATION: Cannot show requested dialog. (SqlMgmt) ------------------------------ An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ Lock request time out period exceeded. (Microsoft SQL Server, Error: 1222) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=1222&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------ I'm unsure where to go from this point forward.
Response.Write("The following exception occurred: " & ex.Message)
End Try
End If
End Sub
I've tried both "sql" and "dts" with all the various permutations that are listed (and commented out) above. I either get an error that says: The top level folder "VisBridges" is not found. ("dts" "VisBridges") -- or -- Invalid package name or location: MSDBVisBridgesExportTime ("dts" "MSDBVisBridges") -- or -- Cannot find folder "MSDBVisBridgesExportTime" ("sql" "MSDBVisBridges") -- or -- The specified package could not be loaded from the SQL Server database ("sql" "VisBridges")
I'm unable to do a RDA.Pull() when I have the sqlcesa30.dll running under HTTPS. What are the requirements to allow me to pull with the dll under HTTPS?
I have SQL Server 2005 installed and functioning (it does everything I've asked it to do locally). I also have the Express and Standard Editions installed on a computer running WinXPPro SP2 with all the WinUpdates applied. I also have VS2005 installed on this computer. I've done some development work on this computer, using VS2005 to create a SQLDB, connect to it, add data, etc. This is all okay.
The problem is I cannot connect to the SQL Server from the client computer. I installed the client tools on this XP Pro box along with all the WinUpdates. Here's what I can do...
I can ping the SQL Server by name (the name gets resolved). I can copy files between the two computers using Explorer. I enabled "Allow remote connections to this server" in the Server Properties / Connections page. I did not change the default port of 1433. The TCP/IP protocal is enabled in the Configuration Manager. The Surface Area has been configured to allow local and remote connections using TCP/IP and named pipes. SQLBrowser surface is running as is the MSSQLSERVER service.
So what's going on? I am new to SQL Server to it may be something very simple / obvious.