Showing posts with label runs. Show all posts
Showing posts with label runs. Show all posts

Thursday, March 29, 2012

credentials and permissions for the account that runs reportServer

Hi all,
I'm having a tough time finding what kind of permissions are needed for the
account that runs the Report Server windows Service.
I have my Report Server on a Win2K workstation with IIS and SQL Server on a
different computer (win2k Server and SQL Server 2000 with Sp3a).
We were able to make the subscriptions (emails and file sharing) with the
user being in the domain admin group. Now we are trying to give a little
less permissions to that account, but all the subscriptions are now showing
errors (in the subscription page only, log files are all fine).
The user is a local administrator and is part of the system operator, domain
operator, domain user and user groups on the network.
Does that user need to be a domain administrator? If we have too I don't
really mind but it would be safer to have it with less powerfull rights.
Thanks in advance for your help!I have some more informations so maybe it will help you help me!
The jobs are being created in SQL server. I can see them in SQL Server
Agent. They are even marked as success.
The problem is that I don't receive the email or the file is not created in
the folder as expected. Also the subscription is not being updated in
reports manager. It is still showing as a new subscription as if it was not
executed.

Monday, March 19, 2012

Creating SQLServer Jobs in Enterprise Manager

I would like to create a job in Enterprise manager that runs sp_who2
and write the output to a file. The filename would need to be appended
with a timestamp that makes the file unique. I can then write another
job that will cleanup the directory by deleting files that are older
than a specified date. This is a very simple process in unix platform.
I am hoping that it can be done in Windows but I don't know how?

Any help will be applicicated..You can send the output of a job step directly to a file (see the
Advanced tab), but there's no easy way to set the file name
dynamically. You might be able to use sp_update_jobstep to set it at
runtime, but then you would still have to do the cleanup part, which
would mean using xp_cmdshell.

Personally, I would use a script in a langauge like VBScript, Perl or
Python to do this:

1. Work out the correct filename
2. Call osql.exe to get the output into the file (see the -Q and -o
options)
3. Clean up any old files

You can then call the script from a job step - it's much easier to
manipulate files outside the database.

Simon

Friday, February 24, 2012

Creating Log file & Attaching db?

Bit of a SQL newbie, having taken over a support role for a piece of software that my firm sells. It is basically a DB that runs on MSDE or SQL Server in either desktop or enterprise scenarios.

We do sell our software to clients who may or may not already have SQL on their machines. During installation, it searches for sqlservr.exe for existing SQL installations and if it finds nothing, will then install MSDE 1.0 to house the db files.

My question is this -

I can manually create a db or manually attach an existing db through sql query analyser where there is a full-blown SQL installation. Is there any way I can do the same where there is only MSDE installed? The simple solution, I guess, would be to download one of the freeware or shareware MSDE "Enterprise Managers", but this won't always be suitable for a client installation.

Many thanks for your assistance all.

:cool:you could use sp_attach_db to attach a sqlserver database to sqlserver. Don't know about msde though.|||you could use sp_attach_db to attach a sqlserver database to sqlserver. Don't know about msde though.

Thanks

Yep, this is what I would use if I was doing it through the SQL. Still wondering about MSDE tho.
:confused:|||You can look into SQL-DMO and write up a quick routine that would do the attaching.

Creating Job with ActiveX script

Hi,
Have created a VBscript that run SQL-DMO that runs successfully as a .vbs
file.
However, I wanted to schedule the process so I created a job that runs this
script with the step as an ActiveX script step.
However, I get the error: Error 14277 Command script does not destroy all
objects it creates.
I checked the code and I only create two SQL-DMO objects of which I both set
to 'Nothing' at the end.
Have checked MS Knowledge Base and Internet but find nothing on it, other
that use DTS instead. I can do that but wondered why this error should occur.
Using SQL Server 7.0, SP3. Thanks.
These objects do not need to be created explicitly with CreateObject. Any
variable assigned with Set is an object and will need to be set to Nothing.
ie
Set sql = CreateObject("SQLOLEDB.Connection")
...
Set rs = sq.Execute("SELECT name from master.dbo.sysdatabases")
Set rs = Nothing
Set sql = Nothing
Regards
Barry McAuslin
Look inside your SQL Server files with SQL File Explorer.
Go to http://www.sqlfe.com for more information.
"PRW" <PRW@.discussions.microsoft.com> wrote in message
news:BF401CF0-746F-43C4-B551-6DE1A8C6042D@.microsoft.com...
> Hi,
> Have created a VBscript that run SQL-DMO that runs successfully as a .vbs
> file.
> However, I wanted to schedule the process so I created a job that runs
this
> script with the step as an ActiveX script step.
> However, I get the error: Error 14277 Command script does not destroy all
> objects it creates.
> I checked the code and I only create two SQL-DMO objects of which I both
set
> to 'Nothing' at the end.
> Have checked MS Knowledge Base and Internet but find nothing on it, other
> that use DTS instead. I can do that but wondered why this error should
occur.
> Using SQL Server 7.0, SP3. Thanks.

Creating Job with ActiveX script

Hi,
Have created a VBscript that run SQL-DMO that runs successfully as a .vbs
file.
However, I wanted to schedule the process so I created a job that runs this
script with the step as an ActiveX script step.
However, I get the error: Error 14277 Command script does not destroy all
objects it creates.
I checked the code and I only create two SQL-DMO objects of which I both set
to 'Nothing' at the end.
Have checked MS Knowledge Base and Internet but find nothing on it, other
that use DTS instead. I can do that but wondered why this error should occur.
Using SQL Server 7.0, SP3. Thanks.These objects do not need to be created explicitly with CreateObject. Any
variable assigned with Set is an object and will need to be set to Nothing.
ie
Set sql = CreateObject("SQLOLEDB.Connection")
...
Set rs = sq.Execute("SELECT name from master.dbo.sysdatabases")
Set rs = Nothing
Set sql = Nothing
--
Regards
Barry McAuslin
----
--
Look inside your SQL Server files with SQL File Explorer.
Go to http://www.sqlfe.com for more information.
"PRW" <PRW@.discussions.microsoft.com> wrote in message
news:BF401CF0-746F-43C4-B551-6DE1A8C6042D@.microsoft.com...
> Hi,
> Have created a VBscript that run SQL-DMO that runs successfully as a .vbs
> file.
> However, I wanted to schedule the process so I created a job that runs
this
> script with the step as an ActiveX script step.
> However, I get the error: Error 14277 Command script does not destroy all
> objects it creates.
> I checked the code and I only create two SQL-DMO objects of which I both
set
> to 'Nothing' at the end.
> Have checked MS Knowledge Base and Internet but find nothing on it, other
> that use DTS instead. I can do that but wondered why this error should
occur.
> Using SQL Server 7.0, SP3. Thanks.

Creating Job with ActiveX script

Hi,
Have created a VBscript that run SQL-DMO that runs successfully as a .vbs
file.
However, I wanted to schedule the process so I created a job that runs this
script with the step as an ActiveX script step.
However, I get the error: Error 14277 Command script does not destroy all
objects it creates.
I checked the code and I only create two SQL-DMO objects of which I both set
to 'Nothing' at the end.
Have checked MS Knowledge Base and Internet but find nothing on it, other
that use DTS instead. I can do that but wondered why this error should occur
.
Using SQL Server 7.0, SP3. Thanks.These objects do not need to be created explicitly with CreateObject. Any
variable assigned with Set is an object and will need to be set to Nothing.
ie
Set sql = CreateObject("SQLOLEDB.Connection")
...
Set rs = sq.Execute("SELECT name from master.dbo.sysdatabases")
Set rs = Nothing
Set sql = Nothing
Regards
Barry McAuslin
----
--
Look inside your SQL Server files with SQL File Explorer.
Go to http://www.sqlfe.com for more information.
"PRW" <PRW@.discussions.microsoft.com> wrote in message
news:BF401CF0-746F-43C4-B551-6DE1A8C6042D@.microsoft.com...
> Hi,
> Have created a VBscript that run SQL-DMO that runs successfully as a .vbs
> file.
> However, I wanted to schedule the process so I created a job that runs
this
> script with the step as an ActiveX script step.
> However, I get the error: Error 14277 Command script does not destroy all
> objects it creates.
> I checked the code and I only create two SQL-DMO objects of which I both
set
> to 'Nothing' at the end.
> Have checked MS Knowledge Base and Internet but find nothing on it, other
> that use DTS instead. I can do that but wondered why this error should
occur.
> Using SQL Server 7.0, SP3. Thanks.