Friday, March 30, 2012
help in crystal report & dataset
In my application I have 2 form named Form1 and Form2.
I create one dataset named ds in Form1 and in Form2 I want to creat a crystal report that displays the data in the dataset ds in Form1.
I relly get stuck.Can anyone help me?
Thanx b4 hand!See if you find answer here
www.asp.net
http://support.businessobjects.com/sql
Help How Make Backup and Restore ?
I need make Backup from specific tables of my database and my application send this file by mail to other users that restore this information in yours Database.
How i can do it (i dont know the specifics commands to backup and Restore)
Other question
if I only backup the log file and restores this in other database
I'll have the same information in all users ?
Help me please
Thanks in AdvanceCheck BOL on the syntax. You can place your specific tables on filegroups and have your users restore those filegroups after initial full db restore.|||Check BOL on the syntax. You can place your specific tables on filegroups and have your users restore those filegroups after initial full db restore.
Excuse me, but i don't understand what is BOL. ?
How i said i'm newbie.|||Books
On
Line|||Originally posted by rdjabarov
Books
On
Line
Thanks, I will Try.|||I connect like database admin and
try to make differential backup using this command
1- Back up Database Cyber to XXX With Differential
2- Back up Log Cyber to XXX
The to test the back up
I run then this restore command
1- Restore database Cyber from XXX with norecovery and
2- Restore Log Cyber from XXX with recovery.
All is perfect
I close the connection
When I try to connect to Cyber database the server send me this message
Server Msg 927, Level 14 State 2
Database Cyber Cannot Be opened. It is in the middle of restore ?
Why the database cannot be opened ?
Thank In advance
Franklin|||Are you trying to open it from Enterprise Manager? I suspect that if you right-mouse click on Databases folder and select Refresh, - you won't get this error.|||I'm trying to open from query analizer, because my application must be do it (the backup - restore) using transaq - sql.
thanks
franklin
Originally posted by rdjabarov
Are you trying to open it from Enterprise Manager? I suspect that if you right-mouse click on Databases folder and select Refresh, - you won't get this error.sql
Wednesday, March 28, 2012
Help for printing reports programatically
I have developed a application which create the report and save it in
user selected location.
All this i done in one class. this application shows all the reports on
report server and render the report for user selected parameters. and
save it with folder browser option on a location. file name is report
name.
Now i have to write another class which will take this saved file name
as input and print that.
i found only printing method for a particular report but i dont want to
again render that report in print class. i have sen the available
articles on net which takes the report name and render it and print
that.
how i can access that saved file in another class and if i have to
again render that report then how i can pass those parameters value
again in render method in print class.
But for my application i have already render that report, so any one
please tell me how i can do that.
Thanks & Regards
DineshDinesh,
This is just a suggestion - what if you saved the report as a pdf file ?
Displaying a pdf file from a location on the hard disk doesn't need the
report engine anymore.
"Dinesh" <dinesht15@.gmail.com> wrote in message
news:1164717797.911571.169550@.j72g2000cwa.googlegroups.com...
> Hi.....
> I have developed a application which create the report and save it in
> user selected location.
> All this i done in one class. this application shows all the reports on
> report server and render the report for user selected parameters. and
> save it with folder browser option on a location. file name is report
> name.
>
> Now i have to write another class which will take this saved file name
> as input and print that.
> i found only printing method for a particular report but i dont want to
> again render that report in print class. i have sen the available
> articles on net which takes the report name and render it and print
> that.
>
> how i can access that saved file in another class and if i have to
> again render that report then how i can pass those parameters value
> again in render method in print class.
>
> But for my application i have already render that report, so any one
> please tell me how i can do that.
>
> Thanks & Regards
> Dinesh
>|||hi Andrei.......
Thanks for your reply.....
Ya you are right......It will not require report engine
again........
i want to know only that how i can print that saved file which is saved
in hard disk.
My problem is that i wrote print function in a seprate class. at that
place i am not able to access that file name with full path.......how
i can do this.......
if you know this please tell me..........
Thanks & Regards
Dinesh
Andrei wrote:
> Dinesh,
> This is just a suggestion - what if you saved the report as a pdf file ?
> Displaying a pdf file from a location on the hard disk doesn't need the
> report engine anymore.
> "Dinesh" <dinesht15@.gmail.com> wrote in message
> news:1164717797.911571.169550@.j72g2000cwa.googlegroups.com...
> > Hi.....
> >
> > I have developed a application which create the report and save it in
> > user selected location.
> >
> > All this i done in one class. this application shows all the reports on
> > report server and render the report for user selected parameters. and
> > save it with folder browser option on a location. file name is report
> > name.
> >
> >
> >
> > Now i have to write another class which will take this saved file name
> > as input and print that.
> >
> > i found only printing method for a particular report but i dont want to
> > again render that report in print class. i have sen the available
> > articles on net which takes the report name and render it and print
> > that.
> >
> >
> >
> > how i can access that saved file in another class and if i have to
> > again render that report then how i can pass those parameters value
> > again in render method in print class.
> >
> >
> >
> > But for my application i have already render that report, so any one
> > please tell me how i can do that.
> >
> >
> >
> > Thanks & Regards
> >
> > Dinesh
> >
Help for licensing and proper product for us.
I read the licensing page, but still i'm confused ... as always with
licensing stuff.
I have a VB 6.0 application (.exe) that establish the connection to my
Access database, but we might want to switch to SQL Server2000 in a near
future.
Our situation
Maximum # of users to use my VB application will be 20. That means I will
deploy my VB app on 20 computers. BUT my VB application will always logon to
the database using the same user.
What would be the best licensing model for me considering all these facts?
1- Connection established from a VB application interface.
2- 20 computers will run the VB application
3- On the 20 computers running the VB app, the SQL user to establish the
connection will always be the same. So only 1 user.
Few more users won't use the VB app and will connect to the database from
the Entreprise Manager (2-3 users)
SQL Server...
Entreprise or Standard. I wonder if standard can do the job for us, it is a
lot cheaper. I think yes. What's the big difference between the two? We
don't need the super big thing here.
Thanks for helping.
Dominic.
SQL User = End user for licensing. A license User is not the same as a
connection or a login. Count the TOTAL number of users that access the
data. That is how many CALs you need. If the CAL cost exceeds a
per-processor license, purchase a per-processor license.
Your VB application is considered "middleware" or a "user aggregator" for
licensing purposes. As such you remove it from consideration entirely.
Enterprise vs. Standard Edition SQL choice should be based on which features
you need. IMHO a decent application with 20 or fewer users should work just
fine on Standard Edition.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in message
news:F93D8030-77CD-4EDE-87D6-D05BCC44DBF3@.microsoft.com...
> Hi,
> I read the licensing page, but still i'm confused ... as always with
> licensing stuff.
> I have a VB 6.0 application (.exe) that establish the connection to my
> Access database, but we might want to switch to SQL Server2000 in a near
> future.
> Our situation
> --
> Maximum # of users to use my VB application will be 20. That means I will
> deploy my VB app on 20 computers. BUT my VB application will always logon
to
> the database using the same user.
> What would be the best licensing model for me considering all these facts?
> 1- Connection established from a VB application interface.
> 2- 20 computers will run the VB application
> 3- On the 20 computers running the VB app, the SQL user to establish the
> connection will always be the same. So only 1 user.
> Few more users won't use the VB app and will connect to the database from
> the Entreprise Manager (2-3 users)
> SQL Server...
> Entreprise or Standard. I wonder if standard can do the job for us, it is
a
> lot cheaper. I think yes. What's the big difference between the two? We
> don't need the super big thing here.
>
> Thanks for helping.
> Dominic.
|||Ok.
So if I have 1 computer accessing the data. But 3 users can be working on
that computer.
The cheaper and legal licensing model for me would be to go with the Server
Plus Device CAL, right? And would only buy 1 license.
-- ON THE OTHER HAND --
If I have 3 computers accessing the data, but only 1 user can be working on
that computer.
Than I would go with the Server Plus User CAL, right? And again would only
buy 1 license.
For Server Licensing.
I'm not familiar with SQL Server and won't be my task to administrate it.
But if I want 2 or more instances of database ( Production, QA, Development
). Is this all reside on the same server installation so only 1 server
license is enough.
Or I can only install 1 database on a machine(production) and other(qa &
dev) would need to be on other machine? So I would need 3 server licenses?
I guess I can have multiple instances on only 1 computer, but I only want to
make sure. This technical stuff is not my field of expertise.
Thanks.
"Geoff N. Hiten" wrote:
> SQL User = End user for licensing. A license User is not the same as a
> connection or a login. Count the TOTAL number of users that access the
> data. That is how many CALs you need. If the CAL cost exceeds a
> per-processor license, purchase a per-processor license.
> Your VB application is considered "middleware" or a "user aggregator" for
> licensing purposes. As such you remove it from consideration entirely.
> Enterprise vs. Standard Edition SQL choice should be based on which features
> you need. IMHO a decent application with 20 or fewer users should work just
> fine on Standard Edition.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in message
> news:F93D8030-77CD-4EDE-87D6-D05BCC44DBF3@.microsoft.com...
> to
> a
>
>
|||I would call your local Microsoft office and ask to speak to a sales and
licensing person. They are the only ones that have the 'Legal and Official"
answers.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in message
news:B453E6CD-E0F7-4205-BB39-53D1D16D5778@.microsoft.com...
> Ok.
> So if I have 1 computer accessing the data. But 3 users can be working on
> that computer.
> The cheaper and legal licensing model for me would be to go with the
Server
> Plus Device CAL, right? And would only buy 1 license.
> -- ON THE OTHER HAND --
> If I have 3 computers accessing the data, but only 1 user can be working
on
> that computer.
> Than I would go with the Server Plus User CAL, right? And again would
only
> buy 1 license.
>
> For Server Licensing.
> I'm not familiar with SQL Server and won't be my task to administrate it.
> But if I want 2 or more instances of database ( Production, QA,
Development
> ). Is this all reside on the same server installation so only 1 server
> license is enough.
> Or I can only install 1 database on a machine(production) and other(qa &
> dev) would need to be on other machine? So I would need 3 server
licenses?
> I guess I can have multiple instances on only 1 computer, but I only want
to[vbcol=seagreen]
> make sure. This technical stuff is not my field of expertise.
> Thanks.
>
> "Geoff N. Hiten" wrote:
for[vbcol=seagreen]
features[vbcol=seagreen]
just[vbcol=seagreen]
message[vbcol=seagreen]
near[vbcol=seagreen]
will[vbcol=seagreen]
logon[vbcol=seagreen]
facts?[vbcol=seagreen]
the[vbcol=seagreen]
from[vbcol=seagreen]
it is[vbcol=seagreen]
We[vbcol=seagreen]
Help for licensing and proper product for us.
I read the licensing page, but still i'm confused ... as always with
licensing stuff.
I have a VB 6.0 application (.exe) that establish the connection to my
Access database, but we might want to switch to SQL Server2000 in a near
future.
Our situation
--
Maximum # of users to use my VB application will be 20. That means I will
deploy my VB app on 20 computers. BUT my VB application will always logon t
o
the database using the same user.
What would be the best licensing model for me considering all these facts?
1- Connection established from a VB application interface.
2- 20 computers will run the VB application
3- On the 20 computers running the VB app, the SQL user to establish the
connection will always be the same. So only 1 user.
Few more users won't use the VB app and will connect to the database from
the Entreprise Manager (2-3 users)
SQL Server...
Entreprise or Standard. I wonder if standard can do the job for us, it is a
lot cheaper. I think yes. What's the big difference between the two? We
don't need the super big thing here.
Thanks for helping.
Dominic.SQL User = End user for licensing. A license User is not the same as a
connection or a login. Count the TOTAL number of users that access the
data. That is how many CALs you need. If the CAL cost exceeds a
per-processor license, purchase a per-processor license.
Your VB application is considered "middleware" or a "user aggregator" for
licensing purposes. As such you remove it from consideration entirely.
Enterprise vs. Standard Edition SQL choice should be based on which features
you need. IMHO a decent application with 20 or fewer users should work just
fine on Standard Edition.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in message
news:F93D8030-77CD-4EDE-87D6-D05BCC44DBF3@.microsoft.com...
> Hi,
> I read the licensing page, but still i'm confused ... as always with
> licensing stuff.
> I have a VB 6.0 application (.exe) that establish the connection to my
> Access database, but we might want to switch to SQL Server2000 in a near
> future.
> Our situation
> --
> Maximum # of users to use my VB application will be 20. That means I will
> deploy my VB app on 20 computers. BUT my VB application will always logon
to
> the database using the same user.
> What would be the best licensing model for me considering all these facts?
> 1- Connection established from a VB application interface.
> 2- 20 computers will run the VB application
> 3- On the 20 computers running the VB app, the SQL user to establish the
> connection will always be the same. So only 1 user.
> Few more users won't use the VB app and will connect to the database from
> the Entreprise Manager (2-3 users)
> SQL Server...
> Entreprise or Standard. I wonder if standard can do the job for us, it is
a
> lot cheaper. I think yes. What's the big difference between the two? We
> don't need the super big thing here.
>
> Thanks for helping.
> Dominic.|||Ok.
So if I have 1 computer accessing the data. But 3 users can be working on
that computer.
The cheaper and legal licensing model for me would be to go with the Server
Plus Device CAL, right? And would only buy 1 license.
-- ON THE OTHER HAND --
If I have 3 computers accessing the data, but only 1 user can be working on
that computer.
Than I would go with the Server Plus User CAL, right? And again would only
buy 1 license.
---
For Server Licensing.
I'm not familiar with SQL Server and won't be my task to administrate it.
But if I want 2 or more instances of database ( Production, QA, Development
). Is this all reside on the same server installation so only 1 server
license is enough.
Or I can only install 1 database on a machine(production) and other(qa &
dev) would need to be on other machine? So I would need 3 server licenses?
I guess I can have multiple instances on only 1 computer, but I only want to
make sure. This technical stuff is not my field of expertise.
Thanks.
"Geoff N. Hiten" wrote:
> SQL User = End user for licensing. A license User is not the same as a
> connection or a login. Count the TOTAL number of users that access the
> data. That is how many CALs you need. If the CAL cost exceeds a
> per-processor license, purchase a per-processor license.
> Your VB application is considered "middleware" or a "user aggregator" for
> licensing purposes. As such you remove it from consideration entirely.
> Enterprise vs. Standard Edition SQL choice should be based on which featur
es
> you need. IMHO a decent application with 20 or fewer users should work ju
st
> fine on Standard Edition.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in messa
ge
> news:F93D8030-77CD-4EDE-87D6-D05BCC44DBF3@.microsoft.com...
> to
> a
>
>|||I would call your local Microsoft office and ask to speak to a sales and
licensing person. They are the only ones that have the 'Legal and Official"
answers.
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in message
news:B453E6CD-E0F7-4205-BB39-53D1D16D5778@.microsoft.com...
> Ok.
> So if I have 1 computer accessing the data. But 3 users can be working on
> that computer.
> The cheaper and legal licensing model for me would be to go with the
Server
> Plus Device CAL, right? And would only buy 1 license.
> -- ON THE OTHER HAND --
> If I have 3 computers accessing the data, but only 1 user can be working
on
> that computer.
> Than I would go with the Server Plus User CAL, right? And again would
only
> buy 1 license.
> ---
> For Server Licensing.
> I'm not familiar with SQL Server and won't be my task to administrate it.
> But if I want 2 or more instances of database ( Production, QA,
Development
> ). Is this all reside on the same server installation so only 1 server
> license is enough.
> Or I can only install 1 database on a machine(production) and other(qa &
> dev) would need to be on other machine? So I would need 3 server
licenses?
> I guess I can have multiple instances on only 1 computer, but I only want
to[vbcol=seagreen]
> make sure. This technical stuff is not my field of expertise.
> Thanks.
>
> "Geoff N. Hiten" wrote:
>
for[vbcol=seagreen]
features[vbcol=seagreen]
just[vbcol=seagreen]
message[vbcol=seagreen]
near[vbcol=seagreen]
will[vbcol=seagreen]
logon[vbcol=seagreen]
facts?[vbcol=seagreen]
the[vbcol=seagreen]
from[vbcol=seagreen]
it is[vbcol=seagreen]
We[vbcol=seagreen]
Help for licensing and proper product for us.
I read the licensing page, but still i'm confused ... as always with
licensing stuff.
I have a VB 6.0 application (.exe) that establish the connection to my
Access database, but we might want to switch to SQL Server2000 in a near
future.
Our situation
--
Maximum # of users to use my VB application will be 20. That means I will
deploy my VB app on 20 computers. BUT my VB application will always logon to
the database using the same user.
What would be the best licensing model for me considering all these facts?
1- Connection established from a VB application interface.
2- 20 computers will run the VB application
3- On the 20 computers running the VB app, the SQL user to establish the
connection will always be the same. So only 1 user.
Few more users won't use the VB app and will connect to the database from
the Entreprise Manager (2-3 users)
SQL Server...
Entreprise or Standard. I wonder if standard can do the job for us, it is a
lot cheaper. I think yes. What's the big difference between the two? We
don't need the super big thing here.
Thanks for helping.
Dominic.SQL User = End user for licensing. A license User is not the same as a
connection or a login. Count the TOTAL number of users that access the
data. That is how many CALs you need. If the CAL cost exceeds a
per-processor license, purchase a per-processor license.
Your VB application is considered "middleware" or a "user aggregator" for
licensing purposes. As such you remove it from consideration entirely.
Enterprise vs. Standard Edition SQL choice should be based on which features
you need. IMHO a decent application with 20 or fewer users should work just
fine on Standard Edition.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in message
news:F93D8030-77CD-4EDE-87D6-D05BCC44DBF3@.microsoft.com...
> Hi,
> I read the licensing page, but still i'm confused ... as always with
> licensing stuff.
> I have a VB 6.0 application (.exe) that establish the connection to my
> Access database, but we might want to switch to SQL Server2000 in a near
> future.
> Our situation
> --
> Maximum # of users to use my VB application will be 20. That means I will
> deploy my VB app on 20 computers. BUT my VB application will always logon
to
> the database using the same user.
> What would be the best licensing model for me considering all these facts?
> 1- Connection established from a VB application interface.
> 2- 20 computers will run the VB application
> 3- On the 20 computers running the VB app, the SQL user to establish the
> connection will always be the same. So only 1 user.
> Few more users won't use the VB app and will connect to the database from
> the Entreprise Manager (2-3 users)
> SQL Server...
> Entreprise or Standard. I wonder if standard can do the job for us, it is
a
> lot cheaper. I think yes. What's the big difference between the two? We
> don't need the super big thing here.
>
> Thanks for helping.
> Dominic.|||Ok.
So if I have 1 computer accessing the data. But 3 users can be working on
that computer.
The cheaper and legal licensing model for me would be to go with the Server
Plus Device CAL, right? And would only buy 1 license.
-- ON THE OTHER HAND --
If I have 3 computers accessing the data, but only 1 user can be working on
that computer.
Than I would go with the Server Plus User CAL, right? And again would only
buy 1 license.
---
For Server Licensing.
I'm not familiar with SQL Server and won't be my task to administrate it.
But if I want 2 or more instances of database ( Production, QA, Development
). Is this all reside on the same server installation so only 1 server
license is enough.
Or I can only install 1 database on a machine(production) and other(qa &
dev) would need to be on other machine? So I would need 3 server licenses?
I guess I can have multiple instances on only 1 computer, but I only want to
make sure. This technical stuff is not my field of expertise.
Thanks.
"Geoff N. Hiten" wrote:
> SQL User = End user for licensing. A license User is not the same as a
> connection or a login. Count the TOTAL number of users that access the
> data. That is how many CALs you need. If the CAL cost exceeds a
> per-processor license, purchase a per-processor license.
> Your VB application is considered "middleware" or a "user aggregator" for
> licensing purposes. As such you remove it from consideration entirely.
> Enterprise vs. Standard Edition SQL choice should be based on which features
> you need. IMHO a decent application with 20 or fewer users should work just
> fine on Standard Edition.
> --
> Geoff N. Hiten
> Microsoft SQL Server MVP
> Senior Database Administrator
> Careerbuilder.com
> I support the Professional Association for SQL Server
> www.sqlpass.org
> "dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in message
> news:F93D8030-77CD-4EDE-87D6-D05BCC44DBF3@.microsoft.com...
> > Hi,
> >
> > I read the licensing page, but still i'm confused ... as always with
> > licensing stuff.
> >
> > I have a VB 6.0 application (.exe) that establish the connection to my
> > Access database, but we might want to switch to SQL Server2000 in a near
> > future.
> >
> > Our situation
> > --
> > Maximum # of users to use my VB application will be 20. That means I will
> > deploy my VB app on 20 computers. BUT my VB application will always logon
> to
> > the database using the same user.
> >
> > What would be the best licensing model for me considering all these facts?
> > 1- Connection established from a VB application interface.
> > 2- 20 computers will run the VB application
> > 3- On the 20 computers running the VB app, the SQL user to establish the
> > connection will always be the same. So only 1 user.
> >
> > Few more users won't use the VB app and will connect to the database from
> > the Entreprise Manager (2-3 users)
> >
> > SQL Server...
> > Entreprise or Standard. I wonder if standard can do the job for us, it is
> a
> > lot cheaper. I think yes. What's the big difference between the two? We
> > don't need the super big thing here.
> >
> >
> > Thanks for helping.
> > Dominic.
>
>|||I would call your local Microsoft office and ask to speak to a sales and
licensing person. They are the only ones that have the 'Legal and Official"
answers.
--
Geoff N. Hiten
Microsoft SQL Server MVP
Senior Database Administrator
Careerbuilder.com
I support the Professional Association for SQL Server
www.sqlpass.org
"dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in message
news:B453E6CD-E0F7-4205-BB39-53D1D16D5778@.microsoft.com...
> Ok.
> So if I have 1 computer accessing the data. But 3 users can be working on
> that computer.
> The cheaper and legal licensing model for me would be to go with the
Server
> Plus Device CAL, right? And would only buy 1 license.
> -- ON THE OTHER HAND --
> If I have 3 computers accessing the data, but only 1 user can be working
on
> that computer.
> Than I would go with the Server Plus User CAL, right? And again would
only
> buy 1 license.
> ---
> For Server Licensing.
> I'm not familiar with SQL Server and won't be my task to administrate it.
> But if I want 2 or more instances of database ( Production, QA,
Development
> ). Is this all reside on the same server installation so only 1 server
> license is enough.
> Or I can only install 1 database on a machine(production) and other(qa &
> dev) would need to be on other machine? So I would need 3 server
licenses?
> I guess I can have multiple instances on only 1 computer, but I only want
to
> make sure. This technical stuff is not my field of expertise.
> Thanks.
>
> "Geoff N. Hiten" wrote:
> > SQL User = End user for licensing. A license User is not the same as a
> > connection or a login. Count the TOTAL number of users that access the
> > data. That is how many CALs you need. If the CAL cost exceeds a
> > per-processor license, purchase a per-processor license.
> >
> > Your VB application is considered "middleware" or a "user aggregator"
for
> > licensing purposes. As such you remove it from consideration entirely.
> >
> > Enterprise vs. Standard Edition SQL choice should be based on which
features
> > you need. IMHO a decent application with 20 or fewer users should work
just
> > fine on Standard Edition.
> >
> > --
> > Geoff N. Hiten
> > Microsoft SQL Server MVP
> > Senior Database Administrator
> > Careerbuilder.com
> >
> > I support the Professional Association for SQL Server
> > www.sqlpass.org
> >
> > "dbelley_office" <dbelley_office@.discussions.microsoft.com> wrote in
message
> > news:F93D8030-77CD-4EDE-87D6-D05BCC44DBF3@.microsoft.com...
> > > Hi,
> > >
> > > I read the licensing page, but still i'm confused ... as always with
> > > licensing stuff.
> > >
> > > I have a VB 6.0 application (.exe) that establish the connection to my
> > > Access database, but we might want to switch to SQL Server2000 in a
near
> > > future.
> > >
> > > Our situation
> > > --
> > > Maximum # of users to use my VB application will be 20. That means I
will
> > > deploy my VB app on 20 computers. BUT my VB application will always
logon
> > to
> > > the database using the same user.
> > >
> > > What would be the best licensing model for me considering all these
facts?
> > > 1- Connection established from a VB application interface.
> > > 2- 20 computers will run the VB application
> > > 3- On the 20 computers running the VB app, the SQL user to establish
the
> > > connection will always be the same. So only 1 user.
> > >
> > > Few more users won't use the VB app and will connect to the database
from
> > > the Entreprise Manager (2-3 users)
> > >
> > > SQL Server...
> > > Entreprise or Standard. I wonder if standard can do the job for us,
it is
> > a
> > > lot cheaper. I think yes. What's the big difference between the two?
We
> > > don't need the super big thing here.
> > >
> > >
> > > Thanks for helping.
> > > Dominic.
> >
> >
> >
Monday, March 26, 2012
Help find better option:Views from table in various Db Viz local d
procedures etc.
Application is written in C sharp and uses database sql2000 sp3.
I have about 25 databases, view is used that joins tables from all db with
left outer join and multiple conditions in where clause.
Online updates are taking place which again goes back to that particular
table in spec. db. Triggers are used at few places to update the view. Every
where stored procedures are used extensively instead of t-sql. In sp at
places table variables are used to minimise locks.
In the initial phase only with each database having few thousand records
user start getting timeout ,slow response & blocking complaints.
Should I copy the view to have local copy of data and have job that run
every min or 2 to update local table . In that too I am not clear that how
useful it will be to keep local copy bcz. it will grow huge in size with
growth in all db.
Very complex thing I see is continuous updates back and forth , which may
keep local copy block for most of the time or else user wan't have latest
data available in their app.
Any one who has worked with similar situation can be lot more useful,
I will highly appreciate any suggestions or discussions from sql experts.
Thanks,Views can be good or bad. If you follow the rules for creating partitioned
views then only the needed table(s) will be scanned. Else, every table in a
view will be scanned which would introduce more unnecessary locks.
http://msdn.microsoft.com/library/e...des_06_9mlv.asp
-oj
"Sameer Raval" <Sameer Raval @.discussions.microsoft.com> wrote in message
news:DB036029-CA4E-463D-B475-19BCE875ACA7@.microsoft.com...
>I am having performance issues Timeout, blocking , long running stored
> procedures etc.
> Application is written in C sharp and uses database sql2000 sp3.
> I have about 25 databases, view is used that joins tables from all db with
> left outer join and multiple conditions in where clause.
> Online updates are taking place which again goes back to that particular
> table in spec. db. Triggers are used at few places to update the view.
> Every
> where stored procedures are used extensively instead of t-sql. In sp at
> places table variables are used to minimise locks.
> In the initial phase only with each database having few thousand records
> user start getting timeout ,slow response & blocking complaints.
> Should I copy the view to have local copy of data and have job that run
> every min or 2 to update local table . In that too I am not clear that how
> useful it will be to keep local copy bcz. it will grow huge in size with
> growth in all db.
> Very complex thing I see is continuous updates back and forth , which may
> keep local copy block for most of the time or else user wan't have latest
> data available in their app.
> Any one who has worked with similar situation can be lot more useful,
> I will highly appreciate any suggestions or discussions from sql
> experts.
> Thanks,
>
>
>
>
>
>
>
>|||Sameer
> I am having performance issues Timeout, blocking , long running stored
> procedures etc.
> Application is written in C sharp and uses database sql2000 sp3.
Have you started to investigate the queries? Have you defined indexes on the
tables?
http://www.sql-server-performance.com
"Sameer Raval" <Sameer Raval @.discussions.microsoft.com> wrote in message
news:DB036029-CA4E-463D-B475-19BCE875ACA7@.microsoft.com...
> I am having performance issues Timeout, blocking , long running stored
> procedures etc.
> Application is written in C sharp and uses database sql2000 sp3.
> I have about 25 databases, view is used that joins tables from all db with
> left outer join and multiple conditions in where clause.
> Online updates are taking place which again goes back to that particular
> table in spec. db. Triggers are used at few places to update the view.
Every
> where stored procedures are used extensively instead of t-sql. In sp at
> places table variables are used to minimise locks.
> In the initial phase only with each database having few thousand records
> user start getting timeout ,slow response & blocking complaints.
> Should I copy the view to have local copy of data and have job that run
> every min or 2 to update local table . In that too I am not clear that how
> useful it will be to keep local copy bcz. it will grow huge in size with
> growth in all db.
> Very complex thing I see is continuous updates back and forth , which may
> keep local copy block for most of the time or else user wan't have latest
> data available in their app.
> Any one who has worked with similar situation can be lot more useful,
> I will highly appreciate any suggestions or discussions from sql
experts.
> Thanks,
>
>
>
>
>
>
>
>
Friday, March 23, 2012
Help Designing an App. to be Run from a Job
Hello,
I'm working on a project that uses SQL Server 2005 and C# 2.0. I need some ideas of the best way to design/implement an application that will be executed from a SQL Server job.
The general idea is: a SQL Server job will call [something] and pass a couple of parameters to [something], then [something] will query a database and gather other information, then [something] will do some processing of data, and finally [something] will output the results for end user consumption.
The problem is that I don't know what [something] should be. Should it be a C# executable (but it can have no UI)? Should it be a web service? Should it be a console application (but, again, it cannot have a UI)? Should the job call a stored procedure, which in turn calls a C# assembly?
Basically, I'm just trying to get some ideas of the best way to design/implement a solution to my situation.
Thanks.
Hi,without further information, I would suggest to use a c# console app called from the job.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||
Thanks for the input.
What other information could I provide to help choose the best solution?
|||Best thing is to call a Stored Proc from the Sql job
In the Stored proc gather all the parameters that you need and use BCP out to keep that data in a flat file.
There is no need to use Webservice or other C# program as this would cause an additional overhead.
|||There are a number of things your description suggests, and others that it leaves open...
1 - from what you say, it looks like the something does not need access to the resources of the server (as a computer) and only needs access to data inside SQL Server. If this is true, then the use of a SQL Server job to invoke a stored procedure is the way to go (and in SQL Server 2005 you can write your stored procedure in C# if you like).
If, on the other hand, you need access to information outside SQL Server (files, I/O, Active Directory, other PCs, ...) you'll need an app running outside SQL Server (yes - you can invoke an app from inside SQL Server, but why jump through hoops when you don't need to?). If this is the road to take, use Windows' scheduler instead of SQL Server's scheduler.
If you're running inside SQL Server, as one of the other posts suggested, you'll have a Stored Proc to gather parameters, that likely will call another (or more) to do the work. If you're doing stuff outside the database server the app will likely invoke a stored proc to do the 'inside' work - so you're just partitioning where you do what work.
When returning the data to the user - there are a number of options that depend on various factors you've not mentioned as to which is better:
> simply write the data to an output table (with a timestamp on each row if you need to hold multiple day's / run's worth of output) - and the use can have a simple reporting app to read from it.
> If the volume of data is small SQL Server can email the recipient(s) - again, this is probably better if the number of recipients is small. You may also need to consider the security of the data as it travels as email.
> If you need to store the data outside the server (in a dated file, for example) you have to get it out, somehow. If your app is already running outside the server that's a no brainer; if everything is running inside the server I think you'll have to trigger some outside app to pull the data (i.e. I don't think there's a way for a SQL Server job to dump data to the outside world). DO NOT TAKE MY WORD for this - DTS may be invokable as a SQL Server job and may server to store data outside the server, or there may be other capabilities of SQL Server 2005 that I've not encountered yet.
> Worst comes to worst - you have a simple outside app that polls a table in the server for a 'ready' flag and then pulls the data. But that's ugly.
HTH
Griffin
sqlWednesday, March 21, 2012
Help connecting SQL
to install the same application in another office outside of the
office. How can i make my application connect to my SQL server
remotely to make transactions?The app connects to your SQL Server using TCP/IP and some port number. If it is a default instance,
then the port is by default 1433. If it is a named instance, then you should look up what port
number the instance is using (pls post what version of SQL Server). So the app need to be able to
connect using this port, either by opening for the port in your firewall (NOT RECOMMENDED!!!) or
using VPN or similar.
Of course, you can re-architecture your app into either a n-tier app or by using HTTP endpoints
(assuming 2005), but I have a feeling that re-writing your app isn't an option.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Macana" <leninarias@.gmail.com> wrote in message
news:14ead399-dab5-4826-95c4-c280f8a485f3@.l32g2000hse.googlegroups.com...
>I have an application that connect to a local SQL server, but i need
> to install the same application in another office outside of the
> office. How can i make my application connect to my SQL server
> remotely to make transactions?
Help configuring database to work as intended
Hello everyone, I have created my web application in VS 2005 using asp.net 2.0 and the built in sql .mdf database creater that comes with visual studio. After I developed my website, I then wanted to move it to one of our servers on the network, which I did without a problem. The website works fine but here is my challange. I need users to be able to connect to the database via login script and the script inserts computer data into the database. So I figured I need to attach the Database to SQL Server 2005. When I try to do this it gives me this database is in use. So I stop the website in IIS, and it allows me to add the database into the SQL Server. Once I do this, and start the website again, the website no longer works and I get a bunch of database errors, that do not get fixed untill I re-copy the website to the server.
Is there a way to just connect to a .mdf file on the network that is not attached to a sql server, through a connection string in a login script? Maybe there is something else I need to do to the database before copying to the server? Or should I re-programm the website with a newly created database in SQL Server, and use that as the datasource?
There is no need to stop the webserver to copy or attach the database. to attach the database bring the particular database to offline and copy the mdf and ldf as per u r required location.
Thank u
Baba
Please remember to click "Mark as Answer" on this post if it helped you.
|||Ok but then why, when I attach the database to a SQL Server, and try to run the website again, it no longer works? It gives me a bunch of database errors that basiaclly come down to, the database is already open.
|||Hi,
using asp.net 2.0 and the built in sql .mdf datab
From your description, it seems that you want to move the mdf file in SQLExpress to SQLServer2005, right?
If so, I suggest that you can use aspnet_regsql tool to achieve that. The ASP.NET SQL Server Registration tool is used to create a Microsoft SQL Server database for use by the SQL Server providers in ASP.NET, or to add or remove options from an existing database. The Aspnet_regsql.exe file is located in the [drive:]\%windir%\Microsoft.NET\Framework\version folder on your Web server.
You can give the option '-d' to specify the name of the database to create or modify for use with application services. If the database is not specified, the default database name of "aspnetdb" is used.
For details, see:http://msdn2.microsoft.com/en-us/library/ms229862(VS.80).aspx
Thanks.
sql
Help comparing 01234 with 1234 (with complications)
So, since they're numbers anyway, I figured I would just convert them both to integers and join on that as in:
...CAST(ord_no1 as integer) = CAST(ord_no2 as integer)
Which works :), BUT...
Since the ord_no field is actually a char(8) field, users can enter stuff other than numbers in it. Is there a way that I can use CAST as in the above, but let it ignore values that can not be converted? If it's not all numberals, it won't match anyway so I don't need to worry about them, however, when joining on that field, it has to look at all the records and perform the calculation and it's failing on a handful of them.
Any help would be greatly appreciated, thank you.Did we get past 1st normal form?
:D
SELECT ord_no1, ord_no2
FROM myTable99
WHERE ISNUMERIC(ord_no1) = 1 AND ISNUMERIC(ord_no2) = 1|||How can I either:
1. Convert to Integer, but gracefully ignore values that don't convert
OR
2. Convert to something like varchar or something that will let me join on '01234' and '1234 '
Thank you.|||USE Northwind
GO
SET NOCOUNT OFF
CREATE TABLE myTable99(ord_no1 char(8), ord_no2 char(8))
GO
INSERT INTO myTable99(ord_no1, ord_no2)
SELECT '01234','1234' UNION ALL
SELECT 'X1234','1234' UNION ALL
SELECT '6789','6789' UNION ALL
SELECT 'Brett','Brett'
SELECT *
FROM ( SELECT *
FROM myTable99
WHERE ISNUMERIC(ord_no1) = 1 AND ISNUMERIC(ord_no2) = 1) AS XXX
WHERE CONVERT(int,ord_no1) = CONVERT(int,ord_no2)
UNION ALL
SELECT *
FROM myTable99
WHERE (ISNUMERIC(ord_no1) = 0 OR ISNUMERIC(ord_no2) = 0)
AND ord_no1 = ord_no2
GO
SET NOCOUNT OFF
DROP TABLE myTable99
GO|||THANK YOU!!!!
I can't believe I'm doing this because I have a lot of issues with my accounting systems DB design, but it is in normal form.
When performing a warehouse transfer, a inventory issuance is entered for the warehouse the product is shipping from with ord_no = 1000 and doc_ord_no = 1000.
Then, an inventory receipt is entered for the warehouse the product is shipping to with ord_no = 1001 and doc_ord_no = 1000 which relates that receipt with the issuance.
I am trying to create a transfers report so I can list all the issuances and then do a join between ord_no and doc_ord_no (limiting the second table to only receipts) to show which transfers have arrived and which are in transit.
Thank you again for your help.
Monday, March 19, 2012
HELP Access to sql server 2005 express connection FAILS UPDATE
Hi
I got an access 2002 application front end with a sql server 2005 express back end. Some of my clients are having some difficulties. After using the application for a while, some of the users are finding that the system just hangs up. It usually happens after the front end application has been running for about an hour (sometimes sooner and sometimes later). There are perhaps 1 to 5 concurrent users and I have checked to see if there are any firewalls stalling it (I think I check all of them)- Is there any way that SQL Server 2005 express could be caused to just stall- This even occurs with the odd laptop. All the appropriate protocols are enabled as well. These databses are not very large.
ANY HELP WOULD BE GREATLY APPRETIATED!!!
Thanks
Frank Srebot
Moved thread to the SQL Server Express forum.|||hi Frank,
what do you mean by "just hangs up"? does it completely stalls requiring a reboot, or it's "sleeeping" for just a while and then restarts working "as expected" or the like?
to start, few things to consider..
SQLExpress sets the "autoclose" property of it's created databases to true, and this causes the dbs to be shut down when not in use, meaning that tyey will be closed if no active connection references them.. this involves a little overhead at next re-use as the dbs must be re-open, but I do not think this is your problem... anyway, the eventual related "problem" can be workaround modifying the relative database property via sp_dboption database's system stored procedure call...
"autoshrink" database property is even set to true, and this causes, at engine scheduled time frames, the eventual shrinking of the involved databases, so that when lots of insert/delete operations are performed (actually lots of deletes), the engine wakes up a thread to shrink (when necessary) the databases, requiring some time to execute..
if the autogrowth property of the database's datafiles and logfiles is set to true and the engine states new file space is required, the engine enlarges the files (when needed) and this will obviously involve some time as well...
other non SQL Server related issues includes OS's scheduled tasks requiring lots of CPU and/or I/O..
but it's hard to solve this way ![]()
regards
|||Thanks for the great and quick response.
To clarify, sql server just hangs up meaning that the application displays an hourglass and eventually the sql connection is lost and an error message is given. I was doing some research and I was wondering if the problem could be in the connection pooling configuration- currently the setting are that pool connections are enabled by default in the ODBC config settings- the databases which I am dealing are quite small- would any one have any ideas perhaps along these lines?
Thanks
Frank srebot
|||Hi
This is an update to my connection Problem with Access 2002 to SQL SERVER EXPRESS 2005.
We are having random disconnects on the client side with Access putting up a "Connection Failure" dialog box even when the user is actively entering records into the system. Have any of you ever encountered this situation? We have disabled all TCP offloading engine technology on the machine thinking this was causing a problem with SQL Server as well as changing network cards to a whole different brand. We've pretty much ruled out the physical network at this point because we have changed cables and moved to another port on a different switch to no avail.
Is there some timeout setting or connection pooling setting that I am unaware of at the SQL Server level that has a problem interacting with Windows Server 2003 or Windows XP? I have checked and double checked all of the server settings between the old machine and the new and they are identical.
I did read that the connection pooling may be stressed and the pool of connections are 'Leaking'. This might be due to a bad cable or connection, but thats all I have found out.
Any info would be greatly appreciated.
Thanks
Frank
Monday, March 12, 2012
HELP ! Login failed for user MachineName\ASPNET
I am new to ASP.NET and have an ever approaching deadline to develop a database driven web application. Having read a lot of articles on the Internet I decided on Visual Studio 2003, MSSQL Server 2000 Developer Edition, all running off Windowns XP Pro.
I cannot get the ASP to access the database, I keep getting the following message
System.Data.SqlClient.SqlException: Login failed for user 'MachineName\ASPNET'
I do not know what to do to sort this problem and I cannot test anything I have developed as a result. I am very desperate for help as I have been trying to sort this out for the last 5 days.
Somebody please please please help me!!!!!!!!!
Thank you if you can.
RW#1
install Connector/ODBC - MySQL ODBC driver
http://dev.mysql.com/downloads/
#2
check out Connector/ODBC Programmer's Reference Manual
http://www.mysql.com/search/?q=myodbc
#3
Here is my code to populate a datagrid from a mySQL database.
IN GLOBAL.ASAX
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
'Create Database Connection String
Dim globalConnStr As String
globalConnStr = "driver={MySQL ODBC 3.51 Driver};"
globalConnStr = globalConnStr + "server=localhost;"
globalConnStr = globalConnStr + "port=3306;"
globalConnStr = globalConnStr + "Stmt=;"
globalConnStr = globalConnStr + "uid=root;"
globalConnStr = globalConnStr + "pwd=;"
globalConnStr = globalConnStr + "database=smfr_wildland;"
globalConnStr = globalConnStr + "Option=3;"
'Assign Database Connection String To
'global connection object
Application("globalConnStr") = globalConnStr
End Sub
in your code behind page that contains a datagrid...It should look KINDA like this.
Dim strSQL As New System.Text.StringBuilder
strSQL.Append("SELECT users.*,smfr_shifts.shift_name")
strSQL.Append(" FROM users")
strSQL.Append(" INNER JOIN smfr_shifts ON users.user_shift_id = smfr_shifts.shift_id")
strSQL.Append(" WHERE users.user_deploymentYN = " & x)
strSQL.Append(" ORDER BY users.user_deploymentYN DESC , users.user_sort;")
Dim DBConn As System.Data.Odbc.OdbcConnection
Dim DBCommand As System.Data.Odbc.OdbcDataAdapter
Dim DSPageData As New DataSet
DBConn = New System.Data.Odbc.OdbcConnection(Application.Item("globalConnStr"))
DBCommand = New System.Data.Odbc.OdbcDataAdapter(strSQL.ToString, DBConn)
DBCommand.Fill(DSPageData, "users")
dgTeam.DataSource = DSPageData.Tables("users").DefaultView
dgTeam.DataBind()
'Close and Clean-Up
DBConn.Close()
DBConn.Dispose()
DBConn = Nothing
DBCommand.Dispose()
DBCommand = Nothing
DSPageData.Dispose()
DSPageData.Clear()
DSPageData = Nothing
-------
NO System.Data.SqlClient
USE System.Data.Odbc
Hope this helps?
Tom|||Ralph,
If you are indeed using Microsoft SQL Server, then your code should be OK. You've posted in the MySQL section.
What you need to do is add the MACHINENAME\ASPNET user as a Login in your database, and give that user rights to the database objects it needs.
When an ASP.NET application trys to access your SQL Server database, it does so by using that account.
[now moved from MySQL forum to SQL Server forum]|||A few important remarks:
1. ASPNET will only work on W2K and Windows XP, not on Windows Server 2003 where the identity of the application pool will be used instead (network service account).
2. Even if yo'ure on W2K, the ASPNET user can be bypassed if you're using (Windows authentication with) impersonation or you've changed the processModel section; in that case, use that user account on SQL Server instead to give permissions to.
3. However, a big fat remark: if you grant ASPNET or NETWORK SERVICE rights to the database, every other service/application running in that identity's context will have rights on the database as well. On a hosted environment where others can upload code to the machine as well, this is a big big security leak since others can write code to mess up your database. If you still need to do this, consider to give the user only read rights on the database!
4. It would be better from this side of the picture to use SQL authentication instead, although the password is not encrypted then when it's sent to the server. This is a less "heavy" issue if SQL Server is running on the same box as the web server (definitely not a scalable solution, but still it's out there in many places) or when the server environment is heavy controlled (a switched network between the servers).
5. Another approach is to impersonate as a certain identity from within the code whenever you want to talk to the database and to undo that impersonation afterward, as shown on my blog intip 7.
In any case, try to lock down the number of users that can access the database as much as you can by creating separate users on the level of the database for each database (which has only rights on that database). Never ever connect in a lazy way (e.g. using a sysadmin user).|||I did not read the posting close enough...it was in the mySQL group when I read it and replied.
MONITOR...you may delete/remove my two post for this discussion...SORRY
Tom|||Put this into a text file called grantpermission.sql. Change the 'MachineName\ASPNET' to your computer name and change Use dbname to your database name. Then use SQL Query Analyzer and execute the code to add the user and grant permissions. ASPNET will become owner as you can see in the code. This assumes that you have everything installed correctly. I have the almost the exact same setup. Although I'm also using WebMatrix. SQL Desktop Edition on Win XP Pro.
-- Begin --
DECLARE @.username sysname
SELECT @.username = 'MachineName\ASPNET'
USE master
EXEC sp_grantlogin @.username
USE dbname
EXEC sp_grantdbaccess @.username
EXEC sp_addrolemember N'db_owner', @.username
-- End --
Friday, March 9, 2012
Help - View Trigger or Table Trigger
My application takes data readings every few seconds and stores a
couple of data values for piece of equipment in a table for historic
trending. The table is simlar to:
CREATE TABLE [DataTest] (
[DataID] [bigint] IDENTITY (1, 1) NOT NULL ,
[EquipmentID] [int] NOT NULL,
[DataTimestamp] [datetime] NOT NULL ,
[DataReading1] [decimal](18, 4) NOT NULL,
[DataReading2] [decimal](18, 4) NOT NULL
[DataReading3] [decimal](18, 4) NOT NULL
)
My application needs to alert users when data values fall outside of
acceptable thresholds. It also must allow users to view a history of
when these "alerts" have triggered.
I would like to utilize the database (SQL Server 2000) as much as
possible for this functionality. I originally thought I could create a
new View for each alert that users set. For example,
CREATE VIEW dbo.Alert_25
AS
SELECT * FROM DataTest WHERE DataReading1 > 200 AND DataReading2 < 500
WHERE EquipmentID = 1
Each view would then contain the history of when that alert triggered.
I then thought I could add a trigger to that View to notify the user
that the data has gone out of range. This is where things fall apart.
The inserts are happening on the main table not the view, so a trigger
on the view does not fire.
SO...here are my questions.
1. I would like to keep the trigger associated with the View if
possible. That way, if the user deletes the View the triggers can
easily be removed as well. Is there anyway for the trigger to fire if
it is on the View?
2. I guess my alternative would be to have both Views for the alert
histories and multiple triggers on the data table. Is this an
acceptable approach? Say the user where to create 100 different alerts.
What impact on the server would this have if this created 100 different
triggers on the same data table?
I appreciate your opinions and advice. If I am way off base all
together, I appreciate any other suggestions.
Thanks,
YofnikOn 15 Aug 2005 13:09:39 -0700, Yofnik wrote:
(snip)
>SO...here are my questions.
>1. I would like to keep the trigger associated with the View if
>possible. That way, if the user deletes the View the triggers can
>easily be removed as well. Is there anyway for the trigger to fire if
>it is on the View?
Hi Yofnik,
No. A view can have only an INSTEAD OF trigger defined on it, and that
will only fire when an insert, update or delete is executed with the
view as target.
>2. I guess my alternative would be to have both Views for the alert
>histories and multiple triggers on the data table. Is this an
>acceptable approach? Say the user where to create 100 different alerts.
>What impact on the server would this have if this created 100 different
>triggers on the same data table?
It would cause a dramatic slowdown of your data modifications. Keeping
it all in one trigger would also cause a slowdown, but not as much.
Anyway, I think you should also reconsider the first stetp. You mention
"alerting users" without going into the specifics, but I have a hunch
that you plan to send out an email. And sending email from a trigger is,
as Orwell would say, doubleplusungood practice. Not only because it will
slow down your inserts tremendously, but also becuase you are mingling
in-transaction and out-transaction actions. What happens if the
transaction fails and is rolled back immediately after the mail is sent?
Your best bet is probably to investigate what Notification Services can
do for you.
If NS can't be used in your case, then create your views, write a script
that checks for entries in each of the views without matching entry in
the "alert history" table and sends a mail if it finds one. Use Agent to
schedule this as a job that runs as often as you need it (depends on how
much time may pass between the measurement and the alert).
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Sorry, I suppose I did not mention HOW the trigger would alert users. I
definitely was not planning on sending an email from the trigger. I
would like the trigger to simply put a new row in the AlertHistory
table with the AlertID and a flag indicating if it has been processed.
Then an external application can regularly poll this one table and grab
all alert IDs that have not been processed and send out an email. The
external application will then set the flag to indicate the alerts have
been processed.
With that said, is your last suggestion my best approach? Is there an
easy way to check for new rows in ALL views? I guess that would require
dynamic SQL then, huh?|||On 15 Aug 2005 13:42:25 -0700, Yofnik wrote:
>Sorry, I suppose I did not mention HOW the trigger would alert users. I
>definitely was not planning on sending an email from the trigger. I
>would like the trigger to simply put a new row in the AlertHistory
>table with the AlertID and a flag indicating if it has been processed.
>Then an external application can regularly poll this one table and grab
>all alert IDs that have not been processed and send out an email. The
>external application will then set the flag to indicate the alerts have
>been processed.
>With that said, is your last suggestion my best approach? Is there an
>easy way to check for new rows in ALL views? I guess that would require
>dynamic SQL then, huh?
Hi Yofnik,
If you only want to insert a row in the AlertHistory table, I'd probably
go for a trigger. But just ONE trigger - nod hundreds of 'em!
Either hard-code the limits that will cause an alert in the trigger (and
make sure that allchange requests go through one channel - i.e. you). If
you must have flexibility for the ussers to add, remove or change the
upper and lower limits for alerts, than create a second table to hold
all the limits, and join to that in the trigger to determine if any
alerts are generated. If you need more help on how to design this table
and how to code the trigger, give us some more information on your
current tables and data. Check out www.aspfaq.com/5006 to find out what
inforamtion we need to best address your question.
WRT your last question - steer clear of dynamic SQL! If you want to know
why, read http://www.sommarskog.se/dynamic_sql.html.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
HELP - urgent situation
I've got a DTS package with a script that does this:
Set xlApp = CreateObject("Excel.Application")
This fails though. Do I have to install MS Office on the machine the SQL Server is on? Or can I simply copy a few DLLs over and register them??
Thanks! I gotta get this solved within 5 hrs :(I am by no means an expert on this particular situation, but I would think that your 'best' (meaning most likely to work the first time) solution would be to install MS Office (just the Excel portion of it) on the server.
Regards,
hmscott|||Our in-house IT guy won't install Excel/Office on the server that our SQL Server is on.. something about opening up for potential problems and/or security issues.
It seems to me that if you CreateObject("Excel.Application"), that there's some kind of ActiveX .dll that could be registered on the server to allow the creation of these Excel COM objects. Anyone know which files they are??|||Where is the Package called from?
If client side app I would suggest installing Excel would work,
If a VB app adding the Excel distributables in the compile should work.
Create a reference to the Excel Object in your VB app.
mine is at
C:\Program Files\Microsoft Office 2000\Office\EXCEL9.OLB
When installed the required registry entries should follow.
Good Luck|||It's an ActiveX script within a DTS package on the server. I'd LIKE to have Office installed, but IT won't allow it.
Is there some way I could place the EXCEL9.OLB file on the server, and reference it somehow in my VBScript??|||All DTS Packages are run on the client unless scheduled by SQL Server regardless of where the code resides.
Your users will need Excel on their PC to use the output anyway, as well as DTS dlls (read SQL Server Client).
Is XML an option? or a structured text file which they can import into Excel. If so you could use the fileScripting object in Active script.|||Well.. actually this is a web page executing the DTS package.. so all the proper DTS dlls are installed on the web server now. And the DTS package has an ActiveX script that tries to create an instance of Excel.Application..but can't do so because Office is not installed on the web server (and will never be).
Nope.. XML is not an option. They gave us an Excel workbook they want populated.. there's no room to budge on this, unfortunately.|||If all you are doing is a data migration into a template try to map to the Excel spreadheet and se a dtsDataPump|||What if you pumped the data to a Comma Separated Value file (.csv), and let Excel convert it from wherever the client happens to open it from?|||OK here's the solution we went with.. MS Office Web Components.
Problem is, I can't find any thorough documentation on it. I want to know if it's possible to open an Excel file with it.
Set objOWC = CreateObject("OWC10.Spreadsheet")
That's how it's created. I have a few examples that tell you how to create a new Excel file from scratch and save it. But not how to open an existing one, modify it, then save to a new file.
Does anyone know, or can point me to some documentation? Thanks!
Help - updating stored procs !
First post on here, so please excuse any ignorant parts of my question :)
We've recently had to migrate an application from one server to another, and had lots of problems getting it to work (NT4/SS7 -> 2K3/SS2K5). After much digging around I found the info on SQL server 2k5 changing the SUSER_NAME to SUSER_SNAME (I think from reading the change was actually from SQL Server 2000 - that correct ?).
Anyway I updated some of our stored procedures to correct that issue, and things *seem* to be working again (<-- famous last words, I know :eek: ), but I've been trying to find details of any other changes, particularly command changes, that I may need to make to our stored procedures.
To be honest I've found the info on Microsoft's main site and technet site next to useless - all seems to discuss very generic high-level procedures for database migration etc.. I didn't even find the SUSER change on there.
Could anyone point me to some useful information on other changes to look out for (within the SP's) ??
Thanks in advance for your help, and for taking the time to read this :beer:Hi all.
First post on here, so please excuse any ignorant parts of my question :)
We've recently had to migrate an application from one server to another, and had lots of problems getting it to work (NT4/SS7 -> 2K3/SS2K5). After much digging around I found the info on SQL server 2k5 changing the SUSER_NAME to SUSER_SNAME (I think from reading the change was actually from SQL Server 2000 - that correct ?).
Anyway I updated some of our stored procedures to correct that issue, and things *seem* to be working again (<-- famous last words, I know :eek: ), but I've been trying to find details of any other changes, particularly command changes, that I may need to make to our stored procedures.
To be honest I've found the info on Microsoft's main site and technet site next to useless - all seems to discuss very generic high-level procedures for database migration etc.. I didn't even find the SUSER change on there.
Could anyone point me to some useful information on other changes to look out for (within the SP's) ??
Thanks in advance for your help, and for taking the time to read this :beer:
I wasn't aware that SUSER_NAME is no longer supported. That surprises me.
I have upgraded several databases to 2005, and done a fair amount of sql programming in 2005, and I have not found anycode that is not backward compatible.|||fwiw, SUSER_NAME() and SUSER_SNAME() both work fine on my 2005 server (sp1).
HELP - SQLDMO Problem
I am using SQLDMO in my application to create data tables, full-text
catalogs and jobs to populate the catalogs. My datatables are created
successfully but I get error on line where it says :
Dim oSQLServer as SQLDMO.SQLServer
oSQLServer = new SQLDMO.SQLServer
I have added reference to SQLDMO library (Name: Interop.SQLDMO) in my
project (VB.NET 2003, Framework 1.1)
The error message is:
System.RuntimeInteropServices.COMException (0x80040154)
COM Object with CLSID {classId} is either not valid or not registered.
Stack Trace points to line oSQLServer = new SQLDMO.SQLServer
How do I fix this problem? (i.e. how do I register this COM object)
I dont have this problem when I run my app from VS.NET Studio (so with
machine with installed VS.NET) but it occurs on a machine without
VS.NET) when I run the executable file inside bin directory (which
also contains Interop.SQLDMO.dll file)
Any help will be appreciated
_dino_
try going to this location via a command window
C:\Program Files\Microsoft SQL Server\80\Tools\Binn
and type regsvr32 sqldmo.dll
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Dino Buljubasic" <dino@.noplacelikehome.com> wrote in message
news:u10ch11m71na02qksua5dr68uofcv3qi3o@.4ax.com...
> Hi,
> I am using SQLDMO in my application to create data tables, full-text
> catalogs and jobs to populate the catalogs. My datatables are created
> successfully but I get error on line where it says :
> Dim oSQLServer as SQLDMO.SQLServer
> oSQLServer = new SQLDMO.SQLServer
> I have added reference to SQLDMO library (Name: Interop.SQLDMO) in my
> project (VB.NET 2003, Framework 1.1)
> The error message is:
> System.RuntimeInteropServices.COMException (0x80040154)
> COM Object with CLSID {classId} is either not valid or not registered.
> Stack Trace points to line oSQLServer = new SQLDMO.SQLServer
> How do I fix this problem? (i.e. how do I register this COM object)
> I dont have this problem when I run my app from VS.NET Studio (so with
> machine with installed VS.NET) but it occurs on a machine without
> VS.NET) when I run the executable file inside bin directory (which
> also contains Interop.SQLDMO.dll file)
> Any help will be appreciated
> _dino_
|||Hillary,
thank you for your help. The sql client tools have been installed on
the machine and we tested it in the office at several machines and it
worked just fine; however, on client's side it would not work.
The only difference is that at the office, we provided server name
instead of IP address. Today, we tried the same at clients side and
it works just fine. Why would SQLDMO accept server name but not
server IP address? Any Ideas ?
I appreciate your help
_dino_
On Wed, 31 Aug 2005 20:56:08 -0400, "Hilary Cotter"
<hilary.cotter@.gmail.com> wrote:
>try going to this location via a command window
>C:\Program Files\Microsoft SQL Server\80\Tools\Binn
>and type regsvr32 sqldmo.dll
|||Try putting the sever name in using Client Network Utility and enter the IP
address there.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Dino Buljubasic" <dino@.noplacelikehome.com> wrote in message
news:oqfeh1tjdu4fi03trd0eka0t7bi4qk1g5v@.4ax.com...
> Hillary,
> thank you for your help. The sql client tools have been installed on
> the machine and we tested it in the office at several machines and it
> worked just fine; however, on client's side it would not work.
> The only difference is that at the office, we provided server name
> instead of IP address. Today, we tried the same at clients side and
> it works just fine. Why would SQLDMO accept server name but not
> server IP address? Any Ideas ?
> I appreciate your help
> _dino_
> On Wed, 31 Aug 2005 20:56:08 -0400, "Hilary Cotter"
> <hilary.cotter@.gmail.com> wrote:
>
|||Thanks, I'll try it next time on client's site
I appreciate your help
_dino_
On Thu, 1 Sep 2005 14:13:13 -0400, "Hilary Cotter"
<hilary.cotter@.gmail.com> wrote:
>Try putting the sever name in using Client Network Utility and enter the IP
>address there.
Help - Simple DataGrid Problem in Vis. Studio 2003
As a relative newbie to SQL Server/ASP.NET I'm hoping someone here
can help with my problem. I'm developing a timesheet application in
ASP.NET C# using Visual Studio 2003 with a database built in MSDE.
One of my forms needs to return a simple list of resources from my
database. I have followed the guide on the MSDN libraries, but for
some reason I continuously get the same error message.
What I've done so far is Create the database, tables, and populate
with some sample data using using Server Explorer in Visual Studio. I
have
connected to the database (using integrated security) and I am
trying to get the contents of the Resource table to appear on my
form. I have then created a DataAdapter (tested the connection, set
the SQL as a simple SELECT * from Resource, etc), which also generates
an sqlConnection for me. To test this I have previewed the generated
data, and it returns what I want, so I
have chosen to generate a DataSet of this. I am then trying to get
this data into a simple DataGrid. On the properties of the DataGrid
I have changed the DataSource to point at my Dataset. As I
understand it, I then have to add the following to my Page Load
section of my code.
sqlConnection1.Open();
this.sqlDataAdapter1.Fill(this.dsResource);
sqlConnection1.Close();
The form builds fine, but when I browse to the particular form I get
the following error for the sqlConnection1.Open(); line
Exception Details: System.Data.SqlClient.SqlException: Cannot open
database requested in login 'SCMS'. Login fails. Login failed for
user 'AL-NOTEPAD\ASPNET'.
To me this is an error with my connection string. My database
instance is actually 'AL-NOTEPAD\VSDOTNET'. However the properties
for sqlConnection1 are pointing to the correct datasource. I do not
know why the application is looking for user 'AL-NOTEPAD\ASPNET'. It
does not exist, to my knowledge.
Any help with this would be greatly appreciated, as I get the same
error with my code for forms-based login...
Thanks in advance..thebison (alex.sinclair3@.btinternet.com) writes:
> The form builds fine, but when I browse to the particular form I get
> the following error for the sqlConnection1.Open(); line
> Exception Details: System.Data.SqlClient.SqlException: Cannot open
> database requested in login 'SCMS'. Login fails. Login failed for
> user 'AL-NOTEPAD\ASPNET'.
> To me this is an error with my connection string. My database
> instance is actually 'AL-NOTEPAD\VSDOTNET'. However the properties
> for sqlConnection1 are pointing to the correct datasource. I do not
> know why the application is looking for user 'AL-NOTEPAD\ASPNET'. It
> does not exist, to my knowledge.
I guess that's why the login fails. :-)
I believe this has to do with that IIS runs the in a context of a pre-
defined user, and IIS the tries to log in with integrated security,
but the ASPNET user have not been granted access to the database.
But you are probably better off asking in a newsgroup about ASP .Net.
At least I know very little about ASP .Net.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Wednesday, March 7, 2012
Help - setup Sql Server 2000 on server on network
I have a VB6 application that is hooked up to a Sql Server database on my
workstation computer. I will be distributing this application and have to
install Sql Server 2000 on a server. I have never set up Sql Server on a
network server before. Please tell me if the following steps are correct:
1. Set up Windows 2000 Server operating system on the machine (they want me
to use a separate computer from our other servers).
2. Connect to the network.
3. Install Sql Server 2000 on the machine.
4. Copy the MDF and LDF files from my workstation computer to Sql Server
2000 on the server into the ../MSSQL/Data file.
According to my logic (or lack thereof, as the case may be), my application
should be able to connect to this database from any computer in the
organization via a connection string (which is located in my application)
like the following:
"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=MyDatabase;Data
Source=NewServerThatSqlServerWasJustInst
alledOn"
Any comments and suggestions will be greatly appreciated!
--
SandySandy,
It basically sounds like you're trying to move a SQL database from one
instance of SQL Server to another and then connect to that new instance via
your client application. That is not an issue as long as the client
application has the necessary connection information/string to the new
instance and the network connectivity is present. However, there may be
some issues with security as any logins will not be transfered because they
are stored in the Master system database and not in the end-user database
(only contains the db users). As such you may want to view the Microsoft KB
article #246133.
HTH
Jerry
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:57C7E2E5-6906-4B47-BE22-71983B3A6DF8@.microsoft.com...
> Hello -
> I have a VB6 application that is hooked up to a Sql Server database on my
> workstation computer. I will be distributing this application and have to
> install Sql Server 2000 on a server. I have never set up Sql Server on a
> network server before. Please tell me if the following steps are correct:
> 1. Set up Windows 2000 Server operating system on the machine (they want
> me
> to use a separate computer from our other servers).
> 2. Connect to the network.
> 3. Install Sql Server 2000 on the machine.
> 4. Copy the MDF and LDF files from my workstation computer to Sql Server
> 2000 on the server into the ../MSSQL/Data file.
> According to my logic (or lack thereof, as the case may be), my
> application
> should be able to connect to this database from any computer in the
> organization via a connection string (which is located in my application)
> like the following:
> "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
> Info=False;Initial Catalog=MyDatabase;Data
> Source=NewServerThatSqlServerWasJustInst
alledOn"
> Any comments and suggestions will be greatly appreciated!
> --
> Sandy|||Hi Jerry -
Thanks for your response! You are correct; that's essentially what I want
to do. I just wanted to make sure I had my steps correct and that I wasn't
forgetting anything.
In looking at my "list" again, I did forget that I have to be sure to put
the log on a separate drive on the server.
Anything else I may have overlooked?
Thanks for bringing the security issue to my attention!
Sandy
"Jerry Spivey" wrote:
> Sandy,
> It basically sounds like you're trying to move a SQL database from one
> instance of SQL Server to another and then connect to that new instance vi
a
> your client application. That is not an issue as long as the client
> application has the necessary connection information/string to the new
> instance and the network connectivity is present. However, there may be
> some issues with security as any logins will not be transfered because the
y
> are stored in the Master system database and not in the end-user database
> (only contains the db users). As such you may want to view the Microsoft
KB
> article #246133.
> HTH
> Jerry
> "Sandy" <Sandy@.discussions.microsoft.com> wrote in message
> news:57C7E2E5-6906-4B47-BE22-71983B3A6DF8@.microsoft.com...
>
>
Help - setup Sql Server 2000 on server on network
I have a VB6 application that is hooked up to a Sql Server database on my
workstation computer. I will be distributing this application and have to
install Sql Server 2000 on a server. I have never set up Sql Server on a
network server before. Please tell me if the following steps are correct:
1. Set up Windows 2000 Server operating system on the machine (they want me
to use a separate computer from our other servers).
2. Connect to the network.
3. Install Sql Server 2000 on the machine.
4. Copy the MDF and LDF files from my workstation computer to Sql Server
2000 on the server into the ../MSSQL/Data file.
According to my logic (or lack thereof, as the case may be), my application
should be able to connect to this database from any computer in the
organization via a connection string (which is located in my application)
like the following:
"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False;Initial Catalog=MyDatabase;Data
Source=NewServerThatSqlServerWasJustInstalledOn"
Any comments and suggestions will be greatly appreciated!
--
SandySandy,
It basically sounds like you're trying to move a SQL database from one
instance of SQL Server to another and then connect to that new instance via
your client application. That is not an issue as long as the client
application has the necessary connection information/string to the new
instance and the network connectivity is present. However, there may be
some issues with security as any logins will not be transfered because they
are stored in the Master system database and not in the end-user database
(only contains the db users). As such you may want to view the Microsoft KB
article #246133.
HTH
Jerry
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:57C7E2E5-6906-4B47-BE22-71983B3A6DF8@.microsoft.com...
> Hello -
> I have a VB6 application that is hooked up to a Sql Server database on my
> workstation computer. I will be distributing this application and have to
> install Sql Server 2000 on a server. I have never set up Sql Server on a
> network server before. Please tell me if the following steps are correct:
> 1. Set up Windows 2000 Server operating system on the machine (they want
> me
> to use a separate computer from our other servers).
> 2. Connect to the network.
> 3. Install Sql Server 2000 on the machine.
> 4. Copy the MDF and LDF files from my workstation computer to Sql Server
> 2000 on the server into the ../MSSQL/Data file.
> According to my logic (or lack thereof, as the case may be), my
> application
> should be able to connect to this database from any computer in the
> organization via a connection string (which is located in my application)
> like the following:
> "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
> Info=False;Initial Catalog=MyDatabase;Data
> Source=NewServerThatSqlServerWasJustInstalledOn"
> Any comments and suggestions will be greatly appreciated!
> --
> Sandy|||Hi Jerry -
Thanks for your response! You are correct; that's essentially what I want
to do. I just wanted to make sure I had my steps correct and that I wasn't
forgetting anything.
In looking at my "list" again, I did forget that I have to be sure to put
the log on a separate drive on the server.
Anything else I may have overlooked?
Thanks for bringing the security issue to my attention!
--
Sandy
"Jerry Spivey" wrote:
> Sandy,
> It basically sounds like you're trying to move a SQL database from one
> instance of SQL Server to another and then connect to that new instance via
> your client application. That is not an issue as long as the client
> application has the necessary connection information/string to the new
> instance and the network connectivity is present. However, there may be
> some issues with security as any logins will not be transfered because they
> are stored in the Master system database and not in the end-user database
> (only contains the db users). As such you may want to view the Microsoft KB
> article #246133.
> HTH
> Jerry
> "Sandy" <Sandy@.discussions.microsoft.com> wrote in message
> news:57C7E2E5-6906-4B47-BE22-71983B3A6DF8@.microsoft.com...
> > Hello -
> >
> > I have a VB6 application that is hooked up to a Sql Server database on my
> > workstation computer. I will be distributing this application and have to
> > install Sql Server 2000 on a server. I have never set up Sql Server on a
> > network server before. Please tell me if the following steps are correct:
> >
> > 1. Set up Windows 2000 Server operating system on the machine (they want
> > me
> > to use a separate computer from our other servers).
> >
> > 2. Connect to the network.
> >
> > 3. Install Sql Server 2000 on the machine.
> >
> > 4. Copy the MDF and LDF files from my workstation computer to Sql Server
> > 2000 on the server into the ../MSSQL/Data file.
> >
> > According to my logic (or lack thereof, as the case may be), my
> > application
> > should be able to connect to this database from any computer in the
> > organization via a connection string (which is located in my application)
> > like the following:
> >
> > "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
> > Info=False;Initial Catalog=MyDatabase;Data
> > Source=NewServerThatSqlServerWasJustInstalledOn"
> >
> > Any comments and suggestions will be greatly appreciated!
> > --
> > Sandy
>
>