Showing posts with label box. Show all posts
Showing posts with label box. Show all posts

Sunday, March 25, 2012

ActiveX Script

I ran this activeX script with my DTS package. For debugging purpose I included the message box. The message is showing the actual name of the file but the the file name is not changing to the name display in the message box.

Function Main()
ms_year = year(date())
ms_month = month(date())
ms_day = day(date())
ms_date = ms_year & "_" & ms_month &"_" & ms_day & "_"

dim objFSO, strFullNm

set objFSO = CreateObject("Scripting.FileSystemObject")
strFullNm = DTSGlobalVariables("FilePathRoot").value & "\IMS_ALL_DONATIONS.txt"

'check to see if file exist and then concatenate the file
if objFSO.FileExists(strFullNm) then
strFullNm = DTSGlobalVariables("FilePathRoot").value & "\ " & ms_date & "IMS_ALL_DONATIONS.txt"
MsgBox "This is the new filename: " & strFullNm
else MsgBox "File does not exist"
end if

set objFSO = nothing
Main = DTSTaskExecResult_Success
End FunctionUm, I'm not sure exactly what you are trying to achieve here.

You say the correct filename is being displayed but strFullNm is not being set to the right value, is that right??

After you display strFullNm what are you doing with it? Looking at the code you have there you aren't doing anything with it at all and it will be discarded. Are you trying to rename a file or move a file or something?

Saturday, February 25, 2012

Account used for sql 2005, x64, " lock pages in memory" option

Our sql 2005, x64, box, has 9GB of RAM and the sql server account is the "local system account". I opened the group policy editor to give that account "lock pages in memory" permission but I couldn't find that account in the "Add User or Group" pane of the policy editor. I did find something called "local service group" though it does not appear to exist as a local group or user on the box.

1. Do I need to create a domain user for this purpose?

2. Do the other services (e.g. Analysis Services, Integration Services, etc) also need to run under an account that has "lock pages in memory" privelage?

TIA,

barkingdog

Hey Dog,

I assume you want to do this because you are going to enable AWE?

1. You should not have to add Local System to this Policy because Local System pretty much owns the server, but you can add it by double clicking the policy>add user> and then type in SYSTEM and click OK. Make sure the Locations box is pointing to your local server and not to the domain when you do this.

2. I'm not sure but if they are both running under Local System as well then you should be covered by performing step 1.

|||

Andy,

Thanks, didn't know that stuff.

Also from what I understand (from Slava's blog) there is no need to enable AWE on an x64 machine with 64-bit OS and 64-bit sql 2005. (If you are interested I can probably find the URL to Slava's blog

Barkingdog

|||

Hey dog,

Yeah I do seem to remember that discussion but for some reason I remain skeptical

The reason I say that is I have an x64 server with 16GB of RAM and just for kicks I enabled AWE at 6144MB of RAM and after a month of running the server, SQL Server has never consumed more than 6GB of RAM, hhhmmm..

I'll have to do some more testing to see what the scoop is.

Thursday, February 16, 2012

Accessing SQL Svr 2000 on NT4 box

We have recently upgraded our web server to Windows 2000 and loaded the .net platform. I have starte creating ASP.net programs, but our database server that houses the Sequel Server 2000 database is running on NT4. We are waiting for the money to be approved for a new database server with Windows 2000. Is it OK to be accessing sequel server on a NT4 machine from an ASP.net program? I have the connection to the server set up in the web.config file.

This database server hung up for no apparent reason this weekend and had to be rebooted. Only I have access to the new ASP.net pages and was testing them for the first time this last friday.

Thanks for your help!
JimHi Jim,

Sure, it's fine. I run ASP.NET apps that access NT boxes with no problem. I'd love to upgrade them, but such things are not always under my control, alas.

Don

Thursday, February 9, 2012

Accessing one db by two sql server instances (eg. native vs vmware)

Hi there
As many people do nowadays, I have 2 XP installations on my laptop -
one
running natively and one in vmware box running on ubuntu (situation
even more common with osx on intelmacs).
Since I would like to be able to work on same development projects in
both these environments, depending on the situation, I was wondering
how should I cope with DBs synchronization between two sql server
instances running under those two environments.
The simplest solution would be deploy the database in native windows
sql server installation, and attach the _same_ database files when
running from vmware (via sharing their folder on mounted ntfs
partition). So the DB files would attached to two servers, but of
course they would never be accessed at the same time.
Would it be possible at all without any data corruption assuming I
would run the same server versions (same SPs applied etc. - for the
time being it's 2kSP4)?
thanks
HP> So the DB files would attached to two servers, but of
> course they would never be accessed at the same time.
This should work fine. Regular backups won't hurt either.
Note that the Best Practice in development is to keep database DDL scripts
under source control rather than only in a physical database.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"HP" <ha5en1@.gmail.com> wrote in message
news:1187778620.953857.97210@.x40g2000prg.googlegroups.com...
> Hi there
> As many people do nowadays, I have 2 XP installations on my laptop -
> one
> running natively and one in vmware box running on ubuntu (situation
> even more common with osx on intelmacs).
> Since I would like to be able to work on same development projects in
> both these environments, depending on the situation, I was wondering
> how should I cope with DBs synchronization between two sql server
> instances running under those two environments.
> The simplest solution would be deploy the database in native windows
> sql server installation, and attach the _same_ database files when
> running from vmware (via sharing their folder on mounted ntfs
> partition). So the DB files would attached to two servers, but of
> course they would never be accessed at the same time.
> Would it be possible at all without any data corruption assuming I
> would run the same server versions (same SPs applied etc. - for the
> time being it's 2kSP4)?
> thanks
> HP
>