Showing posts with label alli. Show all posts
Showing posts with label alli. Show all posts

Monday, March 26, 2012

How Detect SMO is installed?

Hi all

I'm using Microsoft.SqlServer.Management.Smo namespace for retrieve a list of avaible SQL Servers.

The problem is when SMO is not installed in the client machine. The application crashes although I put the command in a try - catch block.

try { DataTable dtSQLServers = SmoApplication.EnumAvailableSqlServers(false); }

catch { notInstalled = true }

Are there any easy way to know if SMO is installed , so i can advice the user that he must install SMO first?

Thanks.

You either have to lookup the file references assembly or use a component to check the reference to the GAC: http://www.codeproject.com/dotnet/Assemblydependencies.asp?df=100&forumid=31276&exp=0&select=977211

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

Monday, March 12, 2012

How can we handle terabyte of data?

Hi All
I have some questions to ask, in case some company have terabyte of data in the production server which online 24X7.
1)How can they backup database? Do they use backup database complete into disk? or Tape? How can they verify the backup? How frequent that needs?
2)How can they handle disaster recovery? Is Log shipping and Clustering is good enough?
3)In case need to change some stored procedures or trigger. Do they upload to test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria that should be consider?
4)In case they have already tested in DEV box and want to implement in the online production, How can they minimize the problem if it does occur?
I am sorry to ask a lots of questions. If you can answers item by item or suggest the good resources, this will be the great for me.
Thanks you in advances,
James Jarupan
I'm hoping you can partition your data in the case below.
We did and utilized parititioned views heavily. Breaking apart tables/dbs
when they grew beyond 250 GB so instead of 1 TB DB there were 4 250 GB DBs.
So if 1 DB went down it could be restored in smaller timeframe than 1DB of
TB size. Besides you can backup much faster.
Later we got SAN solutions and size of DB ceased to be so much of an issue
for backup purposes.
Optimizing procs for production is always difficult in such cases, before
releasing the proc to live production box the DBA again performed the actual
execution plan and the estimated execution plan for optimization. You would
still need to follow the Dev- Test- Production box test methodology to
capture most issues.
"James Jarupan" <James@.vincosoft.com> wrote in message
news:5F71E190-F3ED-40E9-8DBF-EC1091D196F2@.microsoft.com...
> Hi All
> I have some questions to ask, in case some company have terabyte of data
in the production server which online 24X7.
> 1)How can they backup database? Do they use backup database complete into
disk? or Tape? How can they verify the backup? How frequent that needs?
> 2)How can they handle disaster recovery? Is Log shipping and Clustering is
good enough?
> 3)In case need to change some stored procedures or trigger. Do they upload
to test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria
that should be consider?
> 4)In case they have already tested in DEV box and want to implement in the
online production, How can they minimize the problem if it does occur?
> I am sorry to ask a lots of questions. If you can answers item by item
or suggest the good resources, this will be the great for me.
> Thanks you in advances,
> James Jarupan
>
|||Thanks you so much.

How can we handle terabyte of data?

Hi All
I have some questions to ask, in case some company have terabyte of data in
the production server which online 24X7.
1)How can they backup database? Do they use backup database complete into di
sk? or Tape? How can they verify the backup? How frequent that needs?
2)How can they handle disaster recovery? Is Log shipping and Clustering is g
ood enough?
3)In case need to change some stored procedures or trigger. Do they upload t
o test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria t
hat should be consider?
4)In case they have already tested in DEV box and want to implement in the o
nline production, How can they minimize the problem if it does occur?
I am sorry to ask a lots of questions. If you can answers item by item or su
ggest the good resources, this will be the great for me.
Thanks you in advances,
James JarupanI'm hoping you can partition your data in the case below.
We did and utilized parititioned views heavily. Breaking apart tables/dbs
when they grew beyond 250 GB so instead of 1 TB DB there were 4 250 GB DBs.
So if 1 DB went down it could be restored in smaller timeframe than 1DB of
TB size. Besides you can backup much faster.
Later we got SAN solutions and size of DB ceased to be so much of an issue
for backup purposes.
Optimizing procs for production is always difficult in such cases, before
releasing the proc to live production box the DBA again performed the actual
execution plan and the estimated execution plan for optimization. You would
still need to follow the Dev- Test- Production box test methodology to
capture most issues.
"James Jarupan" <James@.vincosoft.com> wrote in message
news:5F71E190-F3ED-40E9-8DBF-EC1091D196F2@.microsoft.com...
> Hi All
> I have some questions to ask, in case some company have terabyte of data
in the production server which online 24X7.
> 1)How can they backup database? Do they use backup database complete into
disk? or Tape? How can they verify the backup? How frequent that needs?
> 2)How can they handle disaster recovery? Is Log shipping and Clustering is
good enough?
> 3)In case need to change some stored procedures or trigger. Do they upload
to test in DEV Boxes? In case DEV box have only 80 GB? What is the criteria
that should be consider?
> 4)In case they have already tested in DEV box and want to implement in the
online production, How can they minimize the problem if it does occur?
> I am sorry to ask a lots of questions. If you can answers item by item
or suggest the good resources, this will be the great for me.
> Thanks you in advances,
> James Jarupan
>|||Thanks you so much.

Wednesday, March 7, 2012

How can I use stored procedure's recordset output into simple SELECT statement?

Hi All
I have one stored procedure called MY_SP that returns a recordset. I would
like to use this recordset output into my SELECT statement like this:
SELECT * FROM (EXEC MY_SP '1', '2') RS
The above blurs up with syntax error at EXEC. Is there a way to achieve
this? (Note that MY_SP takes few parameters)
Thanks in advance.
NayanI don't understand why don't you just call EXEC MY_SP '1', '2'?
Perayu
"Nayan Mansinha" <nmansinha@.icode.com> wrote in message
news:%23ddMQp5RGHA.3972@.TK2MSFTNGP10.phx.gbl...
> Hi All
> I have one stored procedure called MY_SP that returns a recordset. I
> would like to use this recordset output into my SELECT statement like
> this:
> SELECT * FROM (EXEC MY_SP '1', '2') RS
> The above blurs up with syntax error at EXEC. Is there a way to achieve
> this? (Note that MY_SP takes few parameters)
> Thanks in advance.
> Nayan
>|||thanks for asking
The example I have included is for the purpose of getting my problem across
to the audience. I agree with you that if I need to do something as simple
as quoted, I would rather do it your way. I'm actually trying to further
create a complex query using SELECT that will require data from this SP.
I hope I have made my question little more clearer.
TIA
Nayan
"Perayu" <yu.he@.state.mn.us.Remove4Replay> wrote in message
news:eJMwRI6RGHA.5900@.tk2msftngp13.phx.gbl...
>I don't understand why don't you just call EXEC MY_SP '1', '2'?
> Perayu
> "Nayan Mansinha" <nmansinha@.icode.com> wrote in message
> news:%23ddMQp5RGHA.3972@.TK2MSFTNGP10.phx.gbl...
>|||Use Temp table to store the resultset from MY_SP is one option.
Perayu
"Nayan Mansinha" <nmansinha@.icode.com> wrote in message
news:eC%235CQ6RGHA.4976@.TK2MSFTNGP11.phx.gbl...
> thanks for asking
> The example I have included is for the purpose of getting my problem
> across to the audience. I agree with you that if I need to do something
> as simple as quoted, I would rather do it your way. I'm actually trying
> to further create a complex query using SELECT that will require data from
> this SP.
> I hope I have made my question little more clearer.
> TIA
> Nayan
> "Perayu" <yu.he@.state.mn.us.Remove4Replay> wrote in message
> news:eJMwRI6RGHA.5900@.tk2msftngp13.phx.gbl...
>|||Thanks Perayu for your quick response.
The temp table option will work fine but what if I dont have permission to
modify the said SP? In that case, what would be my options?
thanks again for your ideas.
Nayan
"Perayu" <yu.he@.state.mn.us.Remove4Replay> wrote in message
news:OfZwUV6RGHA.5656@.TK2MSFTNGP11.phx.gbl...
> Use Temp table to store the resultset from MY_SP is one option.
> Perayu
> "Nayan Mansinha" <nmansinha@.icode.com> wrote in message
> news:eC%235CQ6RGHA.4976@.TK2MSFTNGP11.phx.gbl...
>|||On Tue, 14 Mar 2006 15:59:52 -0500, Nayan Mansinha wrote:

>Thanks Perayu for your quick response.
>The temp table option will work fine but what if I dont have permission to
>modify the said SP? In that case, what would be my options?
Hi Nayan,
You don't have to modify the SP. You can insert the results of the SP in
a tem table, then use that in your later queries:
CREATE TABLE #Reults
(Col1 some_datetype NOT NULL,
..)
INSERT INTO #Results (Col1, ...)
EXEC EXEC MY_SP '1', '2'
Hugo Kornelis, SQL Server MVP|||In light of your other posts, rewrite the stored procedure as a table
returning function and then you can easily use it in the FROM part of a
SELECT statement.|||Hi Hugo.
Thanks for replying.
I already did this earlier but wanted know if there is a simpler way that
can allow me to pipe-in the resultset from an SP without first creating the
table.
thanks again.
Nayan
"Hugo Kornelis" <hugo@.perFact.REMOVETHIS.info.INVALID> wrote in message
news:r7le129b97pr04pcafqo0boti13qba0945@.
4ax.com...
> On Tue, 14 Mar 2006 15:59:52 -0500, Nayan Mansinha wrote:
>
> Hi Nayan,
> You don't have to modify the SP. You can insert the results of the SP in
> a tem table, then use that in your later queries:
> CREATE TABLE #Reults
> (Col1 some_datetype NOT NULL,
> ...)
> INSERT INTO #Results (Col1, ...)
> EXEC EXEC MY_SP '1', '2'
> --
> Hugo Kornelis, SQL Server MVP|||Hi JeffB
I understand your solution. What I'm looking at is how can I directly call
the stored procedure in the FROM part of the SELECT statement. I hope the
answer to this is not "NO" - cant use a stored procedure in the FROM part!
Thanks for the reply
Nayan
"JeffB" <jeff.bolton@.citigatehudson.com> wrote in message
news:1142374607.563351.82890@.i40g2000cwc.googlegroups.com...
> In light of your other posts, rewrite the stored procedure as a table
> returning function and then you can easily use it in the FROM part of a
> SELECT statement.
>|||I don't believe that you can. This is what a function that returns a
table is for.