Showing posts with label apps. Show all posts
Showing posts with label apps. Show all posts

Sunday, March 11, 2012

Co-Existing with MSDE

Can SQL Express reside on the same server as MSDE and both run at the same time (different apps)?

I have one app that runs on MSDE and a new to be developed app by a vendor that needs SQL Express.

Thanks

JB

Yes, that is possible. When you start the SQL 2005 Express setup, it will detect the MSDE and ask if you wish to upgrade or install a new instance. Choose a new instance.

You may wish to read in Books Online about the topic: "Instance Naming Page"

Code Sample for SSIS Script Component

Greetings,

I have been developing VBA apps in Access and Excel for sometime and am fairly proficient in VBA. Now we are moving all of our data to SQL Server 2005. I am in need of learning how to write code for the Script Component of a data flow task. And so I have a couple of questions.

First, are there any books you recommend for learning ? (I'm not even sure what I need to learn: .NET? ADO.NET?)

And as a follow-up, any good websites that provide good reference documentation?

And my second question is more specific to my current problem. If I had a bit of code to get me started, I'm sure I could scream all the way to the bottom of the hill.

    Data source is coming from a sort task where the data is sorted by STATUS and then MOD_DATE and the AUDIT_ID. I need to read each row and compare it to the next row. If STATUS is the same, discard the second row. When STATUS is different, send the first row to the output (to be used by the next task in the data flow). Using the "different" row from step 3, go to step 2.

I know how to write if statements, case statements, for/next statements. I'm just not understanding how to read the rows in and then send them back out. I've been searching for some sample code but everything I find tends to be solving much bigger issues.

Any help you can provide would be much appreciated.

Rob

1.
Which kind of book do you need ? T-SQL or SQL-CLR integration ?
For T-SQL I suggest you to buy a good basic book from amazon (that ha a good rating) just to learn the basics and then the buy the following two monuments by Itzik Ben-gan (MS Press)
INSIDE SQL SERVER 2005: T-SQL QUERYING
INSIDE SQL SERVER 2005: T-SQL PROGRAMMING
They are really hard... I don't know anything better.
For the second I suggest PRO SQL SERVER 2005 ASSEMBLY by Dewson (Apress)

2.
http://www.sql-server-performance.com
http://www.sqlservercentral.com
Google...

3.
can you explain better ? are you trying to code it in T-SQL or are you trying with a CLR stored procedure ? In the second case to send back a row you may use Pipe.Send or Pipe.ExecuteAndSend methods.

__

? www.carlop.com × carlop-dev.blogspot.com

|||

carlop wrote:


3.
can you explain better ? are you trying to code it in T-SQL or are you trying with a CLR stored procedure ? In the second case to send back a row you may use Pipe.Send or Pipe.ExecuteAndSend methods.

carlop - thank you for the book suggestions. I'll check them out.

Here is a sample of data. I am after capturing each row when the STATUS changes (highlighted in yellow). A total of six rows: one each of Not Ready, Hold and Complete and three of Active. All of the other rows will be discarded.

I'm thinking this is best done with a CLR procedure, however, I'm open to suggestions.

Rob

AUDIT_ID OBJECTID MODIFIED_DATE STATUS 2753029 124248079 4/26/2007 11:30 Active 2753035 124248079 4/26/2007 11:30 Active 2753076 124248079 4/26/2007 11:33 Active 2754823 124248079 4/26/2007 14:31 Not Ready 2794102 124248079 4/27/2007 7:29 Not Ready 2817836 124248079 4/27/2007 17:06 Active 2817859 124248079 4/27/2007 17:09 Active 2818286 124248079 4/27/2007 18:00 Hold 2818473 124248079 4/27/2007 18:38 Active 2818483 124248079 4/27/2007 18:44 Active 2989403 124248079 5/1/2007 7:14 Active 3022521 124248079 5/1/2007 7:19 Active 3042121 124248079 5/1/2007 10:45 Complete 3082880 124248079 5/2/2007 7:07 Complete

Sunday, February 19, 2012

Clustering a standalone SQL server + storage array

Hi all, i'm wondering whether any of you clustering experts could help.
Our apps team look after a trading system that uses an HP DL360 server
running SQL 2000 SP3a with a few small databases on it. This is a critical
server as it stores trading system information, market orders etc.
A requirement has now arisen to cluster this machine with another similar
server and connect each to an HP Smart Array, with the SQL databases being
installed on that.
Is this possible? What will happen to SQL or the OSs when the systems are
clustered and the storage array attached and configured? I assume i'll have
to back up the databases, cluster then attach the storage, then restore the
databases to the array.
Any information would be greatly appreciated!
Thanks
Andoni
Andoni
I think the easiest and safest way to accomplish this will be to reinstall
the SQL Server once the cluster is complete. Once the server is complete you
can attach your datafiles or to restore them from a valid backup. If your
application makes changes to the master database you should consider to name
your virtual server as the current production server (after renaming the
current server of course) this way you may be able to reuse your master
database.
Have in mind that all datafiles MUST be on the shared disk(s) so consider to
have enough space on the Shared storage, because the cluster Can't use local
disk for sql server datafiles, only for binaries.
Hope this helps.
Regards
Fernando Rivas
|||Hello Andoni,
You can do this it’s quite straight forward follow the steps bellow, but
make sure you read about and peice that is not clear on books on line.
1.Install clustering on new machine we’ll call it svr1.
2.Install clustering on old server we’ll call it svr2 and the sql on it sql1.
3.Once you have clustering working and failover of the resource groups is
working as expected with out error your ready to install sql server. Now if
you installed a default instance first time around on svr2 so that sql1 is
default and your apps need to connect to a default instance then this will
not work. In that case you let me know.
4.Install sql as a clustered resource we’ll call it sqlcluster
5.Apply service pack.
6.At this point you have your clustered instance and your non-clustered
instance running at the same time.
7.Make sure the cluster instance is on svr2 so that server has control over
the shared disk.
8.Then backup your sql1 instance.
9.Move the logons from sql1 to sqlcluster.
10.Detach the first database your interested in and then copy the data and
log files to the data and log shared drives you setup as part of the cluster.
11.Then attatch the same files to the sqlcluster instance the fix any
orphaned logins.
12.The run dbcc checkdb(databasename) on the database.
13.Rebuild indexes and update stats on the database.
14.Test that the application can connect to the new instance sqlinstance.
15.If so then repeat steps 10-14 for each database.
16.Once the migration is done I would disable the old server and not
de-install quite yet.
I made a lot of assumptions about your level of knowledge so it’s a part is
to vague then let me know.
Hope this helps
John Vandervliet MCSE, MCTS
"Andoni" wrote:

> Hi all, i'm wondering whether any of you clustering experts could help.
> Our apps team look after a trading system that uses an HP DL360 server
> running SQL 2000 SP3a with a few small databases on it. This is a critical
> server as it stores trading system information, market orders etc.
> A requirement has now arisen to cluster this machine with another similar
> server and connect each to an HP Smart Array, with the SQL databases being
> installed on that.
> Is this possible? What will happen to SQL or the OSs when the systems are
> clustered and the storage array attached and configured? I assume i'll have
> to back up the databases, cluster then attach the storage, then restore the
> databases to the array.
> Any information would be greatly appreciated!
> Thanks
> Andoni