Author Topic: database locations  (Read 25610 times)

jenem

  • Full Member
  • ***
  • Posts: 154
database locations
« on: February 06, 2012, 04:58:43 am »
Hi All,

I wonder if someone can give me some advice on resetting test receipts.
I downloaded emres's script and it seemed to run ok. when I checked sambapos there were still some data there.
Do different sambapos databases exist for different  users ?
ie in my case two. admin and user

Should the script be run as admin

I run as a limited user most times and sometime switch to admin for some tasks.



Edgar



JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: database locations
« Reply #1 on: February 06, 2012, 05:46:04 am »
Edgar,

I wonder if someone can give me some advice on resetting test receipts.
I downloaded emres's script and it seemed to run ok. when I checked sambapos there were still some data there.
Which script?

Do different sambapos databases exist for different  users ?
ie in my case two. admin and user
No.

What SQL Server are you using?
« Last Edit: February 06, 2012, 05:57:23 am by JohnSCS »
SambaPOS - POS'n the World, one Terminal at a time.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: database locations
« Reply #2 on: February 06, 2012, 06:29:38 am »
Hi John,

I checked,  SQLCE databases are stored under each user. I have two.

Script used found here

http://forum2.sambapos.org/index.php/topic,60.msg251.html#msg251

Edgar

Addition screenshot
« Last Edit: February 06, 2012, 06:38:41 am by jenem »

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: database locations
« Reply #3 on: February 06, 2012, 06:48:47 am »
SQLCE databases are not designed for multiple computer/user use. Due to its structure, it is only suited to a single user.
SQL Express handles multiple users across multiple computers - a real networked solution.

If you log into your computer under two different logins, then yes you will have two SQLCE databases.

I re-wrote a SQL Express script based on Emre's dtran script, and it works well. The script removes all transactional data, leaving all products, actions, rules, menus, etc.

If you think you will need multiple concurrent access to the database, then install SQL Express 2008. This is a good guide http://doc.sambapos.org/doku.php/tr/dbase/sql_server_2008_express_edition_nasil_kurulur
SambaPOS - POS'n the World, one Terminal at a time.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: database locations
« Reply #4 on: February 06, 2012, 07:01:50 am »
Hi John,

At the moment I am still waiting for the go ahead from my brother and I'm not sure what he wants he only needs one user access.

I may install onto a server at home for practice.

I wonder if I can manually remove transaction data prior to installation on my brothers setup or would I use emre's script?

Edgar

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: database locations
« Reply #5 on: February 06, 2012, 07:23:37 am »
SQL Express 2008 runs fine on Win 7 - you don't need a server. I run Win 7 on an old Dell D620 Centrino laptop, with SQL Express 2005 and have the following running off
- 2x Full functional POS terminals (touch screen, thermal printer, pole display, cash drawer)
- 1x Server 2003 (testing 2003/XP usage)
- 1x iPod Touch (2Gen) - RDP
- 1x iPhone 4S - RDP
- 1x iPad - RDP

Personally, I have been setting up single terminals with SQL Express, as I bet the customer will want more terminals later, or an iPad.
To migrate from SQLCE to SQL Express can be done (I haven't tried yet), and really don't want the drama later.

Emre's script lists the tables that you need to empty data from - just don't use 'drop', use 'truncate' or 'delete' if you do it manually. It should work fine running the script. If you have problems, you can always email it to me and I can wipe the transactional data.

My only advise is that Microsoft SQL Servers tend to not release resources very well, and you should restart the system weekly to avoid running low on RAM.
SambaPOS - POS'n the World, one Terminal at a time.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: database locations
« Reply #6 on: February 06, 2012, 07:29:32 am »
Thanks John,
I'll install sql express and move database over. I'll let you know how I get on.

If I remember SQL Drop command remove the table doesn't it?

Edgar

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: database locations
« Reply #7 on: February 06, 2012, 07:34:46 am »
Get SQL Express 2008 from here http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=22973 - it has the management studio with it.
SQL 2008 RC2 Express http://www.microsoft.com/betaexperience/pd/SQLEXP08V2/enus/default.aspx - has both 32 & 64 Bit and also option to download with tools.


Yes, Drop removes a table  :)

I have attached my SQL Express script that I have been using with RazorSQL editor.
« Last Edit: February 07, 2012, 04:35:15 am by JohnSCS »
SambaPOS - POS'n the World, one Terminal at a time.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: database locations
« Reply #8 on: February 06, 2012, 09:23:30 am »
Thanks John,

Play later  :)

Edgar

jenem

  • Full Member
  • ***
  • Posts: 154
Re: database locations
« Reply #9 on: February 07, 2012, 02:43:58 am »
Hi John,

One issue that may throw people installing sql express on windows 7 is an error message saying product not compatible with windows 7.

You have to download sqlexpress sp3.

Another problem you may run into is setup asking you to browse for installation media.

I found it difficult look for it. On looking for a solution one suggestion was to rename .exe setup file to .zip and extract using 7zip.

I found 7zip could extract installation files without being renamed. I could then navigate to the downloaded extracted files and select them and installation would then continue.

Edgar

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: database locations
« Reply #10 on: February 07, 2012, 04:23:00 am »
Edgar,

Sorry, I don't know what happened to you - I never had that - It just installed, no issues. Fresh system, no updates loaded - not even Win 7 SP1.
The link I provided was recommended as it had the Management console in it for running the scripts and it is a 32Bit version.
You do get a warning if you install a 32Bit version on 64Bit Win 7.

Try this link to the newer SQL 2008 RC2 Express http://www.microsoft.com/betaexperience/pd/SQLEXP08V2/enus/default.aspx - has both 32 & 64 Bit and also option to download with tools.
Just installed (SQLEXPRWT_x64_ENU.exe - 64 Bit SQL Server Express Database w/tools) this one on one of the office computers with Win 7 64Bit + Win 7 SP1 - No issues at all.
« Last Edit: February 07, 2012, 04:36:35 am by JohnSCS »
SambaPOS - POS'n the World, one Terminal at a time.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: database locations
« Reply #11 on: February 07, 2012, 06:00:40 am »
Hi John,
I downloaded sql express sp3 from here.

http://www.microsoft.com/download/en/details.aspx?id=27597

It installed fine.

I done know why some people get an not compatable problem.

See here.

http://goneale.com/2009/05/24/cant-install-microsoft-sql-server-2008-management-studio-express/

Edgar

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: database locations
« Reply #12 on: February 07, 2012, 06:09:45 am »
Edgar,

That's why I updated the link to RC2 - it seems to have the fixes needed to get around the issues the earlier version of SQL 2008 Express had.
I just installed SQL 2008 Express RC2 on a new system with Win 7 32Bit (no updates at all - not even Win 7 SP1) and it installed with no issues.
SambaPOS - POS'n the World, one Terminal at a time.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: database locations
« Reply #13 on: February 07, 2012, 06:24:19 am »
I'll remember that John !!

Edgar

yousufjam

  • Newbie
  • *
  • Posts: 21
Re: database locations
« Reply #14 on: December 20, 2012, 11:54:46 am »


I re-wrote a SQL Express script based on Emre's dtran script, and it works well. The script removes all transactional data, leaving all products, actions, rules, menus, etc.


Where can i get this and instructions on how to use. Thanks