SQL Database automatic back up [closed] - sql

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have an SQL database - I need to back it up everyday (at a minimum) - preferably multiple times a day - automatically so it definitely gets done.
I'm running Windows which the SQL database is stored on.
What programs (prefer free ones) can I use to back it up - I'm completely new with SQL so if you're gonna explain something - do it in layman's terms thanks (:
It needs to get backed up to another server (on the LAN).

Auto Backup Database Using Maintenance Plans
Simple Step :
Go To SQL Server Configuration Manager > SQL Server Services > Run SQL Server Agent (Set it to Run Automatically)
Go To SQL Server Management Studio, Find TAB Management > Maintenance Plans. Right Click > Maintenance Plans Wizard.
Text your maintenance plans, ex: DailyBackup. Select Option button : Single Schedule for entire task.
Click Configure > Set Schedule according your demands.
Select Maintenance tasks. for this case, you choose Full Database backup.
Click Next, then define which database to backup, set backup location, and backup extension.
Click Next, Choose your report mode, then Finish.

There are many such programs at the moment, you can try EMS SQL Backup. It is not free but it is very handy for this type of tasks and supports backups compression, encryption and upload backups to FTP, network and cloud locations.

Related

Creating sql server db backup [closed]

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 4 years ago.
Improve this question
I'm trying to create a database backup and I'm pretty new to this.
I've created the .bak file already.
Do I need to backup the mdf and ldf files too?
Yes, *.bak file will be enough, as per MS instructions:
B. Full back up to disk to non-default location
In this example the Sales database will be backed up to disk at E:\MSSQL\BAK. Previous back ups of Sales have been taken.
List item
In Object Explorer, connect to an instance of the SQL Server Database Engine and then expand that instance.
Expand Databases, right-click Sales, point to Tasks, and then click Back Up....
On the General page in the Destination section select Disk from the Back up to: drop-down list.
Click Remove until all existing backup files have been removed.
Click Add and the Select Backup Destination dialog box will open.
Enter E:\MSSQL\BAK\Sales_20160801.bak in the file name text box.
Click OK.
Click OK.
https://learn.microsoft.com/en-us/sql/relational-databases/backup-restore/create-a-full-database-backup-sql-server
But still, if you are not happy to do all this by hands and if you a looking to backup your data in the cloud storage, there will be better to use some backup software (CloudBerry, Veam etc.)
What you've done is sufficient for a back up. It is worth noting that you can stop the database, detach the MDF file, and move that to a new instance and start up the database again. This is just as efficient as a back up if dealing with small databases.
Yes, you had better backup all the files. But if you are new and not sure about the whole backup process I would recommend to use some third-party backup tools that are able to deal with databases e.g.cloudberry or Unitrends or Asgira.
In addition to all above answers just want to highlight key things so you'll be more familiar with what you've done and what are your next steps (in case of bad things happen to your DBs/tables).
SQL Server databases use two files - an MDF file, known as the primary database file, which contains the schema and data, and a LDF file, which contains the logs. A database may also use secondary database file, which normally uses a NDF extension (afaik: mdf = main data file, ndf = next data file, ldf = log data file), might be wrong in some of the words.
Now, BAK files are full database backup files and TRN transaction log backup files. Transaction logs with full backup can be used for rolling back your DBs state to certain point in time. Among with different products available in the internet, BAK file can be prepared natively using SQL server utilities (I am guessing you've done this way).
So you have full, you are saved.
There are two ways to backup the database files, one is to have a copy of the .bak files and restore them using the SQL SMS, but this doesn't support point in tine restores and may have consistency issues in the restored database.
The .bak files can be easily backed up by automated PowerShell scripts.
Another way is to backup the live data files i.e ldf,mdf,ndf using a backup agent which ensures that the data can be restored in point time and the consistency is also maintained.
The data files can be backed up conveniently using easy software like cloudberry, Acronis and even using MS System centre data protection manager.

Is it possible to execute a SQL dbo automatically? [closed]

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 7 years ago.
Improve this question
Sorry if I sound ignorant but I'm new to SQL. I'm using SQL Server 2008. Basically I have a dbo object that displays a list of items, and when I hit "execute" the list refreshes with the most current data.
My question is this: is there a way to set this to execute automatically every minute or so while the table display is open? I plan on sharing out the view of the database so that people can see how far along the DB is before attempting to query it.
Hopefully that makes sense. I tried Google'ing but this seems like a rather vague topic or I'm just too confused to understand what some of these sites are saying. Any help at all would be greatly appreciated.
Clarification:
By "dbo object" I meant a table (I think?). For example it's named dbo.Bridge, and when I right click it I click "edit top 200 rows" to see the data, and then I click the red exclamation mark at the top of SQL Server 2008 to "Execute", which causes the table to update
If you're in SQL Server Management Studio or Visual Studio SQL Server Explorer then you won't be able to do it. You can set delays to execute, however:
WHILE (1 = 1)
BEGIN
SET NOCOUNT ON;
select * from [test_p]
WAITFOR DELAY '00:00:02'
END
This will keep appending onto the existing results, however, that is just a limitation of the software. It isn't meant to do things like this. You're better off just writing a simple script or view to execute every so often and display the data in some other way.
Try using waitfor, something like:
waitfor delay '000:01:00'
select * from MyTable
go 30
This will run the select 30 times, waiting a minute between each run.
(borrowed from Automatically refresh a query in ms sql server management studio?).
Another option would be to drop the query into a connection in an excel spreadsheet (for example), and set the background refresh options (workbook connections --> properties). This is most likely easier than keeping something running all day in sql server.
Edit: If GO does not work for you, check in options to see what word/character is set as your Batch Separator and replace GO with that word.

Using an old laptop as a SQL server to store online game data [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have been working on various game projects for the last year and would like to now get into some basic multiplayer connectivity.
I figured web-based games would work best for me as I work as a junior web developer and have experience with SQL and how to grab data from a SQL server and use it in a web page.
My question is how I host the SQL data: I have an old laptop kicking around and thought I could leave it running in my room as a basic SQL server, but is there more to it than that?
I can happily just install SQL Express on my laptop but does that then set up a location on my laptop that stores data? Or do I need to be looking for a small dedicated server unit?
I feel like I'm asking a question I should know the answer to but I guess it is down to a hole in my knowledge as to how SQL databases are stored etc.
So in conclusion, can i host a SQL server on my laptop? And is it achieved by simply installing SQL Express 2014 and creating a database and table set?
Worth also noting that the game will be small scale so I'm not looking for a rock solid solution with potential to scale up, just something to start off with.
Regards, Josh
whilst it would work, you would be better served getting it hosted on windows Azure, there are a number of free hostings availible for databases, the logistics of hosting at home become a little too much after a short period of time.
http://azure.microsoft.com/en-us/develop/net/aspnet/
Install SQL Express
Create a database and table using SQL Management Studio (Logging on to your local SQL express instance)
Set up port forwarding on your router, to forward incoming SQL traffic to the laptop.
Set up Dynamic DNS on your router. If your router does not support his, get a dyamic DNS update client and run it on the laptop.
Use the dynamic DNS and port that your forwarded, in your connection string to access it from "internet" hosted web page.
I recommend changing the incmoing port your are forwarding, to "hide" the SQL instance from the obvious port. I.e. Port In - > 7546 forwarded to laptop ip, on port 1433
You may need to do a bit of research on each point.. but it will really benefit you in learning about the above... I consider it crucial knowledge for a good developer to know what is happening "behind" the scenes...

How to copy structure of database in another database in sql server 2008? [closed]

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
i have a database and want to copy all the tables in new database without copying the dat of all those tables only structure should be copy
SQL Server Management Studio offers the following:
Scripting the whole database:
Under the Object Explorer, right mouse click on the database and then select Script Database as
To script just (specific) tables:
In Object Explorer, right mouse click on the database, select Tasks, then Generate Scripts, and then select the tables that you want.
You can then use the script to create a new database / new objects elsewhere. If you change the name of the database, remember to change the USE xxx statement(s) accordingly.
In SSMS for your first database right click on the datbaase name then "Script Database as" > "CREATE To" then choose your output location and run your script.
Edit:
Note you will need to amend the script to specify the new database name, replacing the existing one in the generated script (courtesy of Oded comment).
In the SQL server Management Studio you can right click the database -> tasks -> export data. Then follow the wizard..

Documentation for Jasperserver [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I installed Jasperserver in my PC using the Bitnami installer. It automatically installed MySql along with Jasperserver. Now I am lost on how to proceed in getting my data in and start generating reports. Is there any good documentation(I do not want to buy their paid documentation) available on the web?
Thanks...
Jasperserver is mainly an application to manage and administer your report resources. It helps in making reports more accessible and provides an web-interface to manage and execute the them. For this purpose it comes with its own mysql-based repository that is used to store metadata about your reports. This repository is completely unrelated to your actual report data, which might come from a variety of different sources such as mysql-datasources, mondrian-datasources, xmla-datasources, oracle-datasources, etc. The repository stores for example:
report database connections
image resources used by the report
report parameters along with user input controls, that are used in the web-frontend to parameterize your report execution
the report definition in XML
...
For the creation of the actual report you use iReports, which can connect to the jasperserver to get all the aforementioned metadata information. You then design your report
using the parameters and the datasource provided by jasperserver. On completion you upload your finished report to jasperserver. From there you can execute it and display the result in either HTML or alternatively export it to PDF, XLS, etc. Jasperserver also takes care of the scheduling of reports at a given time.
In your concrete case you would probably do the following steps:
log into the jasperserver webadmin interface (jasperadmin:jasperadmin by default)
Create a database connection resource in the repository that points to your report datasource (can be oracle, mysql, postgres, ... ).
Create a new report resource, and set the connection to the one you just created
fire up ireport, connect it to you jasperserver instance and open the report from the repository
design your report in ireport
upload your report back to jasperserver
execute the report via jasperserver's web-interface
more information under http://jasperforge.org/projects/jasperserver/docs
There is a whole bunch of documentation in the docs folder of the binary distribution. Also you have to understand that your data will not be in jasperserver. It can report off data in your database (whichever that is).
I would install iReport, start tomcat (and therefore jasperserver), connect to it in iReport and create a report.
http://community.jaspersoft.com/documentation
You probably have to sign up to download.
p/s : Well you know what, let me introduce you to my best friend. He always help me with this such things --> Mr.Google.