Showing posts with label bear. Show all posts
Showing posts with label bear. Show all posts

Wednesday, March 21, 2012

from test environment to web hosting company

I must be missing something, and its starting to fusterate me. Bear with me here.

I created a site for a ...client I guess you'd call it, and made this really slick newletter generator thing. The people from the web enter in their info, and if they want, they sign up for a newsletter -- all tied into a db, 1 table, 4 stored procedures, REALLY simple stuff. They insisted I used a certain webhost which, on paper, looks like it will fit the bill. I'm starting to question that.

On top of the newsletter thing, I created an aspnetdb for the "administration" side of it for her to log into and send out the newsletter so total, there's 2 dbs in the app_data folder. Locally, it works GREAT and on my test box (iis6) that is running 2k5 express. The webhost runs sql2k in (what I consider) a bastardized way. Can't use the management studio, can't use anything except a really weak web-based interface which adds to my fusteration.

Anyway, my questions : 1, is there a way to make the mdf files work with sql2k without having to re-do the whole thing and 2, if I have to redo it, does anyone have an example connection string that might help out?

Fubarian:

Can't use the management studio, can't use anything except a really weak web-based interface which adds to my fusteration.

Did you mean you can only access the SQL2K instance through web? If you have login to the SQL2K, you can register the SQL2K intance in Management Studio by using your account.

1. From your description I understand your website is using attached database file under your app_data. As I know the database you're using should be version 9.0, that means it can be used in SQL2005 or SQLExpress instance, but not SQL2K instance. You can check the version by right clieck the databasefile in Server Explorer->New query-> execute 'SELECT @.@.version'. So you have to transfer the tables in the database files into a database on the SQL2K instance. You can do this by using Import/Export Wizard.

2. The 2nd thing you need to do is change the connection string to point to the SQL2K instance. You can refer to this post:

http://forums.asp.net/thread/1281242.aspx

From one server to another

Bear in mind that I am just a beginner and ingorance is bliss!

Two questions

1. Could someone tell me the most efficient (and easiest) way to move summurize and move data from one db on server A to another db on serverB. This process needs to run on an hourly basis.

If they were on the same server I would create a job under Management and use this code.

INSERT INTO tblNewTable
SELECT SUM(thiscolumn), SUM(thatcolumn), SUM(ETC)
FROM tblOld
WHERE columnDateTime > (SELECT MAX(columnDateTime) FROM tblNewTable)
GROUP BY DATEPART(hh, columnDate), Line, Shift

My problem is I THINK that you have to script the connection between the two severs and I dont know how to do this.

2. In tblNewTable, the data is used to report machine efficency for each line and shift. The problem is that the 3rd shift begins at 11PM, but its production is applied to the following day. I have used

WHERE columnDateTime >= DATEADD(hh, -1, StartDate) AND columnDateTime <= DATEADD(hh, -1, EndDate)

and leave off the GROUP BY columnDateTime to get the shift's data together.

Is it possible for 11 to 12 PM to be brought in as the following days date?

Thanks,
LeeQ1 [Do I have to script] the connection between the two severs? and I how [do I] do this.
A1 You might want to use linked servers (you could use osql if you really want to script a connection).

Q2 Is it possible for 11 to 12 PM to be brought in as the following days date?
A2 Yes, but you will need to code the logic to do so. (case and / or if statements, etc.)