112 medlemmar
18 medlemmar
7 medlemmar
55 medlemmar
58 medlemmar
Started Okt. 15, 2009
Startade den här diskussionen. Senaste svar av Jarle Skogheim Feb. 20, 2009.
Started Feb. 1, 2009
Startade den här diskussionen. Senaste svar av Rolf Granlund Feb. 13, 2009.
Andreas Kviby har inte fått några presenter ännu
Upplagd den 20 Augusti 2010 klockan 0.07 —
Upplagd den 6 April 2010 klockan 16.09 —
Upplagd den 21 Februari 2010 klockan 13.00 ‚Äî 1 Inlägg
Upplagd den 8 Februari 2010 klockan 21.30 —
Upplagd den 2 Februari 2009 klockan 12.32 ‚Äî 2 Inlägg
Fick äran att låna en Dell Latitude XT2 från Tankbar - Webbyrån i Nyköping (www.tankbar.com) och det resulterade i ett tekniktest som jag verkligen kan rekommendera er tekniknördar att läsa.
I have been searching and wanting a good but simple backup solution for all my SQL Server 2008 and SQL Server 2005 databases in the free Express edition. There is as you know no maintainance plans in the express editions and they are not backed up correctly by server software built in your server os. So finally I did stumble upon a really great solution which I modified a bit and will share here for all my friends and others to use.
The whole idea is to backup all databases inside a named instance and also to keep track on how many days you want to save the backed up files.
I use this for my local SharePoint backups and also three servers with SQL Server. Fantastic!
My folderstructure looks like above and you can ofcourse name files and scripts and folders the way you want it.
I have a folder on my root drive or data drive on my server called sqlbackup. Inside that folder I have the above structure setup. I also have a subfolder called dbfiles and in that folder all my backups will be stored.
First of all we create the backupscript.sql file and it should look like the below file contents.
DECLARE @dateString CHAR(12), @dayStr CHAR(2), @monthStr CHAR(2), @hourStr CHAR(2), @minStr CHAR(2)
--month variable
IF (SELECT LEN(CAST(MONTH(GETDATE()) AS CHAR(2))))=2
SET @monthSTR=CAST(MONTH(GETDATE()) AS CHAR(2))
ELSE
SET @monthSTR= '0' + CAST(MONTH(GETDATE()) AS CHAR(2))
--day variable
IF (SELECT LEN(CAST(DAY(GETDATE()) AS CHAR(2))))=2
SET @daySTR=CAST(DAY(GETDATE()) AS CHAR(2))
ELSE
SET @daySTR='0' + CAST(DAY(GETDATE()) AS CHAR(2))
--hour variable
IF (SELECT LEN(DATEPART(hh, GETDATE())))=2
SET @hourStr=CAST(DATEPART(hh, GETDATE()) AS CHAR(2))
ELSE
SET @hourStr= '0' + CAST(DATEPART(hh, GETDATE()) AS CHAR(2))
--minute variable
IF (SELECT LEN(DATEPART(mi, GETDATE())))=2
SET @minStr=CAST(DATEPART(mi, GETDATE()) AS CHAR(2))
ELSE
SET @minStr= '0' + CAST(DATEPART(mi, GETDATE()) AS CHAR(2))
--name variable based on time stamp
SET @dateString=CAST(YEAR(GETDATE()) AS CHAR(4)) + @monthStr + @dayStr + @hourStr + @minStr
--=================================================================
DECLARE @IDENT INT, @sql VARCHAR(1000), @DBNAME VARCHAR(200)
SELECT @IDENT=MIN(database_id) FROM SYS.DATABASES WHERE [database_id] > 0 AND NAME NOT IN ('TEMPDB')
WHILE @IDENT IS NOT NULL
BEGIN
SELECT @DBNAME = NAME FROM SYS.DATABASES WHERE database_id = @IDENT
/*Change disk location here as required*/
SELECT @SQL = 'BACKUP DATABASE '+@DBNAME+' TO DISK = ''c:\sqlbackup\dbfiles\'+@DBNAME+'_db_' + @dateString +'.BAK'' WITH INIT'
EXEC (@SQL)
SELECT @IDENT=MIN(database_id) FROM SYS.DATABASES WHERE [database_id] > 0 AND database_id>@IDENT AND NAME NOT IN ('TEMPDB')
END
Remember to change the path c:\sqlbackup\dbfiles in the script above if you change your path!
So the sqlscript will backup all databases in a named instance and save them to the dbfiles folder marked with date and time.
Now we will create the clearbackup.vbs script that will delete backup files older than x days in the dbfiles folder.
On Error Resume Next
Dim fso, folder, files, sFolder, sFolderTarget
Set fso = CreateObject("Scripting.FileSystemObject")
'location of the database backup files
sFolder = "c:\sqlbackup\dbfiles"
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
'used for writing to textfile - generate report on database backups deleted
Const ForAppending = 8
'you need to create a folder named “scripts” for ease of file management &
'a file inside it named “LOG.txt” for delete activity logging
Set objFile = fso.OpenTextFile("c:\sqlbackup\LOG.txt", ForAppending)
objFile.Write "================================================================" & VBCRLF & VBCRLF
objFile.Write " DATABASE BACKUP FILE REPORT " & VBCRLF
objFile.Write " DATE: " & FormatDateTime(Now(),1) & "" & VBCRLF
objFile.Write " TIME: " & FormatDateTime(Now(),3) & "" & VBCRLF & VBCRLF
objFile.Write "================================================================" & VBCRLF
'iterate thru each of the files in the database backup folder
For Each itemFiles In files
'retrieve complete path of file for the DeleteFile method and to extract
'file extension using the GetExtensionName method
a=sFolder & itemFiles.Name
'retrieve file extension
b = fso.GetExtensionName(a)
'check if the file extension is BAK
If uCase(b)="BAK" Then
'check if the database backups are older than 5 days
If DateDiff("d",itemFiles.DateCreated,Now()) >= 5 Then
'Delete any old BACKUP files to cleanup folder
fso.DeleteFile a
objFile.WriteLine "BACKUP FILE DELETED: " & a
Else
objFile.WriteLine "BACKUP FILE IS STILL CURRENT: " & a
End If
End If
Next
objFile.WriteLine "================================================================" & VBCRLF & VBCRLF
objFile.Close
Set objFile = Nothing
Set fso = Nothing
Set folder = Nothing
Set files = Nothing
Change the x number of days to match you wishes!
Create a textfile called log.txt in the folder so that the script can append logs to it. The logfile will contain the log for backing up files and deleting old backup files.
Now we will create the command batch file that we can schedule on the server to execute whenever we feel neccessary.
The file will look like below.
REM Run TSQL Script to backup databases
sqlcmd -S AKVIBY\SQLEXPRESS -E -i"c:\sqlbackup\backupscript.sql"
REM Run database backup cleanup script
c:\sqlbackup\clearbackup.vbs
Remember to change instance and path to match your settings!
So schedule your runsqlbackups.cmd and it will backup all your files and store them in dbfiles folder which you can make sure is backed up on regular times by your server backup system.
When you run the scheduled task you will se a command prompt like below.
If everything is setup okey you will also find all backups inside the dbfiles folder.
Like my local backups you can see above I then mark the dbfiles folder as an Live Mesh folder and all backed up.
That’s all folks!
I will start a step by step tutorial here which will learn you how to send e-mails from Microsoft Outlook to SharePoint.
Until then you can test the product that we made to accomplish this in real life.
Try it for free, goto www.spapi.com and the Downloads section.
The tutorial will start on the 16th of october, next week.
Last week me and my new work announced the first Beta of MailDropper for SharePoint. We are now looking for beta testers all around the world from single users to large corporate organizations.
We will provide you with the software, instructions and a testpaper that you will have to fill out (Only one page!).
So mail me at andreas@bestpromotion.se or ak@gkviby.com and I will contact you and send you the software.
For thoose of you that do not know what MailDropper do take a look at www.spapi.com for more information and screenshots.
Jag hade missat att förlänga abonnemanget på eget domän på NING Networks och idag slutade det att fungera.
Men nu är det förlängt ett tag till så nu hoppas jag att den nya plattformen kommer till liv under oktober.
Jag ber om ursäkt!
MailDropper for SharePoint is finally out for testing on the market and the interest is very high. With the help of MailDropper for SharePoint it will be easy to send one or more e-mails from Microsoft Outlook into SharePoint.
MailDropper allows you to configure lists you want to send emails to and save these settings as favorites.
MailDropper also takes the entire original message including attachments and formatting and stores it as an attachment to each item in SharePoint.
This means that anyone can search, view and open email messages in SharePoint sent from Microsoft Outlook.
The configuration files can be distributed by Group Policy tools for larger organizations, including the license keys. MailDropper for SharePoint is a unique product that is easier and faster than those on the market. Simplicity and speed is our motto and in MailDropper, we have combined these things and managed to build a stable software that many have requested.
Another important thing to MailDropper for SharePoint is that we will only sell it through resellers. We are now looking for retailers who want to offer their customers this product and are interested in working with a product that offers functionality that your customers do not have and want, and margins that make the deal very interesting.
Buy 5-pack for only $ 1.240 from a reseller near you.
Buy UNLIMITED USERS license and install within your organization on all computers for as little as $ 15.600 from a reseller near you.
Go to www.spapi.com for more information on MailDropper for SharePoint and contact us directly if you want to become a retailer. All retailers get free access to customized versions that have the retailer's logo and contact information in the product.
Best regards
Andreas Kviby
Well it was not one of the posts I planned to write when the new year bells told everyone it’s 2009! But here I am, just got canned due to lack of work. Love the company Human Data and wish them my best in the future and maybe our roads will cross once again sometime in the future.
I have never got canned before in my life so this is new to me. I have always made a choice to move on, to upgrade my CV or just try to make the world a better place :)
When you get canned you must suddenly plan for your future between 8 and 5 working days, strange feeling huh?
I just realized that I am made to carry out smaller and shorter projects within ASP.NET, ASP.NET MVC, C#, VB.NET, SQL Server or other technologies like Windows Forms development or even development of a new application for Windows Mobile. I am fast and accurate in those kind of projects but I am not made for long term projects. So anything between 20 and 150 is my kind of case.
My knowledge is deep and wide, I have been developing apps for the Microsoft world ever since VB got released on diskettes a while ago :) I have spent my whole life with VB and speak and write VB and VB.NET fluently.
I now work almost fluent in both C# and VB.NET and have focused a couple of years now on SharePoint development. Just started to make some stuff in ASP.NET MVC and with my Ruby on Rails background I can tell you folks, it rocks!
If you need a consultant anywhere in the world, send me an e-mail (ak@gkviby.com) and you will get my CV back and my pricelist.
I take on jobs from the 1st of august 2009.
SharePoint och Exchange forum, seforum! Missa inte årets upplaga som både innehåller nördspår och vanliga spår.
Lär mer på www.seforum.se!
Passa på att anmäla er innan den sista juni och spara pengar.
SharedView is another small and neat freeware from Microsoft. It allows you to start a session with maximum of 15 attenders and share what window you like. You can even upload handouts to the people.
My first idea is ofcourse to start using this for the work with SharePoint Community Sweden and also to be able to arrange online classes. I think this is a great tool and I hope that we will see to cool testing of here soon.
http://connect.microsoft.com/site/sitehome.aspx?SiteID=94
I have been struggling with this task for a while in my development projects. The task is how to include JavaScript and CSS files in your Web Part project. There are tons of quick and dirty solutions but I decided to find a smoother way to include them.
This is my solution.
I created a new class in Visual Studio 2008 and found these two excellent functions. RegisterCSS and RegisterScript. It wasn’t invented by me but I still feel I have to share this because I know that a lot of people find this hard to do.
So from my Web Part code I just call the RegisterCSS and send in the path to the CSS file and the this object to make sure the code gets added to the right Web Part.
When I run this code inside any Web Part project it will add and put the CSS and the JavaScript at the right place and it all works like a charm.
If you would like to extend this you should ofcourse make it a Web Part Editable setting where to find the CSS and the JavaScript and my recommendation is to use a standard Document Library to store them in and then let the user choose Document Library and then the particular file. Neat!
Thanks for this time!
Välkommen till
SharePoint Community Sverige
Registrera dig
eller Logga In
© 2010 Skapad av Andreas Kviby
Drivs med tekniken bakom
.
Kommentarplank (1 inlägg)
Du måste vara medlem i SharePoint Community Sverige för att lägga till kommentarer!
Gå med i SharePoint Community Sverige