Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have created a sql job with 2 steps to create a db backup i.e., 1st step to get the db backup and second step to copy the db backup to network drive.
1st Step success.
2nd step fails.
In 2step am giving type as operating system(cmdExec) and in command line i mentioned as
robocopy <soure> <destination> but it throuws the Error.
Error:-The process could not be created for step 2 of job 0x7847DBA2AFA7D149A5ED24AA8B3B9FA6 (reason: The system cannot find the file specified). The step failed.
Quick help is highly appreciated.
A few things I can think of:
Make sure that the path in the command is fully qualified (C:... etc) and wrap it in double quotes to avoid issues with spaces in path names. Paste the path into a command window and make sure Robocopy opens OK.
Make sure that the account that the SQL Server instance is running under (probably Network Service) has access to the robocopy executable.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
In our office we have two servers (development and Test). I need to create a new server for practice purpose. How can do it?
If it's a physical machine; Install a new server and install sql.
If it's a virtual machine you can always clone the image and change the settings.
You also have the option to copy the database and run it on the development or test server as a separate database with a different name. If you just want to test some stuff and dont want to risk causing problems for the other developers this is probably the best option.
Another option is to install the sql server on your pc, copy the db and test stuff.
I suspect the last option is the one you want?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
My PC is running slow. I want to format it but my asp project database is in SQL Server 2008, I know how to backup the database but a friend of mine told me it won't be restored if you format your system, backup only gets restored if you use same computer, SQL Server. I'm really confused, but I have to format my PC in any case. Can anyone tell me what I need to do to save my database?
Right Click on your Database which you want to take as backup .Then Go to Task>Backup
While doing backup select the drive which you are not going to Format and keep back there.
For Restoring. Right Click on Databases{Top one} and select Restore option.
Select From Device option.
While Restoring Select the file which you created as backup by browsing. If you are not able to find that backup file, then make sure you have specified Files Type as All.
and yes your Friend is wrong :)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I have attached a few databases to my sql server instance. I wonder about the different behavious, while DBs have been attached the same way.
When I try to copy the folder that contains the files, some files do not copy and give error that file is in use, while some other, attached to the same instance and in the same folder, copy without any problem.
Please advise what is the difference?
Thanks
The proper way to copy the files are as follows, this only applies to user databases:
To move a data or log file as part of a planned relocation, follow these steps:
Run the following statement.
ALTER DATABASE database_name SET OFFLINE;
Move the file or files to the new location.
For each file moved, run the following statement.
ALTER DATABASE database_name MODIFY FILE ( NAME = logical_name, FILENAME = 'new_path\os_file_name' );
Run the following statement.
ALTER DATABASE database_name SET ONLINE;
Verify the file change by running the following query.
SELECT name, physical_name AS CurrentLocation, state_desc FROM sys.master_files
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
My manager asked me to to compile a set of sql scripts, I use some of those scripts for updating new records (some are used in ssms and ssis), to create table and scripts that I use to connect the foreign keys from the dim table to the fact table.
He asked me to do this...
Can you send me the sql script used to prepare the initial environment?
Please put that into a executable .sql file.
I haven't done this before and what tools should I use? SSMS? or SSIS? or Notepad?
I am using SQL Server, the tools I have is SSMS and BIDS
In SSMS, write a sql statement and save. It will create a txt document with an .sql extension. 'Excuting' this file will, depending on your file associations, open SSMS and load this file. As for sending a sql script used to prepare the initial environment, there is no such thing. That is something that you will have to prepare; we know nothing about your environment.
I have created SQL scripts that contain many steps to help me run repetitive tasks. Run it once and all of my work is done, but I built them painstakingly by hand one-at-a-time
The is no such thing as an "executable" SQL file. There are just SQL files:
Try something like this:
rename myscript.txt myscript.sql
Or if you are using an editor:
Save: myscript.sql
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Greetings,
I've got a bat script which copies certain information from a computer onto a USB hard drive using Robocopy. The hard drive is FAT formatted and therefore doesn't support directories with extended attributes, leading me to robocopy error 282 as described here.
How do I tell robocopy to copy all the attribute information EXCEPT for the extendable attributes?
I still need help, but, some helpful info from the googling ive done thus far
Robocopy Command-Line Options: http://www.ss64.com/nt/robocopy.html
What is an Extended File Attribute: http://en.wikipedia.org/wiki/Extended_file_attributes
Windows Hotfix (which would be great if I wasn't copying to a USB hard drive): http://support.microsoft.com/kb/329145/en-us
EDIT: Wow, the file system isn't FAT, I was wrong. Its RAW.
I found I only got the 282 error when copying direcories with robocopy. So I used xcopy with /T /E to create the directory structure. I was then able to use robocpy to copy all the files without error.
Convert FAT USB hard drive to NTFS using convert command (converting in this direction won't delete the data):
http://technet.microsoft.com/en-us/library/bb456984.aspx
eg:
convert e: /fs:ntfs