Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Wednesday, March 28, 2012

How to schedule an SSIS package that invokes a web service

Hey,

I have an SSIS package that invokes a web service and then updates a table. It runs fine as long as I am running it on the local machine. However, as soon as I save this package to the sql server, and try to schedule this as a job, it starts to fail. Now, the web service writes to an xml file and also uses an xsd and and an xsl file. When I save a dts package to the sql server, whats the proper way of referencing these files? I think this probably is what is making the package to fail, ut I am not sure.

Any help is greatly appreciated!!

Thanks!

You should use a configuration (right-click in the package and choose configurations) to set the ConnectionString property of the connection managers for the files. Or you could use expressions to set the connection strings (paths and filenames) based on variables. The variables can be set at runtime using the /SET option of DTEXEC.|||Also make sure you've configured SSIS logging, so you can find out why the package fails now or (once you fix the problem and go to production) if something goes wrong with scheduled package in production.|||That depends on where you want to keep them. I prefer to keep them in files on the disk. If your package is in SQL and you prefer to avoid the disk entirely, you can keep them in the database and just load them into variables via the Execute SQL task. The XML task and the XML Source component support receiving the XSD/XSLT from variables.
|||Thanks a lot for the suggestions. I will try them out and see how it works.|||

Hey,

Sorry for this delayed reply. Since I posted this question a lot of issues cropped up with my SQL server which eventually led to a total reinstallation of all apps on my pc. Anyway, I discovered that the problem I have been having was because of permission issues. I was able to fix that problem and just when I thought that I had everything going, I came across a new problem. After I save the SSIS package in sql server and create a job, the job starts failing. This is the error that I am getting:

-1073548540,0x,An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The Web Service threw an error during method execution. The error is: Unable to connect to the remote server.

Any suggestions would be very helpful.

Thanks!

|||Could it be a authentication issue? Is there any security on the web service?|||

Guys!!Thanks a lot for all the suggestions. Really appreciate your help. Problem was a combination of many issues. One was related to 32bit/64bit differences, the other was authentication, and finally some syntax problems when invoking the web service. Seems it is working really well now.

Thanks again!

Monday, March 26, 2012

How to run the snapshot agent using the -PublisherLogin ?

I am Merge replicating from MS SQL Server 2000 SP4 to a MS SQL Server 2000
SP3 box.
Get the following error while running the Merge Agent:
Error Message : The process could not log conflict information.
Error Details : The process could not log conflict information. (Source:
Merge Replication Provider (Agent); Error number: -2147200992)
Could not find stored procedure ''.
(Source: <publishing servername> (Data source); Error number: 2812)
On the Microsoft support website
http://support.microsoft.com/default...b;en-us;308743
it says this happens when 'If Merge Replication is configured so that the
Snapshot Agents connect to the Publisher by using a login that is defined as
a member of db_owner (and not a system administrator) in a database that is
merge published, if conflicts are detected during the Merge Process the Merge
Agent fails with this error message'
They offer a workaround which is :
To work around this behavior, run the Snapshot Agent with the
-PublisherLogin parameter and specify a login. For example, use the sa login,
which is a system administrator on the Publisher to generate a new snapshot.
After the snapshot completes, SQL Server creates the conflict stored
procedure. Then, you can rerun the Merge Agent so that SQL Server can log the
conflicts. Because you are not reinitializing the subscription, SQL Server
does not apply the new snapshot to the subscribers.
How do I run the Snapshot Agent with the -PublisherLogin parameter ?
On your publisher server there's a job which creates the snapshot. The
name of the job varies but you can recognize it by the category
REPL-Snapshot.
When you open the properties of the job, go to to Steps tab and edit
the "run agent" step by adding the parameter.
M

Friday, March 23, 2012

How to run SQL Server Management Studio

We have installed SQL Server 2005 on a machine running Windows 2003. We found
out that there is no Enterprise Manager, but Management Studio. We have no
idea how to run this.
We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
removes it from the list.
We hope we can get an answer, because we are a serious evaluating SQL 2005
over Oracle 10g.
Thanks for your help.
Matt
Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
Studio
?
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> We have installed SQL Server 2005 on a machine running Windows 2003. We
> found
> out that there is no Enterprise Manager, but Management Studio. We have no
> idea how to run this.
> We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
> removes it from the list.
> We hope we can get an answer, because we are a serious evaluating SQL 2005
> over Oracle 10g.
> Thanks for your help.
> Matt
|||We would assume that it was that simple, but in the Microsoft SQL Server 2005
menu only Configurations Tools is shown.
We have seen another post with the same problem but they were trying to
install it on XP, while we have installed it on Server 2003.
The installation program seems to run so smooth, so we can't imagine that
something crucial like this was overlooked.
Any help is appreciated.
Matt
"Adam Machanic" wrote:

> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
> Studio
> ?
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
>
>
|||Did you already go back through the installer and make sure that the correct
options were selected? Also try switching into Advanced mode to be certain.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...[vbcol=seagreen]
> We would assume that it was that simple, but in the Microsoft SQL Server
> 2005
> menu only Configurations Tools is shown.
> We have seen another post with the same problem but they were trying to
> install it on XP, while we have installed it on Server 2003.
> The installation program seems to run so smooth, so we can't imagine that
> something crucial like this was overlooked.
> Any help is appreciated.
> Matt
> "Adam Machanic" wrote:
|||Thanks for your help, but I tried already all of that.
The bizarre thing is that it doesn't remove the installation through
Add/Remove Programs, while it takes it from the list. When you try to install
certain components (through Advanced) then it tells you it is already there.
Another problem is that when you install subcomponents it won't let you
install other subcomponents later.
This product definitely has installation issues and I hope they will be
resolved as the pack will now start evaluating (like us) and they're turned
away before they can even try away. A smooth installation is software
marketing 101.
Any help is appreciated. Even help to remove the product.
"Adam Machanic" wrote:

> Did you already go back through the installer and make sure that the correct
> options were selected? Also try switching into Advanced mode to be certain.
>
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...
>
>

How to run SQL Server Management Studio

We have installed SQL Server 2005 on a machine running Windows 2003. We found
out that there is no Enterprise Manager, but Management Studio. We have no
idea how to run this.
We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
removes it from the list.
We hope we can get an answer, because we are a serious evaluating SQL 2005
over Oracle 10g.
Thanks for your help.
MattStart -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
Studio
'
--
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> We have installed SQL Server 2005 on a machine running Windows 2003. We
> found
> out that there is no Enterprise Manager, but Management Studio. We have no
> idea how to run this.
> We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
> removes it from the list.
> We hope we can get an answer, because we are a serious evaluating SQL 2005
> over Oracle 10g.
> Thanks for your help.
> Matt|||We would assume that it was that simple, but in the Microsoft SQL Server 2005
menu only Configurations Tools is shown.
We have seen another post with the same problem but they were trying to
install it on XP, while we have installed it on Server 2003.
The installation program seems to run so smooth, so we can't imagine that
something crucial like this was overlooked.
Any help is appreciated.
Matt
"Adam Machanic" wrote:
> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
> Studio
> '
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> > We have installed SQL Server 2005 on a machine running Windows 2003. We
> > found
> > out that there is no Enterprise Manager, but Management Studio. We have no
> > idea how to run this.
> >
> > We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
> > removes it from the list.
> >
> > We hope we can get an answer, because we are a serious evaluating SQL 2005
> > over Oracle 10g.
> >
> > Thanks for your help.
> >
> > Matt
>
>|||Did you already go back through the installer and make sure that the correct
options were selected? Also try switching into Advanced mode to be certain.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...
> We would assume that it was that simple, but in the Microsoft SQL Server
> 2005
> menu only Configurations Tools is shown.
> We have seen another post with the same problem but they were trying to
> install it on XP, while we have installed it on Server 2003.
> The installation program seems to run so smooth, so we can't imagine that
> something crucial like this was overlooked.
> Any help is appreciated.
> Matt
> "Adam Machanic" wrote:
>> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
>> Studio
>> '
>> --
>> Adam Machanic
>> Pro SQL Server 2005, available now
>> http://www.apress.com/book/bookDisplay.html?bID=457
>> --
>>
>> "Matt" <Matt@.discussions.microsoft.com> wrote in message
>> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
>> > We have installed SQL Server 2005 on a machine running Windows 2003. We
>> > found
>> > out that there is no Enterprise Manager, but Management Studio. We have
>> > no
>> > idea how to run this.
>> >
>> > We tried to remove SQL Server, but Add/Remove doesn't remove it. Just
>> > only
>> > removes it from the list.
>> >
>> > We hope we can get an answer, because we are a serious evaluating SQL
>> > 2005
>> > over Oracle 10g.
>> >
>> > Thanks for your help.
>> >
>> > Matt
>>|||Thanks for your help, but I tried already all of that.
The bizarre thing is that it doesn't remove the installation through
Add/Remove Programs, while it takes it from the list. When you try to install
certain components (through Advanced) then it tells you it is already there.
Another problem is that when you install subcomponents it won't let you
install other subcomponents later.
This product definitely has installation issues and I hope they will be
resolved as the pack will now start evaluating (like us) and they're turned
away before they can even try away. A smooth installation is software
marketing 101.
Any help is appreciated. Even help to remove the product.
"Adam Machanic" wrote:
> Did you already go back through the installer and make sure that the correct
> options were selected? Also try switching into Advanced mode to be certain.
>
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...
> > We would assume that it was that simple, but in the Microsoft SQL Server
> > 2005
> > menu only Configurations Tools is shown.
> >
> > We have seen another post with the same problem but they were trying to
> > install it on XP, while we have installed it on Server 2003.
> >
> > The installation program seems to run so smooth, so we can't imagine that
> > something crucial like this was overlooked.
> >
> > Any help is appreciated.
> >
> > Matt
> >
> > "Adam Machanic" wrote:
> >
> >> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
> >> Studio
> >>
> >> '
> >>
> >> --
> >> Adam Machanic
> >> Pro SQL Server 2005, available now
> >> http://www.apress.com/book/bookDisplay.html?bID=457
> >> --
> >>
> >>
> >> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> >> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> >> > We have installed SQL Server 2005 on a machine running Windows 2003. We
> >> > found
> >> > out that there is no Enterprise Manager, but Management Studio. We have
> >> > no
> >> > idea how to run this.
> >> >
> >> > We tried to remove SQL Server, but Add/Remove doesn't remove it. Just
> >> > only
> >> > removes it from the list.
> >> >
> >> > We hope we can get an answer, because we are a serious evaluating SQL
> >> > 2005
> >> > over Oracle 10g.
> >> >
> >> > Thanks for your help.
> >> >
> >> > Matt
> >>
> >>
> >>
>
>

How to run SQL Server Management Studio

We have installed SQL Server 2005 on a machine running Windows 2003. We foun
d
out that there is no Enterprise Manager, but Management Studio. We have no
idea how to run this.
We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
removes it from the list.
We hope we can get an answer, because we are a serious evaluating SQL 2005
over Oracle 10g.
Thanks for your help.
MattStart -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
Studio
'
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
> We have installed SQL Server 2005 on a machine running Windows 2003. We
> found
> out that there is no Enterprise Manager, but Management Studio. We have no
> idea how to run this.
> We tried to remove SQL Server, but Add/Remove doesn't remove it. Just only
> removes it from the list.
> We hope we can get an answer, because we are a serious evaluating SQL 2005
> over Oracle 10g.
> Thanks for your help.
> Matt|||We would assume that it was that simple, but in the Microsoft SQL Server 200
5
menu only Configurations Tools is shown.
We have seen another post with the same problem but they were trying to
install it on XP, while we have installed it on Server 2003.
The installation program seems to run so smooth, so we can't imagine that
something crucial like this was overlooked.
Any help is appreciated.
Matt
"Adam Machanic" wrote:

> Start -> Programs -> Microsoft SQL Server 2005 -> SQL Server Management
> Studio
> '
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:DD381736-D551-4BB6-9488-D2E61C97E33F@.microsoft.com...
>
>|||Did you already go back through the installer and make sure that the correct
options were selected? Also try switching into Advanced mode to be certain.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"Matt" <Matt@.discussions.microsoft.com> wrote in message
news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...[vbcol=seagreen]
> We would assume that it was that simple, but in the Microsoft SQL Server
> 2005
> menu only Configurations Tools is shown.
> We have seen another post with the same problem but they were trying to
> install it on XP, while we have installed it on Server 2003.
> The installation program seems to run so smooth, so we can't imagine that
> something crucial like this was overlooked.
> Any help is appreciated.
> Matt
> "Adam Machanic" wrote:
>|||Thanks for your help, but I tried already all of that.
The bizarre thing is that it doesn't remove the installation through
Add/Remove Programs, while it takes it from the list. When you try to instal
l
certain components (through Advanced) then it tells you it is already there.
Another problem is that when you install subcomponents it won't let you
install other subcomponents later.
This product definitely has installation issues and I hope they will be
resolved as the pack will now start evaluating (like us) and they're turned
away before they can even try away. A smooth installation is software
marketing 101.
Any help is appreciated. Even help to remove the product.
"Adam Machanic" wrote:

> Did you already go back through the installer and make sure that the corre
ct
> options were selected? Also try switching into Advanced mode to be certai
n.
>
> --
> Adam Machanic
> Pro SQL Server 2005, available now
> http://www.apress.com/book/bookDisplay.html?bID=457
> --
>
> "Matt" <Matt@.discussions.microsoft.com> wrote in message
> news:5D45FE06-D501-4CC9-8DC0-3C786F6ECFEE@.microsoft.com...
>
>

How to run package with variables using dtexec?

Hi,

I am running my package in this way:

exec xp_cmdshell 'dtexec /SQL "\SBLoadExcelDBLog" /SERVER test /USER **** /PASSWORD ***** /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW

/LOGGER "{6AA833A1-E4B2-4431-831B-DE695049DC61}";"Test.SuperBowl"

/Set \Package.Variables[User::varExcelFileName].Properties[Value];"aaab"

/Set \Package.Variables[User::varExcelWorkbookName].Value;"Sheet1$"

/Set \Package.Variables[User::varExcelFileFullPath].Value;"D:\testshare\aaab.xls"

/Set \Package.Variables[User::varDestinationTableName].Value;"FeaturesTmp"

/Set \Package.Variables[User::varPreSQLAction].Value;"delete from FeaturesTmp" '

I got errors:

Started: 3:49:51 PM

Progress: 2006-01-30 15:49:52.34

Source: Extract AdHoc Data from Excel

Validating: 0% complete

End Progress

Error: 2006-01-30 15:49:52.46

Code: 0xC0202009

Source: Extract AdHoc Data from Excel Excel Source [649]

Description: An OLE DB error has occurred. Error code: 0x80040E37.

End Error

Error: 2006-01-30 15:49:52.46

Code: 0xC02020E8

Source: Extract AdHoc Data from Excel Excel Source [649]

Description: Opening a rowset for "Sheet1$" failed. Check that the object exists in the database.

End Error

Error: 2006-01-30 15:49:52.51

Code: 0xC004706B

Source: Extract AdHoc Data from Excel DTS.Pipeline

Description: "component "Excel Source" (649)" failed validation and returned validation status "VS_ISBROKEN".

End Error

Progress: 2006-01-30 15:49:52.51

Source: Extract AdHoc Data from Excel

Validating: 25% complete

End Progress

Error: 2006-01-30 15:49:52.51

Code: 0xC004700C

Source: Extract AdHoc Data from Excel DTS.Pipeline

Description: One or more component failed validation.

End Error

Error: 2006-01-30 15:49:52.51

Code: 0xC0024107

Source: Extract AdHoc Data from Excel

Description: There were errors during task validation.

End Error

DTExec: The package execution returned DTSER_FAILURE (1).

Started: 3:49:51 PM

Finished: 3:49:52 PM

Elapsed: 0.703 seconds

Finally I found the problem:

Everything is OK But:

The way to put the command string is not right after dtexec /SQL.

If there is not ENTER and all commands in one line (as it is a dos command), everything is OK!

Is it COOL!?

Guangming

|||

Is there a reason for using "...[varibale name].Properties.[Value]" for the first variable and "...[varibale name].Value" for the others?

Dick Campbell

|||

No, they are basically same but different ways to access to the value of the variable.

Guangming

|||

Thanks,

I thought that it just might be a mistake. I was also curious to know, if they are both valid, whether there is any difference in the functionality.

Dick Campbell

How to run package with variables using dtexec?

Hi,

I am running my package in this way:

exec xp_cmdshell 'dtexec /SQL "\SBLoadExcelDBLog" /SERVER test /USER **** /PASSWORD ***** /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING EW

/LOGGER "{6AA833A1-E4B2-4431-831B-DE695049DC61}";"Test.SuperBowl"

/Set \Package.Variables[User::varExcelFileName].Properties[Value];"aaab"

/Set \Package.Variables[User::varExcelWorkbookName].Value;"Sheet1$"

/Set \Package.Variables[User::varExcelFileFullPath].Value;"D:\testshare\aaab.xls"

/Set \Package.Variables[User::varDestinationTableName].Value;"FeaturesTmp"

/Set \Package.Variables[User::varPreSQLAction].Value;"delete from FeaturesTmp" '

I got errors:

Started: 3:49:51 PM

Progress: 2006-01-30 15:49:52.34

Source: Extract AdHoc Data from Excel

Validating: 0% complete

End Progress

Error: 2006-01-30 15:49:52.46

Code: 0xC0202009

Source: Extract AdHoc Data from Excel Excel Source [649]

Description: An OLE DB error has occurred. Error code: 0x80040E37.

End Error

Error: 2006-01-30 15:49:52.46

Code: 0xC02020E8

Source: Extract AdHoc Data from Excel Excel Source [649]

Description: Opening a rowset for "Sheet1$" failed. Check that the object exists in the database.

End Error

Error: 2006-01-30 15:49:52.51

Code: 0xC004706B

Source: Extract AdHoc Data from Excel DTS.Pipeline

Description: "component "Excel Source" (649)" failed validation and returned validation status "VS_ISBROKEN".

End Error

Progress: 2006-01-30 15:49:52.51

Source: Extract AdHoc Data from Excel

Validating: 25% complete

End Progress

Error: 2006-01-30 15:49:52.51

Code: 0xC004700C

Source: Extract AdHoc Data from Excel DTS.Pipeline

Description: One or more component failed validation.

End Error

Error: 2006-01-30 15:49:52.51

Code: 0xC0024107

Source: Extract AdHoc Data from Excel

Description: There were errors during task validation.

End Error

DTExec: The package execution returned DTSER_FAILURE (1).

Started: 3:49:51 PM

Finished: 3:49:52 PM

Elapsed: 0.703 seconds

Finally I found the problem:

Everything is OK But:

The way to put the command string is not right after dtexec /SQL.

If there is not ENTER and all commands in one line (as it is a dos command), everything is OK!

Is it COOL!?

Guangming

|||

Is there a reason for using "...[varibale name].Properties.[Value]" for the first variable and "...[varibale name].Value" for the others?

Dick Campbell

|||

No, they are basically same but different ways to access to the value of the variable.

Guangming

|||

Thanks,

I thought that it just might be a mistake. I was also curious to know, if they are both valid, whether there is any difference in the functionality.

Dick Campbell

How to run multiple jobs in parallel

I have five SQL jobs that I want to run at the same time to save time.
Running them in serialization costs me lot of time so running in parallel is
choice I have. However, they all need to run after 5 DBs are restored. So, I
created one job that does all the restore for these 5 DBs one after another
on nightly basis. So far so good. Now I want to run all these 5 jobs in
parallel so that they all start at the same time to save me lot of time.
Example: I have total of 6 jobs.
Restore All DBs
Step 1: Restore DBCA
Step 2: Restore DBNY
Step 3: Restore DBNJ
Step 4: Restore DBTX
Step 5: Restore DBHI
I have other 5 jobs like this:
1. ProcessDBCA
2. ProcessDBNY
3. ProcessDBNJ
4. ProcessDBTX
5. ProcessDBHI
I need to start running these 5 jobs in parallel as soon as all 5 steps from
job 1 are finished.
Any suggestions.
Thanks in advance.DTS Package can be used to run activities in parallel. So, you can create a
DTS Package, and execute it from the SQL Job.
"Mark" wrote:

> I have five SQL jobs that I want to run at the same time to save time.
> Running them in serialization costs me lot of time so running in parallel
is
> choice I have. However, they all need to run after 5 DBs are restored. So,
I
> created one job that does all the restore for these 5 DBs one after anothe
r
> on nightly basis. So far so good. Now I want to run all these 5 jobs in
> parallel so that they all start at the same time to save me lot of time.
> Example: I have total of 6 jobs.
> Restore All DBs
> Step 1: Restore DBCA
> Step 2: Restore DBNY
> Step 3: Restore DBNJ
> Step 4: Restore DBTX
> Step 5: Restore DBHI
> I have other 5 jobs like this:
> 1. ProcessDBCA
> 2. ProcessDBNY
> 3. ProcessDBNJ
> 4. ProcessDBTX
> 5. ProcessDBHI
> I need to start running these 5 jobs in parallel as soon as all 5 steps fr
om
> job 1 are finished.
> Any suggestions.
> Thanks in advance.|||Thanks for the response.
Any sample code or direction to a whitepaper will be really helpful
"Absar Ahmad" wrote:
> DTS Package can be used to run activities in parallel. So, you can create
a
> DTS Package, and execute it from the SQL Job.
> "Mark" wrote:
>|||There is plenty of information in BOL. Please search for following topics:
DTS, overview
Creating DTS Package Objects and Connections
Creating DTS Package Workflow and Tasks
You can also look for the sub-titles under the following titles in the BOL:
DTS packages
DTS Designer
Best Wishes,
Absar
"Mark" wrote:
> Thanks for the response.
> Any sample code or direction to a whitepaper will be really helpful
> "Absar Ahmad" wrote:
>

Wednesday, March 21, 2012

how to run dts package from visual studio

Hi all,

Have tried running a dts package but Im unable to add the reference Microsoft.Sql.managedDts.

Is there any other way that i can do tat from Visual studio code behind page? I need to let the user to

trigger the package from the web application. Thks in advance.

Wei

For those looking for answers, check out this link.

http://forums.asp.net/t/1129202.aspx

How to run DTS from stored proc

I am running a DTS package from stored proc as,

Exec [master].[dbo].[xp_cmdshell] "dtsrun /S Server /U User /P Pass /N Package Name"

But i am getting an error :

The system can not find the path specified.

But i am able to run the same from DTS Design Wizard.

Please anyone of you help me out.set @.str varchar(8000)
set @.dtsname varchar(8000)
set @.dtsname=physical path and name of your dts package
SET @.str='DtsRun '+ '/F ' + @.DTSNAME

EXEC master..xp_Cmdshell @.str


I believe it will help you

Subhasish Ray

subhasishray@.sify.com

How to run backup in EM?

I'm running SQL Server 2000 on Win2k Server. I've right clicked on a
database, selected all task and backup database. How do I run this backup
manually to check it?
Thanks,
BrettBrett,
Did you mean to ask you want to check if the backup file is valid? If so,
try a restore.You can do it via EM (all tasks | restore database) or through
the RESTORE DATABASE command in Query analyzer.
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Brett" <myaccount@.cygen.com> wrote in message
news:OevbiKBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> I'm running SQL Server 2000 on Win2k Server. I've right clicked on a
> database, selected all task and backup database. How do I run this backup
> manually to check it?
> Thanks,
> Brett
>|||I haven't run the backup yet. There is not file to check.
Thanks,
Brett
"Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:uImszPBaDHA.2336@.TK2MSFTNGP09.phx.gbl...
> Brett,
> Did you mean to ask you want to check if the backup file is valid? If so,
> try a restore.You can do it via EM (all tasks | restore database) or
through
> the RESTORE DATABASE command in Query analyzer.
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> "Brett" <myaccount@.cygen.com> wrote in message
> news:OevbiKBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> > I'm running SQL Server 2000 on Win2k Server. I've right clicked on a
> > database, selected all task and backup database. How do I run this
backup
> > manually to check it?
> >
> > Thanks,
> > Brett
> >
> >
>|||Brett,
Ok.So you can backup the database in the way you mentioned in EM.Are you
facing any problems?The equivalent T-SQL command is BACKUP DATABASE.
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Brett" <myaccount@.cygen.com> wrote in message
news:%23S$LMUBaDHA.1832@.TK2MSFTNGP09.phx.gbl...
> I haven't run the backup yet. There is not file to check.
> Thanks,
> Brett
> "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> news:uImszPBaDHA.2336@.TK2MSFTNGP09.phx.gbl...
> > Brett,
> >
> > Did you mean to ask you want to check if the backup file is valid? If
so,
> > try a restore.You can do it via EM (all tasks | restore database) or
> through
> > the RESTORE DATABASE command in Query analyzer.
> >
> > --
> > Dinesh.
> > SQL Server FAQ at
> > http://www.tkdinesh.com
> >
> > "Brett" <myaccount@.cygen.com> wrote in message
> > news:OevbiKBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> > > I'm running SQL Server 2000 on Win2k Server. I've right clicked on a
> > > database, selected all task and backup database. How do I run this
> backup
> > > manually to check it?
> > >
> > > Thanks,
> > > Brett
> > >
> > >
> >
> >
>|||I'm asking how to backup the database. It is scheduled but I'd like to back
up before the scheduled date.
Brett
"Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:%23QkNLWBaDHA.2520@.TK2MSFTNGP09.phx.gbl...
> Brett,
> Ok.So you can backup the database in the way you mentioned in EM.Are you
> facing any problems?The equivalent T-SQL command is BACKUP DATABASE.
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> "Brett" <myaccount@.cygen.com> wrote in message
> news:%23S$LMUBaDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > I haven't run the backup yet. There is not file to check.
> >
> > Thanks,
> > Brett
> >
> > "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> > news:uImszPBaDHA.2336@.TK2MSFTNGP09.phx.gbl...
> > > Brett,
> > >
> > > Did you mean to ask you want to check if the backup file is valid? If
> so,
> > > try a restore.You can do it via EM (all tasks | restore database) or
> > through
> > > the RESTORE DATABASE command in Query analyzer.
> > >
> > > --
> > > Dinesh.
> > > SQL Server FAQ at
> > > http://www.tkdinesh.com
> > >
> > > "Brett" <myaccount@.cygen.com> wrote in message
> > > news:OevbiKBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> > > > I'm running SQL Server 2000 on Win2k Server. I've right clicked on
a
> > > > database, selected all task and backup database. How do I run this
> > backup
> > > > manually to check it?
> > > >
> > > > Thanks,
> > > > Brett
> > > >
> > > >
> > >
> > >
> >
> >
>|||Brett,
Try this syntax in Query analyzer..
BACKUP DATABASE <databasename>
TO DISK='c:\data\database.BAK'
Since you already have the sql job scheduled, just right click and start the
job to run it manually.
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Brett" <myaccount@.cygen.com> wrote in message
news:u2ms6uBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> I'm asking how to backup the database. It is scheduled but I'd like to
back
> up before the scheduled date.
> Brett
> "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> news:%23QkNLWBaDHA.2520@.TK2MSFTNGP09.phx.gbl...
> > Brett,
> >
> > Ok.So you can backup the database in the way you mentioned in EM.Are you
> > facing any problems?The equivalent T-SQL command is BACKUP DATABASE.
> >
> > --
> > Dinesh.
> > SQL Server FAQ at
> > http://www.tkdinesh.com
> >
> > "Brett" <myaccount@.cygen.com> wrote in message
> > news:%23S$LMUBaDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > > I haven't run the backup yet. There is not file to check.
> > >
> > > Thanks,
> > > Brett
> > >
> > > "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> > > news:uImszPBaDHA.2336@.TK2MSFTNGP09.phx.gbl...
> > > > Brett,
> > > >
> > > > Did you mean to ask you want to check if the backup file is valid?
If
> > so,
> > > > try a restore.You can do it via EM (all tasks | restore database) or
> > > through
> > > > the RESTORE DATABASE command in Query analyzer.
> > > >
> > > > --
> > > > Dinesh.
> > > > SQL Server FAQ at
> > > > http://www.tkdinesh.com
> > > >
> > > > "Brett" <myaccount@.cygen.com> wrote in message
> > > > news:OevbiKBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> > > > > I'm running SQL Server 2000 on Win2k Server. I've right clicked
on
> a
> > > > > database, selected all task and backup database. How do I run this
> > > backup
> > > > > manually to check it?
> > > > >
> > > > > Thanks,
> > > > > Brett
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||I see the job listed. When I right click and start job, nothing happens.
Any suggestions?
Brett
"Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
news:u7%23XK1BaDHA.1640@.TK2MSFTNGP10.phx.gbl...
> Brett,
> Try this syntax in Query analyzer..
> BACKUP DATABASE <databasename>
> TO DISK='c:\data\database.BAK'
> Since you already have the sql job scheduled, just right click and start
the
> job to run it manually.
> --
> Dinesh.
> SQL Server FAQ at
> http://www.tkdinesh.com
> "Brett" <myaccount@.cygen.com> wrote in message
> news:u2ms6uBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> > I'm asking how to backup the database. It is scheduled but I'd like to
> back
> > up before the scheduled date.
> >
> > Brett
> > "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> > news:%23QkNLWBaDHA.2520@.TK2MSFTNGP09.phx.gbl...
> > > Brett,
> > >
> > > Ok.So you can backup the database in the way you mentioned in EM.Are
you
> > > facing any problems?The equivalent T-SQL command is BACKUP DATABASE.
> > >
> > > --
> > > Dinesh.
> > > SQL Server FAQ at
> > > http://www.tkdinesh.com
> > >
> > > "Brett" <myaccount@.cygen.com> wrote in message
> > > news:%23S$LMUBaDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > > > I haven't run the backup yet. There is not file to check.
> > > >
> > > > Thanks,
> > > > Brett
> > > >
> > > > "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> > > > news:uImszPBaDHA.2336@.TK2MSFTNGP09.phx.gbl...
> > > > > Brett,
> > > > >
> > > > > Did you mean to ask you want to check if the backup file is valid?
> If
> > > so,
> > > > > try a restore.You can do it via EM (all tasks | restore database)
or
> > > > through
> > > > > the RESTORE DATABASE command in Query analyzer.
> > > > >
> > > > > --
> > > > > Dinesh.
> > > > > SQL Server FAQ at
> > > > > http://www.tkdinesh.com
> > > > >
> > > > > "Brett" <myaccount@.cygen.com> wrote in message
> > > > > news:OevbiKBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> > > > > > I'm running SQL Server 2000 on Win2k Server. I've right clicked
> on
> > a
> > > > > > database, selected all task and backup database. How do I run
this
> > > > backup
> > > > > > manually to check it?
> > > > > >
> > > > > > Thanks,
> > > > > > Brett
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>|||Brett,
Well, "nothing happens", does not mean anything - success or failure.The job
wont give you a dialog box mentioning the status upon completion.You can
look into the code inside the sql job, see where the backup is being made
and check the filesystem whether that file was created.Right click on the
job | refresh and then check the job history whether it ran
successfully.Also, did you try the syntax that I mentioned?
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Brett" <myaccount@.cygen.com> wrote in message
news:O7RtggCaDHA.656@.tk2msftngp13.phx.gbl...
> I see the job listed. When I right click and start job, nothing happens.
> Any suggestions?
> Brett
> "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> news:u7%23XK1BaDHA.1640@.TK2MSFTNGP10.phx.gbl...
> > Brett,
> >
> > Try this syntax in Query analyzer..
> >
> > BACKUP DATABASE <databasename>
> > TO DISK='c:\data\database.BAK'
> >
> > Since you already have the sql job scheduled, just right click and start
> the
> > job to run it manually.
> >
> > --
> > Dinesh.
> > SQL Server FAQ at
> > http://www.tkdinesh.com
> >
> > "Brett" <myaccount@.cygen.com> wrote in message
> > news:u2ms6uBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> > > I'm asking how to backup the database. It is scheduled but I'd like
to
> > back
> > > up before the scheduled date.
> > >
> > > Brett
> > > "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> > > news:%23QkNLWBaDHA.2520@.TK2MSFTNGP09.phx.gbl...
> > > > Brett,
> > > >
> > > > Ok.So you can backup the database in the way you mentioned in EM.Are
> you
> > > > facing any problems?The equivalent T-SQL command is BACKUP DATABASE.
> > > >
> > > > --
> > > > Dinesh.
> > > > SQL Server FAQ at
> > > > http://www.tkdinesh.com
> > > >
> > > > "Brett" <myaccount@.cygen.com> wrote in message
> > > > news:%23S$LMUBaDHA.1832@.TK2MSFTNGP09.phx.gbl...
> > > > > I haven't run the backup yet. There is not file to check.
> > > > >
> > > > > Thanks,
> > > > > Brett
> > > > >
> > > > > "Dinesh.T.K" <tkdinesh@.nospam.mail.tkdinesh.com> wrote in message
> > > > > news:uImszPBaDHA.2336@.TK2MSFTNGP09.phx.gbl...
> > > > > > Brett,
> > > > > >
> > > > > > Did you mean to ask you want to check if the backup file is
valid?
> > If
> > > > so,
> > > > > > try a restore.You can do it via EM (all tasks | restore
database)
> or
> > > > > through
> > > > > > the RESTORE DATABASE command in Query analyzer.
> > > > > >
> > > > > > --
> > > > > > Dinesh.
> > > > > > SQL Server FAQ at
> > > > > > http://www.tkdinesh.com
> > > > > >
> > > > > > "Brett" <myaccount@.cygen.com> wrote in message
> > > > > > news:OevbiKBaDHA.2072@.TK2MSFTNGP10.phx.gbl...
> > > > > > > I'm running SQL Server 2000 on Win2k Server. I've right
clicked
> > on
> > > a
> > > > > > > database, selected all task and backup database. How do I run
> this
> > > > > backup
> > > > > > > manually to check it?
> > > > > > >
> > > > > > > Thanks,
> > > > > > > Brett
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>

Friday, March 9, 2012

how to retrive the names of sql servers running in a network through an vb6 application

I want to retrive the names of sql servers running in a network through an vb6 application .

I found a API which list out the SQL server names in the network , but I am able to connect only to the main

SQL server in the network and for other instances it gives error " DBNETLIB] Connection Open () SQL server doesn?ˉt exist or access denied"

Can anyone help me?

Thanks

Goldie

hy dear

i am also woking in scenario, can you plz tell me which API you are using...

|||You can write a WMI script to read the registry. Instance names can be found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL/InstalledInstances key

Wednesday, March 7, 2012

How to retrieve sa password on Win98?

Hi, we have a problem on a server of our customer running SQL Server
2000. That PC is connected to the Internet, and probably someone has
changed the sa password.
In fact, trying to connect to the sql server using "SQL Server
Enterprise Manager" results in this error message:
"A connection could not be established to SERVERNAME - Login failed for sa."
Query Analyzer instead gives: "Unable to connect to server. Server Msg
18456, Level 16, State 1. Login failed for user sa".
Searching on the net I have found a bunch of good ways to follow, even
if they all require to join into Windows as Administrator user (and
thus, using Windows Authentication mode).
However I can't proceed because the server that runs SQL Server is
Windows 98, thus Windows Authentication Mode is not available.
Can you help please?
TIA,
Paolo
Paolo wrote:

> Hi, we have a problem on a server of our customer running SQL Server
> 2000.
Hrm... sorry, I meant SQL Server 7 ;)
|||I was not aware that it is possible to install SQL Server on Windows 98.
Are you talking about MSDE? or perhaps the Developer Edition of SQL Server?
Since you did not take the appropriate steps to secure your "server" and you
already looked into other options but they will not work for you perhaps the
only option you have left is to contact Microsoft Support.
I do have one final idea: Shut down the "server" copy the database files,
and attach them to a new server. At least you will be able to access your
data.
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23EtmbfCkEHA.3160@.TK2MSFTNGP10.phx.gbl...
> Hi, we have a problem on a server of our customer running SQL Server
> 2000. That PC is connected to the Internet, and probably someone has
> changed the sa password.
> In fact, trying to connect to the sql server using "SQL Server
> Enterprise Manager" results in this error message:
> "A connection could not be established to SERVERNAME - Login failed for
sa."
> Query Analyzer instead gives: "Unable to connect to server. Server Msg
> 18456, Level 16, State 1. Login failed for user sa".
> Searching on the net I have found a bunch of good ways to follow, even
> if they all require to join into Windows as Administrator user (and
> thus, using Windows Authentication mode).
> However I can't proceed because the server that runs SQL Server is
> Windows 98, thus Windows Authentication Mode is not available.
> Can you help please?
> TIA,
> Paolo
|||Keith Kratochvil wrote:

> I do have one final idea: Shut down the "server" copy the database files,
> and attach them to a new server. At least you will be able to access your
> data.
>
Thanks for the suggestion, it worked!
I copied a pristine master database from a vanilla sql server
installation to the "locked" sql server, then the databases containing
datas has been attached using sp_attach_db.
Finally I have specified a non blank password for user sa...
Regards,
Paolo
|||I am glad that you were able to figure things out!
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23a6VLoOkEHA.3844@.TK2MSFTNGP12.phx.gbl...[vbcol=seagreen]
> Keith Kratochvil wrote:
files,[vbcol=seagreen]
your
> Thanks for the suggestion, it worked!
> I copied a pristine master database from a vanilla sql server
> installation to the "locked" sql server, then the databases containing
> datas has been attached using sp_attach_db.
> Finally I have specified a non blank password for user sa...
> Regards,
> Paolo

How to retrieve sa password on Win98?

Hi, we have a problem on a server of our customer running SQL Server
2000. That PC is connected to the Internet, and probably someone has
changed the sa password.
In fact, trying to connect to the sql server using "SQL Server
Enterprise Manager" results in this error message:
"A connection could not be established to SERVERNAME - Login failed for sa."
Query Analyzer instead gives: "Unable to connect to server. Server Msg
18456, Level 16, State 1. Login failed for user sa".
Searching on the net I have found a bunch of good ways to follow, even
if they all require to join into Windows as Administrator user (and
thus, using Windows Authentication mode).
However I can't proceed because the server that runs SQL Server is
Windows 98, thus Windows Authentication Mode is not available.
Can you help please?
TIA,
PaoloPaolo wrote:
> Hi, we have a problem on a server of our customer running SQL Server
> 2000.
Hrm... sorry, I meant SQL Server 7 ;)|||I was not aware that it is possible to install SQL Server on Windows 98.
Are you talking about MSDE? or perhaps the Developer Edition of SQL Server?
Since you did not take the appropriate steps to secure your "server" and you
already looked into other options but they will not work for you perhaps the
only option you have left is to contact Microsoft Support.
I do have one final idea: Shut down the "server" copy the database files,
and attach them to a new server. At least you will be able to access your
data.
--
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23EtmbfCkEHA.3160@.TK2MSFTNGP10.phx.gbl...
> Hi, we have a problem on a server of our customer running SQL Server
> 2000. That PC is connected to the Internet, and probably someone has
> changed the sa password.
> In fact, trying to connect to the sql server using "SQL Server
> Enterprise Manager" results in this error message:
> "A connection could not be established to SERVERNAME - Login failed for
sa."
> Query Analyzer instead gives: "Unable to connect to server. Server Msg
> 18456, Level 16, State 1. Login failed for user sa".
> Searching on the net I have found a bunch of good ways to follow, even
> if they all require to join into Windows as Administrator user (and
> thus, using Windows Authentication mode).
> However I can't proceed because the server that runs SQL Server is
> Windows 98, thus Windows Authentication Mode is not available.
> Can you help please?
> TIA,
> Paolo|||Keith Kratochvil wrote:
> I do have one final idea: Shut down the "server" copy the database files,
> and attach them to a new server. At least you will be able to access your
> data.
>
Thanks for the suggestion, it worked!
I copied a pristine master database from a vanilla sql server
installation to the "locked" sql server, then the databases containing
datas has been attached using sp_attach_db.
Finally I have specified a non blank password for user sa...
Regards,
Paolo|||I am glad that you were able to figure things out!
--
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23a6VLoOkEHA.3844@.TK2MSFTNGP12.phx.gbl...
> Keith Kratochvil wrote:
> > I do have one final idea: Shut down the "server" copy the database
files,
> > and attach them to a new server. At least you will be able to access
your
> > data.
> >
> Thanks for the suggestion, it worked!
> I copied a pristine master database from a vanilla sql server
> installation to the "locked" sql server, then the databases containing
> datas has been attached using sp_attach_db.
> Finally I have specified a non blank password for user sa...
> Regards,
> Paolo

How to retrieve sa password on Win98?

Hi, we have a problem on a server of our customer running SQL Server
2000. That PC is connected to the Internet, and probably someone has
changed the sa password.
In fact, trying to connect to the sql server using "SQL Server
Enterprise Manager" results in this error message:
"A connection could not be established to SERVERNAME - Login failed for sa."
Query Analyzer instead gives: "Unable to connect to server. Server Msg
18456, Level 16, State 1. Login failed for user sa".
Searching on the net I have found a bunch of good ways to follow, even
if they all require to join into Windows as Administrator user (and
thus, using Windows Authentication mode).
However I can't proceed because the server that runs SQL Server is
Windows 98, thus Windows Authentication Mode is not available.
Can you help please?
TIA,
PaoloPaolo wrote:

> Hi, we have a problem on a server of our customer running SQL Server
> 2000.
Hrm... sorry, I meant SQL Server 7 ;)|||I was not aware that it is possible to install SQL Server on Windows 98.
Are you talking about MSDE? or perhaps the Developer Edition of SQL Server?
Since you did not take the appropriate steps to secure your "server" and you
already looked into other options but they will not work for you perhaps the
only option you have left is to contact Microsoft Support.
I do have one final idea: Shut down the "server" copy the database files,
and attach them to a new server. At least you will be able to access your
data.
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23EtmbfCkEHA.3160@.TK2MSFTNGP10.phx.gbl...
> Hi, we have a problem on a server of our customer running SQL Server
> 2000. That PC is connected to the Internet, and probably someone has
> changed the sa password.
> In fact, trying to connect to the sql server using "SQL Server
> Enterprise Manager" results in this error message:
> "A connection could not be established to SERVERNAME - Login failed for
sa."
> Query Analyzer instead gives: "Unable to connect to server. Server Msg
> 18456, Level 16, State 1. Login failed for user sa".
> Searching on the net I have found a bunch of good ways to follow, even
> if they all require to join into Windows as Administrator user (and
> thus, using Windows Authentication mode).
> However I can't proceed because the server that runs SQL Server is
> Windows 98, thus Windows Authentication Mode is not available.
> Can you help please?
> TIA,
> Paolo|||Keith Kratochvil wrote:

> I do have one final idea: Shut down the "server" copy the database files,
> and attach them to a new server. At least you will be able to access your
> data.
>
Thanks for the suggestion, it worked!
I copied a pristine master database from a vanilla sql server
installation to the "locked" sql server, then the databases containing
datas has been attached using sp_attach_db.
Finally I have specified a non blank password for user sa...
Regards,
Paolo|||I am glad that you were able to figure things out!
Keith
"Paolo" <paolo@.red.it> wrote in message
news:%23a6VLoOkEHA.3844@.TK2MSFTNGP12.phx.gbl...
> Keith Kratochvil wrote:
>
files,[vbcol=seagreen]
your[vbcol=seagreen]
> Thanks for the suggestion, it worked!
> I copied a pristine master database from a vanilla sql server
> installation to the "locked" sql server, then the databases containing
> datas has been attached using sp_attach_db.
> Finally I have specified a non blank password for user sa...
> Regards,
> Paolo

Friday, February 24, 2012

How to retrieve database password

I previously had a web server that was running a application that used a
MSDE database. This server had a motherboard failure and I was not able to
repair it. I did get all the data off the drives so the MSDE SQL databases
did get copied. The problem is the admin password for those database is not
known to me and the previous admin does not remember. I need this password
so that I can reinstall the web application and give it the admin password
for the old databases. The tool the software company gave me to pull the
password does not work, as it pulls the information from the registry (which
is not the original as I have a new boot drive). Does anyone know how to
pull MSDE SQL database passwords without booting from the original drive?
There has to be a way to get all of the databases back since the data is
intact.
If you have the MDF files, just attach the database to a new instance
of MSDE with sp_attachDB.
If you mean a specially created user in the database or server AFAIK
which the application will use for connection and which is not known to
you, this password cannot be recovered. (If you have no access to the
stored password in the source code)
HTH, Jens Suessmeyer.
|||All I have are the old .SQL files no MDF files were created.
"Jens" <Jens@.sqlserver2005.de> wrote in message
news:1136994106.307693.42900@.g43g2000cwa.googlegro ups.com...
> If you have the MDF files, just attach the database to a new instance
> of MSDE with sp_attachDB.
> If you mean a specially created user in the database or server AFAIK
> which the application will use for connection and which is not known to
> you, this password cannot be recovered. (If you have no access to the
> stored password in the source code)
> HTH, Jens Suessmeyer.
>
|||If it is a SQL Server Authenticaion you should look in that Script
files (which they are supposed to be) for sp_addlogin which is used to
create the SQL Server auth. users.
HTH, jens Suessmeyer.
|||1. Go to Start | Run | type in Command.
2. Type the following command in the DOS prompt.
OSQL S <SERVERNAME> -E =
Note Be sure to replace SERVERNAME with the name of your SQL server.
Typically this is the name of your computer.
Note If this statement does not run successfully try entering it again
excluding the '=' sign.
3. Press Enter.
4. Type the line exactly as it is written below where ok is your new
password:
1> EXEC sp_password NULL, 'ok', 'sa'
5. Press Enter.
6. Type the line below:
2> Go
7. Press Enter. This will change the sa password from a value unknown to
ok (this can be changed in step 4).
=
"J Coldwater" <jams@.purdue.edu> wrote in message
news:u5y$dTsFGHA.2896@.TK2MSFTNGP10.phx.gbl...
> I previously had a web server that was running a application that used a
> MSDE database. This server had a motherboard failure and I was not able to
> repair it. I did get all the data off the drives so the MSDE SQL databases
> did get copied. The problem is the admin password for those database is
> not known to me and the previous admin does not remember. I need this
> password so that I can reinstall the web application and give it the admin
> password for the old databases. The tool the software company gave me to
> pull the password does not work, as it pulls the information from the
> registry (which is not the original as I have a new boot drive). Does
> anyone know how to pull MSDE SQL database passwords without booting from
> the original drive? There has to be a way to get all of the databases back
> since the data is intact.
>

Sunday, February 19, 2012

how to restrict SQL running thread

Hi,
We have a big report running on SQLRS2000+SP2. The report has multiple
datasets and queries. When report starts running, the database server it
connects to run query and pull data will start 33 threads and immediately
reach 100% CPU usage for all 8 CPUs. Databases is over 1TB and sets on EMC
SAN. There is no blocking during report generation. There is no sub-report,
so I assume there is only one DB connection.
We are wondering is it possible to restrict the number of threads
instantiated or is it possible to serialize the report generation, only run
1 thread at a time. Please help.
Jasonyou can set the maxdop option in your queries to limit the number of CPU
used during the execution of the query.
select ... from ... option (maxdop 1)
this reduce the number of CPU used in a parrallel query
the maxdop option can be setup at the server level instead-of the query
level; but not recommanded until you suffer performance issues
test the query, reducing the maxdop can reduce the query performance.
if the query takes 1min instead-of 10sec. the user will not be happy!
why its a problem for you if the queries use all the CPU?
"Jason Wang" <aa@.aa.com> wrote in message
news:eSLkGBeRGHA.5108@.TK2MSFTNGP09.phx.gbl...
> Hi,
> We have a big report running on SQLRS2000+SP2. The report has multiple
> datasets and queries. When report starts running, the database server it
> connects to run query and pull data will start 33 threads and immediately
> reach 100% CPU usage for all 8 CPUs. Databases is over 1TB and sets on EMC
> SAN. There is no blocking during report generation. There is no
> sub-report, so I assume there is only one DB connection.
> We are wondering is it possible to restrict the number of threads
> instantiated or is it possible to serialize the report generation, only
> run 1 thread at a time. Please help.
> Jason
>

How to restrict access to database to only IUSR_<machinename>

Hello Mark,
Based on the problem description, it seems that you'd like to let all the
application which is running internally can access SQL server successfully.
However, outside users cannot access SQL server from internet.
If this is what you want, you can remove TCP/IP and Named Pipes in the "SQL
Server Network Utility." You can follow the steps below:
a. On the Microsoft SQL Server 2000 server, start the SQL Server Network
Utility.
b. Click the General tab, and then select the instance you want from the
Instances drop-down menu.
c. Highlight TCP/IP, and then click Disable.
d. Highlight Named Pipes, and then click Disable.
By doing so, users still can access SQL server internally instead of
internet.
I hope above information is helpful.
Sophie Guo
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
========================================
=============
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.I think I boo-boo'd
I removed TCP/IP and Named Pipes from the SQL Server Registration from
within Enterprise Manager and rebooted the machine.
Now the SQL Server agent won't start, and therefore I can't get into the SQL
Server Registration again since the agent isn't running.
The SQLServerAgent is stopped, and when I attempt to start it, it just
starts and immediately stops again.
The event viewer shows the following:
SQLServerAgent could not be started (reason: Unable to connect to server
'MYSERVER\SERVER'; SQLServerAgent cannot start).
Is there anything I can do to recover?
Thanks!
"Sophie Guo [MSFT]" <v-sguo@.online.microsoft.com> wrote in message
news:OWhx%23YW%23EHA.3360@.cpmsftngxa10.phx.gbl...
> Hello Mark,
> Based on the problem description, it seems that you'd like to let all the
> application which is running internally can access SQL server
> successfully.
> However, outside users cannot access SQL server from internet.
> If this is what you want, you can remove TCP/IP and Named Pipes in the
> "SQL
> Server Network Utility." You can follow the steps below:
> a. On the Microsoft SQL Server 2000 server, start the SQL Server Network
> Utility.
> b. Click the General tab, and then select the instance you want from the
> Instances drop-down menu.
> c. Highlight TCP/IP, and then click Disable.
> d. Highlight Named Pipes, and then click Disable.
>
> By doing so, users still can access SQL server internally instead of
> internet.
> I hope above information is helpful.
> Sophie Guo
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> ========================================
=============
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
=============
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>

How to restrict access to database to only IUSR_<machinename>

I am running IIS and SQL Server on the same Win2003 Server machine. Is there
a way to set up security such that only IUSR_<machine> is allowed to access
the SQL Server 2000, even if outsiders have the connection string to the
database?
Thanks for any assistance!only create the account iusr_computername
"Mark Findlay" <mfindlay@.speakeasy.org> wrote in message
news:%23OLNjKN%23EHA.2192@.TK2MSFTNGP14.phx.gbl...
> I am running IIS and SQL Server on the same Win2003 Server machine. Is
there
> a way to set up security such that only IUSR_<machine> is allowed to
access
> the SQL Server 2000, even if outsiders have the connection string to the
> database?
> Thanks for any assistance!
>|||Unfortunately that's not a reasonable alternative for me since there are
many accounts on that machine that make use of other resources on that
machine.
I believe the solution is to block port 1433, but I don't know how to block
port 1433 on Windows Server 2003. Can anyone assist?
Thanks!
"Olu Adedeji" <i-oluade@.microsoft.com> wrote in message
news:eKLc6hQ%23EHA.2452@.TK2MSFTNGP14.phx.gbl...
> only create the account iusr_computername
> "Mark Findlay" <mfindlay@.speakeasy.org> wrote in message
> news:%23OLNjKN%23EHA.2192@.TK2MSFTNGP14.phx.gbl...
> there
> access
>