Tuesday, March 27, 2012
Creating a VB.net event handler for a Stored Procedure
My application has a scheduled task which is created and scheduled by users of the application, whenever this scheduled task is run I would like it to contact the application to kick off a sequence of tasks. I would appreciate if anybody could point me in the right direction.You can script a custom trace that captures the execution of this task that can instantiate a COM object which in turn can do whatever you want it to do.|||I'm new to developement is there anywhere I can learn to do this.|||I don't know of any way to call code in a VB app running on another machine, but you can create a simple COM object and then use sp_OACreate (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_oa-oz_9k2t.asp) and the related procedures to launch your COM object on the server.
Will this do what you want?
-PatP|||There both running on the same machine so with a bit of luck I'll be able to get it working.
Thanks
Thursday, March 22, 2012
Creating a table in Access from an SSIS package
Did you tried with a script task ? Use the excel connection from the Connection Manager to connect to your Access DB and execute your create table query from a OleDbCommand object.
I've not tried that method, it just a thought.
sqlCreating a Stored Procedure with a Stored Procedure
I was wonder if any one knows if its possible to create run and drop
a stored procedure from within another stored procedure. You see i want
to have a table which has serveral stored procedures stored in it as
strings then use a stored procedure to extract one of these and create
a stored procedure with it, run it and drop it when its done. Is this
possible, and if so how bad a performance can i expect (i'm expecting
pretty bad).I think you can do this. but you can't create sps in other db from another
dbs stored procedure|||Hi DigitalDiamond ,
Prehaps this link solve your problem
http://blog.csdn.net/lihonggen0/arc...8/15/75447.aspx
with warm regards
Jatinder Singh|||Think about the reasons for trying to achieve something like this. Generally
there are several better ways to do it.
1) create all needed procedures in advance, then use the first procedure to
select the appropriate one;
2) use the first procedure to dynamically build a query to execute;
3) if you're trying to hide your code from the rest of the database users,
use encryption.
What exactly are you trying to do?
ML|||On 26 Jul 2005 04:35:12 -0700, DigitalDiamond wrote:
>Hi all,
> I was wonder if any one knows if its possible to create run and drop
>a stored procedure from within another stored procedure. You see i want
>to have a table which has serveral stored procedures stored in it as
>strings then use a stored procedure to extract one of these and create
>a stored procedure with it, run it and drop it when its done. Is this
>possible, and if so how bad a performance can i expect (i'm expecting
>pretty bad).
Hi DigitalDiamond,
Why would you even *want* to do this? Why not just create all the stored
procedures, then execute the one you need?
Your idea is terribly bad. Not because of performance (that would
probably not be as bad as you expect), but because of security. It is
like going on vacation and leaving the door of your house not only
unlocked, but even wide open. And placing a big sign in the yard: "Hey,
burglars - the door is open and I'm away until the end of the month, so
please help yoourself!"
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Sure, you can always write horrible code in nay language! Have you
ever had a course in basic Software Engineering? Please take one. Pay
attentation to the idea of a module of code, coupling and cohesion.|||You can. You can create temporary stored procedures too. Should you?
Probably not. A better solution is to use sp_executesql to execute dynamic
queries. sp_executesql accepts both input and output parameters (see
kb:262499). It also doesn't mess around with the system tables.
"DigitalDiamond" <chris.diamond@.ncumbria.nhs.uk> wrote in message
news:1122377712.694590.77220@.g47g2000cwa.googlegroups.com...
> Hi all,
> I was wonder if any one knows if its possible to create run and drop
> a stored procedure from within another stored procedure. You see i want
> to have a table which has serveral stored procedures stored in it as
> strings then use a stored procedure to extract one of these and create
> a stored procedure with it, run it and drop it when its done. Is this
> possible, and if so how bad a performance can i expect (i'm expecting
> pretty bad).
>|||It doesnt matter now i found a better way of doing it via restructing
the database set up i had. And also i have a degree in software
enginerring Celko and if you want to be a arse dont do it of groups
designed to help people|||Why would anyone allow 100,000 lines of codes but not 1000 stored
procedures? Having a good practice in place can help manage and
maintain the systems. It would be hard to manage something that
virtually does not exist!!!
Perhaps there might be programs that would drop other programs on the
fly out there. To the extent that without any trail and therefore,
without our knowledge. This makes things really complicated.
Wednesday, March 21, 2012
Creating a semaphore file on a network drive
Good Morning,
I'm hoping that someone can help me. I have a SQL 2005 SSIS package that will run Friday mornings to empty/load a table with data from another database. On Friday evenings I'll need to run another package, but want to make sure the table load completed prior to launch. For this I planned to use a file watcher task, however I cannot for the life of me figure out how to output a 'done' semaphore, from the morning job, to a networked drive.
A file system task will not work because there is not a 'create file' option. I do not have an existing file that I can rename either.
I tried an execute process task running cmd.exe with the following argument:
Code Snippet
echo Done> \\NetworkedServer\ftproot\Load.DoneThis fails because UNC paths are not recognized. (The package executes from another server so I cannot use a local path, nor am I allowed to set-up a local share.)
Can someone offer an alternative suggestion? I'm really hoping this is easier than I'm making it.
Thank you in advance,
Roger
Why not have the first package write a value to a SQL table that the second package queries?|||You coud try a simialr aproach using a table. You can update or insert a row to indicate the status of the process. Then the next package will query that table and decide whether to run or not.Monday, March 19, 2012
Creating a Report to PDF in a folder?
We would like to call the report from a procedure and have the proc generate the report in PDF format in the directory d:\info
Does anyone know how to do this?Try the subscription feature of Reporting Services? It will do exactly what you describe.|||Use the file share delivery method. Either create a special share with appropriate security settings, or use can also use the administrative share like this: \\localhost\d$\info, but this would required administrator credentials in the subscription.
Creating a report
Im new to dot net and CR.
I would like to create a a report based on an SQL query at run time.
How do i do it.
Tnx
PapsHave you tried doing a search on this forum or on Google or Crystal Report's website? There's tons of information on the many different ways to do Crystal Reports, you just have to a bit of digging!
Crystal Reports:
http://support.businessobjects.com/search/advsearch.asp
Google:
http://www.google.com
Crystal Reports Forum:
http://support.businessobjects.com/forums/default.asp
Creating a queryable failover
We have a failover database that is currently run using log shipping,
this means that the fail over is unusable.
What we would like to do is use a tool such as replication to instead
ensure that the fail over database is kept in sync and we can also use
the fail over database to run out reporting jobs.
We investigated SQL Server 2005 and found that with two way replication
this would work wonderfully well except for the fact that we are unable
to replicate new tables without creating a new snap shot.
As our database's are about 150GB in size creating an restoring a
snapshot takes about 2 days for SQL server, meaning that everytime we
add a new table the failover will be unavailable for 2 days, which is
unacceptable for both a fail over and reporting.
Is there any other way we can do this ? Happy to provide more details
if need.
- Barry
barry at 5thfinger dot com
How about database mirroring and creating a snapshot of the mirrored database?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<blat001@.gmail.com> wrote in message news:1159315688.269386.201360@.d34g2000cwd.googlegr oups.com...
> Hi,
> We have a failover database that is currently run using log shipping,
> this means that the fail over is unusable.
> What we would like to do is use a tool such as replication to instead
> ensure that the fail over database is kept in sync and we can also use
> the fail over database to run out reporting jobs.
> We investigated SQL Server 2005 and found that with two way replication
> this would work wonderfully well except for the fact that we are unable
> to replicate new tables without creating a new snap shot.
> As our database's are about 150GB in size creating an restoring a
> snapshot takes about 2 days for SQL server, meaning that everytime we
> add a new table the failover will be unavailable for 2 days, which is
> unacceptable for both a fail over and reporting.
> Is there any other way we can do this ? Happy to provide more details
> if need.
> - Barry
> barry at 5thfinger dot com
>
|||Barry - a simple way of achieving this setup is to use transactional
replication with queued updating subscribers. This can take care of identity
range issues and provide you with a means of getting new articles easily
incorporated into the setup.
As Tibor mentions, Mirroring and Snapshots is also now to be considered as
an alternative in this space, assuming your reporting requirements don't
include the use of FTI. This has the (huge) added advantage of automatic
failover if you have a witness and high safety mode enabled.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||You might want to add the new articles to a different publication. This way
you would not have to create the entire snapshot. What form of replication
are you using? Merge? Bi-directional transactional replication and peer to
peer do not require the entire snapshot to be regeneretated.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<blat001@.gmail.com> wrote in message
news:1159315688.269386.201360@.d34g2000cwd.googlegr oups.com...
> Hi,
> We have a failover database that is currently run using log shipping,
> this means that the fail over is unusable.
> What we would like to do is use a tool such as replication to instead
> ensure that the fail over database is kept in sync and we can also use
> the fail over database to run out reporting jobs.
> We investigated SQL Server 2005 and found that with two way replication
> this would work wonderfully well except for the fact that we are unable
> to replicate new tables without creating a new snap shot.
> As our database's are about 150GB in size creating an restoring a
> snapshot takes about 2 days for SQL server, meaning that everytime we
> add a new table the failover will be unavailable for 2 days, which is
> unacceptable for both a fail over and reporting.
> Is there any other way we can do this ? Happy to provide more details
> if need.
> - Barry
> barry at 5thfinger dot com
>
Creating a queryable failover
We have a failover database that is currently run using log shipping,
this means that the fail over is unusable.
What we would like to do is use a tool such as replication to instead
ensure that the fail over database is kept in sync and we can also use
the fail over database to run out reporting jobs.
We investigated SQL Server 2005 and found that with two way replication
this would work wonderfully well except for the fact that we are unable
to replicate new tables without creating a new snap shot.
As our database's are about 150GB in size creating an restoring a
snapshot takes about 2 days for SQL server, meaning that everytime we
add a new table the failover will be unavailable for 2 days, which is
unacceptable for both a fail over and reporting.
Is there any other way we can do this ? Happy to provide more details
if need.
- Barry
barry at 5thfinger dot com
How about database mirroring and creating a snapshot of the mirrored database?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<blat001@.gmail.com> wrote in message news:1159315688.269386.201360@.d34g2000cwd.googlegr oups.com...
> Hi,
> We have a failover database that is currently run using log shipping,
> this means that the fail over is unusable.
> What we would like to do is use a tool such as replication to instead
> ensure that the fail over database is kept in sync and we can also use
> the fail over database to run out reporting jobs.
> We investigated SQL Server 2005 and found that with two way replication
> this would work wonderfully well except for the fact that we are unable
> to replicate new tables without creating a new snap shot.
> As our database's are about 150GB in size creating an restoring a
> snapshot takes about 2 days for SQL server, meaning that everytime we
> add a new table the failover will be unavailable for 2 days, which is
> unacceptable for both a fail over and reporting.
> Is there any other way we can do this ? Happy to provide more details
> if need.
> - Barry
> barry at 5thfinger dot com
>
|||Barry - a simple way of achieving this setup is to use transactional
replication with queued updating subscribers. This can take care of identity
range issues and provide you with a means of getting new articles easily
incorporated into the setup.
As Tibor mentions, Mirroring and Snapshots is also now to be considered as
an alternative in this space, assuming your reporting requirements don't
include the use of FTI. This has the (huge) added advantage of automatic
failover if you have a witness and high safety mode enabled.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||You might want to add the new articles to a different publication. This way
you would not have to create the entire snapshot. What form of replication
are you using? Merge? Bi-directional transactional replication and peer to
peer do not require the entire snapshot to be regeneretated.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<blat001@.gmail.com> wrote in message
news:1159315688.269386.201360@.d34g2000cwd.googlegr oups.com...
> Hi,
> We have a failover database that is currently run using log shipping,
> this means that the fail over is unusable.
> What we would like to do is use a tool such as replication to instead
> ensure that the fail over database is kept in sync and we can also use
> the fail over database to run out reporting jobs.
> We investigated SQL Server 2005 and found that with two way replication
> this would work wonderfully well except for the fact that we are unable
> to replicate new tables without creating a new snap shot.
> As our database's are about 150GB in size creating an restoring a
> snapshot takes about 2 days for SQL server, meaning that everytime we
> add a new table the failover will be unavailable for 2 days, which is
> unacceptable for both a fail over and reporting.
> Is there any other way we can do this ? Happy to provide more details
> if need.
> - Barry
> barry at 5thfinger dot com
>
Creating a queryable failover
We have a failover database that is currently run using log shipping,
this means that the fail over is unusable.
What we would like to do is use a tool such as replication to instead
ensure that the fail over database is kept in sync and we can also use
the fail over database to run out reporting jobs.
We investigated SQL Server 2005 and found that with two way replication
this would work wonderfully well except for the fact that we are unable
to replicate new tables without creating a new snap shot.
As our database's are about 150GB in size creating an restoring a
snapshot takes about 2 days for SQL server, meaning that everytime we
add a new table the failover will be unavailable for 2 days, which is
unacceptable for both a fail over and reporting.
Is there any other way we can do this ? Happy to provide more details
if need.
- Barry
barry at 5thfinger dot comHow about database mirroring and creating a snapshot of the mirrored databas
e?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<blat001@.gmail.com> wrote in message news:1159315688.269386.201360@.d34g2000cwd.googlegroups.
com...
> Hi,
> We have a failover database that is currently run using log shipping,
> this means that the fail over is unusable.
> What we would like to do is use a tool such as replication to instead
> ensure that the fail over database is kept in sync and we can also use
> the fail over database to run out reporting jobs.
> We investigated SQL Server 2005 and found that with two way replication
> this would work wonderfully well except for the fact that we are unable
> to replicate new tables without creating a new snap shot.
> As our database's are about 150GB in size creating an restoring a
> snapshot takes about 2 days for SQL server, meaning that everytime we
> add a new table the failover will be unavailable for 2 days, which is
> unacceptable for both a fail over and reporting.
> Is there any other way we can do this ? Happy to provide more details
> if need.
> - Barry
> barry at 5thfinger dot com
>|||Barry - a simple way of achieving this setup is to use transactional
replication with queued updating subscribers. This can take care of identity
range issues and provide you with a means of getting new articles easily
incorporated into the setup.
As Tibor mentions, Mirroring and Snapshots is also now to be considered as
an alternative in this space, assuming your reporting requirements don't
include the use of FTI. This has the (huge) added advantage of automatic
failover if you have a witness and high safety mode enabled.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .|||You might want to add the new articles to a different publication. This way
you would not have to create the entire snapshot. What form of replication
are you using? Merge? Bi-directional transactional replication and peer to
peer do not require the entire snapshot to be regeneretated.
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<blat001@.gmail.com> wrote in message
news:1159315688.269386.201360@.d34g2000cwd.googlegroups.com...
> Hi,
> We have a failover database that is currently run using log shipping,
> this means that the fail over is unusable.
> What we would like to do is use a tool such as replication to instead
> ensure that the fail over database is kept in sync and we can also use
> the fail over database to run out reporting jobs.
> We investigated SQL Server 2005 and found that with two way replication
> this would work wonderfully well except for the fact that we are unable
> to replicate new tables without creating a new snap shot.
> As our database's are about 150GB in size creating an restoring a
> snapshot takes about 2 days for SQL server, meaning that everytime we
> add a new table the failover will be unavailable for 2 days, which is
> unacceptable for both a fail over and reporting.
> Is there any other way we can do this ? Happy to provide more details
> if need.
> - Barry
> barry at 5thfinger dot com
>
Creating a queryable failover
We have a failover database that is currently run using log shipping,
this means that the fail over is unusable.
What we would like to do is use a tool such as replication to instead
ensure that the fail over database is kept in sync and we can also use
the fail over database to run out reporting jobs.
We investigated SQL Server 2005 and found that with two way replication
this would work wonderfully well except for the fact that we are unable
to replicate new tables without creating a new snap shot.
As our database's are about 150GB in size creating an restoring a
snapshot takes about 2 days for SQL server, meaning that everytime we
add a new table the failover will be unavailable for 2 days, which is
unacceptable for both a fail over and reporting.
Is there any other way we can do this ? Happy to provide more details
if need.
- Barry
barry at 5thfinger dot comHow about database mirroring and creating a snapshot of the mirrored database?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<blat001@.gmail.com> wrote in message news:1159315688.269386.201360@.d34g2000cwd.googlegroups.com...
> Hi,
> We have a failover database that is currently run using log shipping,
> this means that the fail over is unusable.
> What we would like to do is use a tool such as replication to instead
> ensure that the fail over database is kept in sync and we can also use
> the fail over database to run out reporting jobs.
> We investigated SQL Server 2005 and found that with two way replication
> this would work wonderfully well except for the fact that we are unable
> to replicate new tables without creating a new snap shot.
> As our database's are about 150GB in size creating an restoring a
> snapshot takes about 2 days for SQL server, meaning that everytime we
> add a new table the failover will be unavailable for 2 days, which is
> unacceptable for both a fail over and reporting.
> Is there any other way we can do this ? Happy to provide more details
> if need.
> - Barry
> barry at 5thfinger dot com
>|||Barry - a simple way of achieving this setup is to use transactional
replication with queued updating subscribers. This can take care of identity
range issues and provide you with a means of getting new articles easily
incorporated into the setup.
As Tibor mentions, Mirroring and Snapshots is also now to be considered as
an alternative in this space, assuming your reporting requirements don't
include the use of FTI. This has the (huge) added advantage of automatic
failover if you have a witness and high safety mode enabled.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .|||You might want to add the new articles to a different publication. This way
you would not have to create the entire snapshot. What form of replication
are you using? Merge? Bi-directional transactional replication and peer to
peer do not require the entire snapshot to be regeneretated.
--
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
<blat001@.gmail.com> wrote in message
news:1159315688.269386.201360@.d34g2000cwd.googlegroups.com...
> Hi,
> We have a failover database that is currently run using log shipping,
> this means that the fail over is unusable.
> What we would like to do is use a tool such as replication to instead
> ensure that the fail over database is kept in sync and we can also use
> the fail over database to run out reporting jobs.
> We investigated SQL Server 2005 and found that with two way replication
> this would work wonderfully well except for the fact that we are unable
> to replicate new tables without creating a new snap shot.
> As our database's are about 150GB in size creating an restoring a
> snapshot takes about 2 days for SQL server, meaning that everytime we
> add a new table the failover will be unavailable for 2 days, which is
> unacceptable for both a fail over and reporting.
> Is there any other way we can do this ? Happy to provide more details
> if need.
> - Barry
> barry at 5thfinger dot com
>
Creating a Proxy Account
I am trying to run SSIS packages under SQL Server Agent 2005 and I keep getting a package failed error in the event viewer.
I've heard that I need to set up a proxy account. I have found the following code and need a little explanation on what all the parts mean since I am very new to this:
Use master
CREATE CREDENTIAL [MyCredential] WITH IDENTITY = 'yourdomain\myWindowAccount', secret = 'WindowLoginPassword'
Use msdb
Sp_add_proxy @.proxy_name='MyProxy', @.credential_name='MyCredential'
Sp_grant_login_to_proxy @.login_name=' devlogin', @.proxy_name='MyProxy'
Sp_grant_proxy_to_subsystem @.proxy_name='MyProxy', @.subsystem_name='SSIS'
Let's say for the sake of argument my domain is called CompanyInc and I log into windows with my name Philip_Jaques and my password is badpassw0rd. Would I modify the above code this way to create my proxy?
Use master
CREATE CREDENTIAL [MyCredential] WITH IDENTITY = 'CompanyInc\Philip_Jaques', secret = 'badpassw0rd'
Use msdb
Sp_add_proxy @.proxy_name='MyProxy', @.credential_name='MyCredential'
Sp_grant_login_to_proxy @.login_name='Philip_Jaques', @.proxy_name='MyProxy'
Sp_grant_proxy_to_subsystem @.proxy_name='MyProxy', @.subsystem_name='SSIS'
Also, when I create this proxy account where in SQL Server 2005 can I go to view it and its properties? And assuming I get the proxy account set up correctly, how do I get my current jobs to start using it so they will successfully run?
Thanks in advance for your help and advice!
I've never heard of having to create a proxy to get SqlAgent to run SSIS accounts. Sql Agent should be setup to run under a service account already, and will run SSIS packages no problem. Where did you find this information?|||This article pretty much explains my problem:
http://support.microsoft.com/default.aspx/kb/918760
Sunday, March 11, 2012
Creating a new named instance
As understand it, the only way to add another SQL Express 2005 named instance is to run SQLEXPR32.EXE again.However, when you to, right at the end, you get the following error message:
"An installation package for the product MS SQLK Server VSS Writer cannot be found.Try the installation again using a valid copy of the installation package 'SQLWriter.msi'"
So, I deleted all named instances, and the repeated the procedure and did not get this error and it installed fine. Obviously, I would not be able to delete all instances, but in this case it didn't matter.
So, here are my questions:
Question 1) Am I correct you must rerun SQLEXPR32.EXE to create a new named instance? (I think the answer is yes)
Question 2) Is there a way to rename an existing named instance?(I think the answer is no)
Question 3) The install/uninstall for SQLEXPR32.EXE is incredibly buggy. I have spend days trying to remove an named instance with no succes. Once your remove all named instances from Control Pannel, you stll have not removed SQL Express 2005.How do you remove it?We are considering other avenues because of the incredible problems with this product. Also, we inadvertantly installed SQL Express 2005 Advanced Services, when we meant to install SQL Express 2005, so we would like to uninstall Advance Serviuces and reinstall SQL Express 2005
Question 4) I am switching from the Outlook Express newsgroups to these groups. In the context of these groups, what is the difference betwee a Forum and a Newsgroup?
Thanks
Bob
hi Bob,
BobInIndy wrote:
As understand it, the only way to add another SQL Express 2005 named instance is to run SQLEXPR32.EXE again. However, when you to, right at the end, you get the following error message:
"An installation package for the product MS SQLK Server VSS Writer cannot be found. Try the installation again using a valid copy of the installation package 'SQLWriter.msi'"
you can try unpacking the SQLExpress installer and manual install SQLWriter.msi and, eventually, SQL Native Client msi as well, as this is usually the one causing problems.. but your case does not indicates it..
So, I deleted all named instances, and the repeated the procedure and did not get this error and it installed fine. Obviously, I would not be able to delete all instances, but in this case it didn't matter.
So, here are my questions:
Question 1) Am I correct you must rerun SQLEXPR32.EXE to create a new named instance? (I think the answer is yes)
yes..
Question 2) Is there a way to rename an existing named instance? (I think the answer is no)
no
[quote]
Question 3) The install/uninstall for SQLEXPR32.EXE is incredibly buggy. I have spend days trying to remove an named instance with no succes. Once your remove all named instances from Control Pannel, you stll have not removed SQL Express 2005. How do you remove it? We are considering other avenues because of the incredible problems with this product. Also, we inadvertantly installed SQL Express 2005 Advanced Services, when we meant to install SQL Express 2005, so we would like to uninstall Advance Serviuces and reinstall SQL Express 2005
some times you have to manually remove phantoms accessing file system and registry, as described in here and/or here ..
Question 4) I am switching from the Outlook Express newsgroups to these groups. In the context of these groups, what is the difference betwee a Forum and a Newsgroup?
newsgroup are another community type, usually diffused and accessed via NNTP protocol, where forums have been designed for web access, usually with additional features like link sections, tips section and the like.. anyway this one should be consider a forum, AFAIK..
regardsThursday, March 8, 2012
Creating a job with many steps including DTS
(using Windows 2000 Server/SQL2K Ent Ed SP3a)
I am looking to create a job with a number of steps inside it. I need
the job to run on a sunday afternoon when our OLTP system is at our
quietest in terms of user connections and throughput. The job purpose
is to copy data (24,000,000 rows) from one table to another on the same
database, via a DTS package. I then need to rename the old table,
removing the triggers and views on it, then rename the new table, and
add the relevent objects (including indexs and constraints) then add
the permissions on it.
These are the steps:
1) Set restricted user mode on database
2) Run the DTS package
3) Remove triggers and views on old table
4) Rename old table
5) Rename new table
6) Add indexs and constraints to new table
7) Add triggers/views to new table
8) Set permissions to new table
9) Set multi user mode on database
My question would be does the above seem logical, or would there be a
better way of performing this process? Do I need the DTS package, would
a INSERT INTO be better, or could I use a DTS package for the entire
process?
Thanks and rgds,
qhHi
INSERT..SELECT may be a better option.
You may want to try something like the following to avoid the rename steps:
Create Archive Table
Insert Into Archive Table
Delete Archived Data from Live Table
ReIndex Live Table
You may also be able to do this in smaller increments each night instead of
once a w

John
"Scott" wrote:
> Hi,
> (using Windows 2000 Server/SQL2K Ent Ed SP3a)
> I am looking to create a job with a number of steps inside it. I need
> the job to run on a sunday afternoon when our OLTP system is at our
> quietest in terms of user connections and throughput. The job purpose
> is to copy data (24,000,000 rows) from one table to another on the same
> database, via a DTS package. I then need to rename the old table,
> removing the triggers and views on it, then rename the new table, and
> add the relevent objects (including indexs and constraints) then add
> the permissions on it.
> These are the steps:
> 1) Set restricted user mode on database
> 2) Run the DTS package
> 3) Remove triggers and views on old table
> 4) Rename old table
> 5) Rename new table
> 6) Add indexs and constraints to new table
> 7) Add triggers/views to new table
> 8) Set permissions to new table
> 9) Set multi user mode on database
>
> My question would be does the above seem logical, or would there be a
> better way of performing this process? Do I need the DTS package, would
> a INSERT INTO be better, or could I use a DTS package for the entire
> process?
> Thanks and rgds,
> qh
>
Creating a job from a trigger
I have a trigger on a table, which when called, creates a job to run in n
minutes. The trigger runs fine and the job is created, however with a small
issue.
The username that is used as the Job Owner, ends up to be the name of the
user that triggered the trigger eventhough the code that creates the job
specifies a different name.
What am I doing wrong? How can I resolve this?
Here is the SP that is run in the trigger:
exec msdb..sp_add_job @.job_name = 'TEST',
@.owner_login_name = 'sa',
@.notify_level_eventlog = 0,
@.delete_level = 1
The code above says user SA but the job ends up running as TESTUSER and it
makes the job fail because a that user is not a SA nor able to run a CMD
job.
Please help!
Thank you.slamm wrote:
> Hello, All
> I have a trigger on a table, which when called, creates a job to run
> in n minutes. The trigger runs fine and the job is created, however
> with a small issue.
> The username that is used as the Job Owner, ends up to be the name of
> the user that triggered the trigger eventhough the code that creates
> the job specifies a different name.
> What am I doing wrong? How can I resolve this?
> Here is the SP that is run in the trigger:
> exec msdb..sp_add_job @.job_name = 'TEST',
> @.owner_login_name = 'sa',
> @.notify_level_eventlog = 0,
> @.delete_level = 1
> The code above says user SA but the job ends up running as TESTUSER
> and it makes the job fail because a that user is not a SA nor able to
> run a CMD job.
> Please help!
> Thank you.
I don't think that's going to work. If it did, then any user who had job
creation rights could alias a job as the system administrator, giving
them more rights in the process. You can grant the user rights to do
what needs to run or you can do the following:
Instead of creating a job directly from the trigger, insert the
necessary job criteria into a custom table of application jobs (to be
created). Create a recurring job on the server that monitors this table
at specified intervals and creates the jobs itself. Then you don't even
have to grant users job creation rights. They only need rights to your
application job table.
David Gugick
Imceda Software
www.imceda.com
Wednesday, March 7, 2012
Creating a formula at run time
Thanks a lotWhy do you want to do this?|||hi Madhi,
Tks 4 ur concern.
Im building a Report Tool, it should facilitate any number of columns (it should be very flexible). So I plan to use formulas, using them I can pass parameters to say what to display on the report. If I can create new formulas at run time this is possible.
Regards,
Janitha|||I dont know whether this helps you.
Add the columns in a tablebase table add design that report using those fields|||Madhi,
I'm designing a report tool. it will be used to create many user defined customizable reports. I can use known number of formulas (say 10) as report fields and pass and DB field or calculation to the report. But my problem is if I use 10 (or even 100) formulas, I have limited the number of maximum fields the report can display. To avoid that limitation I want to add formulas at run time.
Anyway I dont understand what you mean by tablebase table. Please help me out.
Thanks
rgds
Janitha|||Do u think this is possible|||Janitha,
Does your Report have 10 fields as default?
Anyway I dont understand what you mean by tablebase table.
I mean database table|||hi Madhi!
Thanks again,
Im using 10 blank formulas. I pass queries at run time to those formulas to generate any report. But I dont want any limitations, well I can think of using 100 fields. Nobody never will user 100 fields in one report, isnt it. But Im looking for a more professional solutions.|||Janitha,
I think the only way is add as many fields as possible that CR allows and pass the values to them
If you use Crystal Report Viewer, then there is an option to add formulas at runtime
CrRpt.FormulaFields.Add "FormulaName", "Value"|||I need VB.NET code for Report Designer.|||can any one help me please!|||Do any one know a better way?
:wave:|||need VB.NET code for Report Designer
Janitha,
Do you need VB.NET code to call the Report?|||No no, I want to create formulas using VB.NET code at run time, thanks for ur earlier reply. But I must use report designer, it provide much flexible way to design the report, I only couldnt find this option.
Thanks|||It seems this is impossible @.##@.|||Yea!!! It seems this is impossible @.##@.|||It seems this is impossible @.##@.|||Janitha,
Search for your solution in this web site
http://support.businessobjects.com/|||Well Madhi! I tried "businessobjects" site as well. but I could not get their tech support cos I dont have a Licence. They don't give sulutions otherwise.
The only option is to use "Crystal Repository"
Thanks 4 ur concern Madhi
Saturday, February 25, 2012
creating a database
If I have a schema for creating a database, is there a command line
application I can run and pass it the filename of the schema and it will then
create that database? If so, can someone point me to a url showing the
command line syntax for it?
And, what registry entry can I use to determine where this program is - as
some people do not install in C:\Program Files\...
thanks - dave
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
Maybe this helps. http://support.microsoft.com/kb/325003
Use the variable %programfiles%
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"David Thielen" wrote:
| Hi;
|
| If I have a schema for creating a database, is there a command line
| application I can run and pass it the filename of the schema and it will
then
| create that database? If so, can someone point me to a url showing the
| command line syntax for it?
|
| And, what registry entry can I use to determine where this program is - as
| some people do not install in C:\Program Files\...
|
| thanks - dave
|
| --
| thanks - dave
| david_at_windward_dot_net
| http://www.windwardreports.com
|
| Cubicle Wars - http://www.windwardreports.com/film.htm
|
|
|||osql is the tool I need.
I am retecient to use %programfiles% because we used to put Sql Server on d:
while programfiles was on c: - so on those systems at least, that would not
find it.
Is there anything Sql Server writes to the registry with it's location? I
think there was and I used it in a program where I used to work - but I don't
have access to that code.
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Dave Patrick" wrote:
> Maybe this helps. http://support.microsoft.com/kb/325003
> Use the variable %programfiles%
> --
> Regards,
> Dave Patrick ...Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
> "David Thielen" wrote:
> | Hi;
> |
> | If I have a schema for creating a database, is there a command line
> | application I can run and pass it the filename of the schema and it will
> then
> | create that database? If so, can someone point me to a url showing the
> | command line syntax for it?
> |
> | And, what registry entry can I use to determine where this program is - as
> | some people do not install in C:\Program Files\...
> |
> | thanks - dave
> |
> | --
> | thanks - dave
> | david_at_windward_dot_net
> | http://www.windwardreports.com
> |
> | Cubicle Wars - http://www.windwardreports.com/film.htm
> |
> |
>
>
|||You could look at 'Path' and or 'SQLPath' found below but you really
shouldn't need the fully qualified path;
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Tools\ClientSetup
HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup
since the installation of client tools appends to the system path variable.
C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program
Files\Microsoft SQL Server\80\Tools\Binn\
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"David Thielen" wrote:
| osql is the tool I need.
|
| I am retecient to use %programfiles% because we used to put Sql Server on
d:
| while programfiles was on c: - so on those systems at least, that would
not
| find it.
|
| Is there anything Sql Server writes to the registry with it's location? I
| think there was and I used it in a program where I used to work - but I
don't
| have access to that code.
|
| --
| thanks - dave
| david_at_windward_dot_net
| http://www.windwardreports.com
|
| Cubicle Wars - http://www.windwardreports.com/film.htm
|||thank you - that looks perfect.
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Dave Patrick" wrote:
> You could look at 'Path' and or 'SQLPath' found below but you really
> shouldn't need the fully qualified path;
> HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\80\Tools\ClientSetup
> HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup
> since the installation of client tools appends to the system path variable.
> C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program
> Files\Microsoft SQL Server\80\Tools\Binn\
>
> --
> Regards,
> Dave Patrick ...Please no email replies - reply in newsgroup.
> Microsoft Certified Professional
> Microsoft MVP [Windows]
> http://www.microsoft.com/protect
> "David Thielen" wrote:
> | osql is the tool I need.
> |
> | I am retecient to use %programfiles% because we used to put Sql Server on
> d:
> | while programfiles was on c: - so on those systems at least, that would
> not
> | find it.
> |
> | Is there anything Sql Server writes to the registry with it's location? I
> | think there was and I used it in a program where I used to work - but I
> don't
> | have access to that code.
> |
> | --
> | thanks - dave
> | david_at_windward_dot_net
> | http://www.windwardreports.com
> |
> | Cubicle Wars - http://www.windwardreports.com/film.htm
>
>
|||You can use sp_helpfile to return the file locations.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"David Thielen" <thielen@.nospam.nospam> wrote in message
news:FC83AF0A-B244-4B64-A83F-36A21A6ADECA@.microsoft.com...[vbcol=seagreen]
> osql is the tool I need.
> I am retecient to use %programfiles% because we used to put Sql Server on
> d:
> while programfiles was on c: - so on those systems at least, that would
> not
> find it.
> Is there anything Sql Server writes to the registry with it's location? I
> think there was and I used it in a program where I used to work - but I
> don't
> have access to that code.
> --
> thanks - dave
> david_at_windward_dot_net
> http://www.windwardreports.com
> Cubicle Wars - http://www.windwardreports.com/film.htm
>
>
> "Dave Patrick" wrote:
|||You're welcome.
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"David Thielen" wrote:
| thank you - that looks perfect.
|
| --
| thanks - dave
| david_at_windward_dot_net
| http://www.windwardreports.com
|
| Cubicle Wars - http://www.windwardreports.com/film.htm
Friday, February 24, 2012
creating a CSV file
Can anybody run me through the process to create a CSV file from an SQLexpress database using BCP.exe ?
Or is there a simpler way to create a CSV for that matter?
Really important and would be much appreciated.
Have a look at
http://www.codeproject.com/aspnet/ImportExportCSV.asp A Simplified SQL-CSV Import/Export FunctionalitySunday, February 19, 2012
CreateReport() method under ASP.NET
permisssions to run this method.
So,
1) I went to ReportServices roles and anded a new group for IUSR_XXXXX
user
2) Assigned ReportserverSysadmin role for the new group.
3) Also set db_owner permissions for the IUSR_XXXXX user in
ReportService
related databases on
my local instance of MS SQL.
No results. Still can't call method CreateReport().
Any ideas ?
Thanks
Paul
PS. BTW this method works fine from *.rss script that is running under
local Admin account.There can be a few reasons that most likely cause this:
1. You have anonymous authentication enabled for "Reports" and
"ReportSerever" virtual folders. Go to IIS manager and make sure anonymous
access is disabled.
2. You are calling this method from within an ASP.NET application that
doesn't impersonate its user. It calls CreateReport using its own identity.
--
Dmitry Vasilevsky, SQL Server Reporting Services Developer
This posting is provided "AS IS" with no warranties, and confers no rights.
--
---
"pTsy" <ptsygura@.bna.com> wrote in message
news:#pDOs2veEHA.2916@.TK2MSFTNGP12.phx.gbl...
> CreateReport throws an error saying that user IUSR_XXXXX doesn't have
> permisssions to run this method.
> So,
> 1) I went to ReportServices roles and anded a new group for IUSR_XXXXX
> user
> 2) Assigned ReportserverSysadmin role for the new group.
> 3) Also set db_owner permissions for the IUSR_XXXXX user in
> ReportService
> related databases on
> my local instance of MS SQL.
> No results. Still can't call method CreateReport().
> Any ideas ?
> Thanks
> Paul
> PS. BTW this method works fine from *.rss script that is running under
> local Admin account.
>
Friday, February 17, 2012
Created a subscription but doesn't run
I created Reporting Services subscriptions, but they doesn't run a
al
My reports are ok, I can display them without any problem on m
browser, and export them on pdf format. But subscription seems to b
totaly inactive
- reporting services SP1 and SP2 installe
- I tried File Share (with correct credentials) and e-mai
subscriptio
- selected schedule is "hourly", every 5 minutes (for testing
- on "Subscription Details" page, status is "New subscription" an
"Last run" column is empt
Thank you for any helHi
Is SQL Server Agent Running on your SQL Server?
This is requited at this places the jobs into the RS queue when a report is
scheduled.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"MacFly" <macfly92@.tiscali-dot-fr.no-spam.invalid> wrote in message
news:Le6dnVH9WcniQXzfRVn_vQ@.giganews.com...
>I recently installed Reporting Services on my computer
> I created Reporting Services subscriptions, but they doesn't run at
> all
> My reports are ok, I can display them without any problem on my
> browser, and export them on pdf format. But subscription seems to be
> totaly inactive.
> - reporting services SP1 and SP2 installed
> - I tried File Share (with correct credentials) and e-mail
> subscription
> - selected schedule is "hourly", every 5 minutes (for testing)
> - on "Subscription Details" page, status is "New subscription" and
> "Last run" column is empty
> Thank you for any help
>|||Yes, SQL Server Agent is Running on my SQL Server
After multiple attempts, I didn't succeed
My configuration was
SQL Server was on a server running under Windows 2003 Server
Report Server, Report Manager, Report Designer were on my own compute
(for testing), under Win X
I uninstalled Report Server + Report Manager from my XP computer, an
installed them on server running with windows 2003 server (beside SQ
Server) => it works fine
So I still have no answer, I only bypassed the problem..
If anyone has an idea, it still would be welcom|||when you change the login name the service runs under the encrypted data no
longer works. This includes the scheduling since it uses encrypted logins to
login and run the report. you will have to delete encrypted data and restart
the service.
MacFly wrote:
>Yes, SQL Server Agent is Running on my SQL Server
>After multiple attempts, I didn't succeed
>My configuration was
>SQL Server was on a server running under Windows 2003 Server
>Report Server, Report Manager, Report Designer were on my own compute
>(for testing), under Win X
>I uninstalled Report Server + Report Manager from my XP computer, an
>installed them on server running with windows 2003 server (beside SQ
>Server) => it works fine
>So I still have no answer, I only bypassed the problem..
>If anyone has an idea, it still would be welcom
--
Gene Hunter
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200508/1
Created .dtsx file How do I schedule it?
How dow you schedule a file(.dtsx)(I think it is a package) that was created in the SQL Server BI Design Studio to run? I can locate the file I created in SQL Server Management Studio and see it in the right hand pane and even edit it. I can run it in the Design Studio, but cant see how to do that in Management Studio nor how to schedule it.
This is my first attempt at recreating a DTS package using SQL Server tools instead of the Legacy conversion wizard, and I think my brain has overheated. I just cant find it on the Management Screen or the Design. I am also not searching correctly anymore on books online because I cannot find it.
Thanks for pointing me to where I need to go or do.
Tracey
Thank you so much. This is exactly what I needed. I think I had just gotten myself too flustered and you cleared it all up.