Showing posts with label background. Show all posts
Showing posts with label background. Show all posts

Friday, March 9, 2012

Need Novell Network Connection without logging on first

I am new to SSIS but this does not seem like it should be a hard thing to do. Here is the background:

Windows Server 2003

SQL Server 2005

SSIS

Logged in to server as Admin

I've created a SSIS package that I want to run as a Job. In it there is a Ole DB Connection to a VFP Database on a Novell Server. Client for Netware Services is started when server is but NOT logged into. When I created the package everything runs fine. Note that I had to login when I created the Data Link. I can even run it from the SQL Server Package Store. As soon as I restart the server and try to run it I get an error that the file path is invalid in both SSIS and the Package Store. I check the connection string and it looks good.

The connection is availible in My Network Places

If I open the connection and login it runs fine again.

How do I intiate the network connection and then close it again?

Cory Bonallo

Retail Services

Developer

Aren't there some NET USE commands (or NetWare equivalents) that you could use to create the connection without having to log in?
|||

I've never used anything like that. Should there be a setting or something in the SSIS connection manager? Do you have any examples? Thanks for your help!

Cory Bonallo

Retail Services

Developer

|||

Cory Bonallo wrote:

I've never used anything like that. Should there be a setting or something in the SSIS connection manager? Do you have any examples? Thanks for your help!

No, this is more in the Windows arena than SSIS. Taking the Novell client out of the picture for the moment, when you're not logged into the machine, none of your drive mappings are active since those are user-specific. Your package may work fine when you're logged it, but when it tries to run unattended with nobody logged in, it can no longer access mapped drives and fails.

This comes up from time to time here on the forum, but the search is failing me at the moment for good threads. This one applies, but isn't a stellar example.

With the Windows client, the NET USE command (try "net use /?" from the Windows command prompt) can be used to make these connections. If you're running the SSIS package from SQL Agent, you can use CmdExec steps before your package to create a connection with NET USE and one after the package to delete it.

I have no idea how having the NetWare client in the picture might change things. I don't know if NET USE will work or if there is a different command you have to use to accomplish this.

|||

Well I thought that did it. But now I can't get it to run in a job step. I cant seem to figure out the syntax or something for cmdExec.

Here is what I did:

in dos window typed "net use \\jds1\vol3 /user:admin" works great!

Created a job step as Operating System (cmd Exec) and typed in:

"net use" \\jds1\vol3 /user:admin

Got this error:

04/16/2007 11:05:45,fred,Error,1,TESTSERVER,fred,Open Novell Connection,,Executed as user: JENSENNT1\CORYB. The process could not be created for step 1 of job 0x7FE4E946E4D7E944A13A2AB6551A270B (reason: The system cannot find the file specified).The step failed.,00:00:00,0,0,,,,0

So I tried several other changes and still same error...

What am I missing?

Cory

|||Try:

"C:\WINDOWS\system32\net.exe" use \\server\share /user:admin

"net use" is not a command. "use" is an argument to net.exe.|||

Thank you Phil. The more I use this tool the dumber I feel! So now I don't get an error but it just sits on that step. I'm assuming it has something to do with a return success code. Try as I might I just can't find any examples or instructions on how to code for this. Is there a way to reture a success code. I left it a zero because the articles I found said that was the default success code. Agail thanks for your help!

Cory

|||

Cory Bonallo wrote:

Thank you Phil. The more I use this tool the dumber I feel! So now I don't get an error but it just sits on that step. I'm assuming it has something to do with a return success code. Try as I might I just can't find any examples or instructions on how to code for this. Is there a way to reture a success code. I left it a zero because the articles I found said that was the default success code. Agail thanks for your help!

Cory

I don't think its related to the return code. I think it probably isn't returning. I see you're specifying a user name but no password. The Net.exe may be prompting and waiting for a response. Try passing the password too.

"C:\WINDOWS\system32\net.exe" use \\server\share /user:admin mypassword

|||

You were right. It was the password. Now can you tell me why the connection is not persisting to the next job step? So here is what I want to do:

Step 1: open network connection

Step 2: run dtsx package that uses that connection

Step 3: Close network connection

Seems simple enough?

Cory

|||Look at either mapping a drive to that share, or using the /PERSISTENT:YES flag.|||

Phil Brammer wrote:

Look at either mapping a drive to that share, or using the /PERSISTENT:YES flag.

Or combining all three into a single step? Perhaps by putting them in a batch file?
|||

JayH wrote:

Or combining all three into a single step? Perhaps by putting them in a batch file?

Yep.|||

Thabk you both very much. What I ended up doing is adding an Excute Process Task to Open the connection, run the rest of the steps of the package and then close the connection. Thanks again to all!!!

Cory

|||

I did get the net use working in the Job as a part of an SSIS package. Now I am trying to use the same process to open a connection to Novell in the Query editor and setting up a stored procedure that a Web service can call to get a connection to an access.mdb linked server on the Novell drive. When I try to execute via xp_cmdshell the command succeeds but does not make the conncetion availible to any other session. Then when I ran it in a batch to do a simple file copy the net use command succeeded but the copy failed. When I used impersonate it did not change the user from NT AUTHORITY/? I can't a channel opened.

Cory

|||

I did get the net use working in the Job as a part of an SSIS package. Now I am trying to use the same process to open a connection to Novell in the Query editor and setting up a stored procedure that a Web service can call to get a connection to an access.mdb linked server on the Novell drive. When I try to execute via xp_cmdshell the command succeeds but does not make the conncetion availible to any other session. Then when I ran it in a batch to do a simple file copy the net use command succeeded but the copy failed. When I used impersonate it did not change the user from NT AUTHORITY/? I can't a channel opened.

Cory

Need Novell Network Connection without logging on first

I am new to SSIS but this does not seem like it should be a hard thing to do. Here is the background:

Windows Server 2003

SQL Server 2005

SSIS

Logged in to server as Admin

I've created a SSIS package that I want to run as a Job. In it there is a Ole DB Connection to a VFP Database on a Novell Server. Client for Netware Services is started when server is but NOT logged into. When I created the package everything runs fine. Note that I had to login when I created the Data Link. I can even run it from the SQL Server Package Store. As soon as I restart the server and try to run it I get an error that the file path is invalid in both SSIS and the Package Store. I check the connection string and it looks good.

The connection is availible in My Network Places

If I open the connection and login it runs fine again.

How do I intiate the network connection and then close it again?

Cory Bonallo

Retail Services

Developer

Aren't there some NET USE commands (or NetWare equivalents) that you could use to create the connection without having to log in?
|||

I've never used anything like that. Should there be a setting or something in the SSIS connection manager? Do you have any examples? Thanks for your help!

Cory Bonallo

Retail Services

Developer

|||

Cory Bonallo wrote:

I've never used anything like that. Should there be a setting or something in the SSIS connection manager? Do you have any examples? Thanks for your help!

No, this is more in the Windows arena than SSIS. Taking the Novell client out of the picture for the moment, when you're not logged into the machine, none of your drive mappings are active since those are user-specific. Your package may work fine when you're logged it, but when it tries to run unattended with nobody logged in, it can no longer access mapped drives and fails.

This comes up from time to time here on the forum, but the search is failing me at the moment for good threads. This one applies, but isn't a stellar example.

With the Windows client, the NET USE command (try "net use /?" from the Windows command prompt) can be used to make these connections. If you're running the SSIS package from SQL Agent, you can use CmdExec steps before your package to create a connection with NET USE and one after the package to delete it.

I have no idea how having the NetWare client in the picture might change things. I don't know if NET USE will work or if there is a different command you have to use to accomplish this.

|||

Well I thought that did it. But now I can't get it to run in a job step. I cant seem to figure out the syntax or something for cmdExec.

Here is what I did:

in dos window typed "net use \\jds1\vol3 /user:admin" works great!

Created a job step as Operating System (cmd Exec) and typed in:

"net use" \\jds1\vol3 /user:admin

Got this error:

04/16/2007 11:05:45,fred,Error,1,TESTSERVER,fred,Open Novell Connection,,Executed as user: JENSENNT1\CORYB. The process could not be created for step 1 of job 0x7FE4E946E4D7E944A13A2AB6551A270B (reason: The system cannot find the file specified).The step failed.,00:00:00,0,0,,,,0

So I tried several other changes and still same error...

What am I missing?

Cory

|||Try:

"C:\WINDOWS\system32\net.exe" use \\server\share /user:admin

"net use" is not a command. "use" is an argument to net.exe.|||

Thank you Phil. The more I use this tool the dumber I feel! So now I don't get an error but it just sits on that step. I'm assuming it has something to do with a return success code. Try as I might I just can't find any examples or instructions on how to code for this. Is there a way to reture a success code. I left it a zero because the articles I found said that was the default success code. Agail thanks for your help!

Cory

|||

Cory Bonallo wrote:

Thank you Phil. The more I use this tool the dumber I feel! So now I don't get an error but it just sits on that step. I'm assuming it has something to do with a return success code. Try as I might I just can't find any examples or instructions on how to code for this. Is there a way to reture a success code. I left it a zero because the articles I found said that was the default success code. Agail thanks for your help!

Cory

I don't think its related to the return code. I think it probably isn't returning. I see you're specifying a user name but no password. The Net.exe may be prompting and waiting for a response. Try passing the password too.

"C:\WINDOWS\system32\net.exe" use \\server\share /user:admin mypassword

|||

You were right. It was the password. Now can you tell me why the connection is not persisting to the next job step? So here is what I want to do:

Step 1: open network connection

Step 2: run dtsx package that uses that connection

Step 3: Close network connection

Seems simple enough?

Cory

|||Look at either mapping a drive to that share, or using the /PERSISTENT:YES flag.|||

Phil Brammer wrote:

Look at either mapping a drive to that share, or using the /PERSISTENT:YES flag.

Or combining all three into a single step? Perhaps by putting them in a batch file?
|||

JayH wrote:

Or combining all three into a single step? Perhaps by putting them in a batch file?

Yep.|||

Thabk you both very much. What I ended up doing is adding an Excute Process Task to Open the connection, run the rest of the steps of the package and then close the connection. Thanks again to all!!!

Cory

|||

I did get the net use working in the Job as a part of an SSIS package. Now I am trying to use the same process to open a connection to Novell in the Query editor and setting up a stored procedure that a Web service can call to get a connection to an access.mdb linked server on the Novell drive. When I try to execute via xp_cmdshell the command succeeds but does not make the conncetion availible to any other session. Then when I ran it in a batch to do a simple file copy the net use command succeeded but the copy failed. When I used impersonate it did not change the user from NT AUTHORITY/? I can't a channel opened.

Cory

|||

I did get the net use working in the Job as a part of an SSIS package. Now I am trying to use the same process to open a connection to Novell in the Query editor and setting up a stored procedure that a Web service can call to get a connection to an access.mdb linked server on the Novell drive. When I try to execute via xp_cmdshell the command succeeds but does not make the conncetion availible to any other session. Then when I ran it in a batch to do a simple file copy the net use command succeeded but the copy failed. When I used impersonate it did not change the user from NT AUTHORITY/? I can't a channel opened.

Cory

Monday, February 20, 2012

need help with using maintenance plan..

background sql2kt, nt5
wondering if someone can help me with a backup issue.
if i were to create a maintenance plan to back up all user databases on a
server (like 60 of them)
1. how can i backup just one database on demand outside the maintenance
plan? and have it recognized by the maintenance when the next scheduled
backup occures? (such as purge file and so on)
2. what would be the difference of putting all 60 databases in one
maintenance vs. seperating them into 3 plans with staggering schedule?
any advice would be greatly appreciated.
> if i were to create a maintenance plan to back up all user databases on a
> server (like 60 of them)
> 1. how can i backup just one database on demand outside the maintenance
> plan? and have it recognized by the maintenance when the next scheduled
> backup occures? (such as purge file and so on)
> 2. what would be the difference of putting all 60 databases in one
> maintenance vs. seperating them into 3 plans with staggering schedule?
> any advice would be greatly appreciated.
1. you can always right click on a db and backup from there. i believe the
dbmp determines which backups to delete by reading the
msdb.sysdbmaintplan_history table. you would probably have to "forge" an
entry in that table to get your dbmp to delete your manual backups. i
wouldn't recommend this although i've done something similar with no ill
effects.
i usually keep a couple of weeks of backups on disk. every once in a while i
go through those backup directories looking for old manual backups that don't
need to be there any more and manually delete them.
2. one dbmp for 60 db's will backup them up one at a time in alphabetical
order. 3 seperate plans is much more of a headache to manage. the biggest
problem is that when you add a new db, if you forget to add it to one of
those 3 dbmp's, it won't get backed up. if you delete a db without changing
the dbmp, you'll get errors when the jobs run trying to work on that db
that's been deleted. if you have a dbmp for all user databases, then you
don't have to modify a dbmp every time you add a new db or delete a db.
|||thanks for such a good advice.
regarding #1, your suggestion works.
but if i want call that backup routine from the other scheduled task using
sql script, how would I know the backup dump file name currently available?
since the maintenance plan generate a new file name each day such as
MyDb_2004050401800.bak
"ch" <ch@.dontemailme.com> wrote in message
news:4097D623.1F2E0C9B@.dontemailme.com...[vbcol=seagreen]
a
> 1. you can always right click on a db and backup from there. i believe
the
> dbmp determines which backups to delete by reading the
> msdb.sysdbmaintplan_history table. you would probably have to "forge" an
> entry in that table to get your dbmp to delete your manual backups. i
> wouldn't recommend this although i've done something similar with no ill
> effects.
> i usually keep a couple of weeks of backups on disk. every once in a
while i
> go through those backup directories looking for old manual backups that
don't
> need to be there any more and manually delete them.
> 2. one dbmp for 60 db's will backup them up one at a time in alphabetical
> order. 3 seperate plans is much more of a headache to manage. the
biggest
> problem is that when you add a new db, if you forget to add it to one of
> those 3 dbmp's, it won't get backed up. if you delete a db without
changing
> the dbmp, you'll get errors when the jobs run trying to work on that db
> that's been deleted. if you have a dbmp for all user databases, then you
> don't have to modify a dbmp every time you add a new db or delete a db.
>

need help with using maintenance plan..

background sql2kt, nt5
wondering if someone can help me with a backup issue.
if i were to create a maintenance plan to back up all user databases on a
server (like 60 of them)
1. how can i backup just one database on demand outside the maintenance
plan? and have it recognized by the maintenance when the next scheduled
backup occures? (such as purge file and so on)
2. what would be the difference of putting all 60 databases in one
maintenance vs. seperating them into 3 plans with staggering schedule?
any advice would be greatly appreciated.> if i were to create a maintenance plan to back up all user databases on a
> server (like 60 of them)
> 1. how can i backup just one database on demand outside the maintenance
> plan? and have it recognized by the maintenance when the next scheduled
> backup occures? (such as purge file and so on)
> 2. what would be the difference of putting all 60 databases in one
> maintenance vs. seperating them into 3 plans with staggering schedule?
> any advice would be greatly appreciated.
1. you can always right click on a db and backup from there. i believe the
dbmp determines which backups to delete by reading the
msdb.sysdbmaintplan_history table. you would probably have to "forge" an
entry in that table to get your dbmp to delete your manual backups. i
wouldn't recommend this although i've done something similar with no ill
effects.
i usually keep a couple of weeks of backups on disk. every once in a while
i
go through those backup directories looking for old manual backups that don'
t
need to be there any more and manually delete them.
2. one dbmp for 60 db's will backup them up one at a time in alphabetical
order. 3 seperate plans is much more of a headache to manage. the biggest
problem is that when you add a new db, if you forget to add it to one of
those 3 dbmp's, it won't get backed up. if you delete a db without changing
the dbmp, you'll get errors when the jobs run trying to work on that db
that's been deleted. if you have a dbmp for all user databases, then you
don't have to modify a dbmp every time you add a new db or delete a db.|||thanks for such a good advice.
regarding #1, your suggestion works.
but if i want call that backup routine from the other scheduled task using
sql script, how would I know the backup dump file name currently available?
since the maintenance plan generate a new file name each day such as
MyDb_2004050401800.bak
"ch" <ch@.dontemailme.com> wrote in message
news:4097D623.1F2E0C9B@.dontemailme.com...
a[vbcol=seagreen]
> 1. you can always right click on a db and backup from there. i believe
the
> dbmp determines which backups to delete by reading the
> msdb.sysdbmaintplan_history table. you would probably have to "forge" an
> entry in that table to get your dbmp to delete your manual backups. i
> wouldn't recommend this although i've done something similar with no ill
> effects.
> i usually keep a couple of weeks of backups on disk. every once in a
while i
> go through those backup directories looking for old manual backups that
don't
> need to be there any more and manually delete them.
> 2. one dbmp for 60 db's will backup them up one at a time in alphabetical
> order. 3 seperate plans is much more of a headache to manage. the
biggest
> problem is that when you add a new db, if you forget to add it to one of
> those 3 dbmp's, it won't get backed up. if you delete a db without
changing
> the dbmp, you'll get errors when the jobs run trying to work on that db
> that's been deleted. if you have a dbmp for all user databases, then you
> don't have to modify a dbmp every time you add a new db or delete a db.
>

need help with using maintenance plan..

background sql2kt, nt5
wondering if someone can help me with a backup issue.
if i were to create a maintenance plan to back up all user databases on a
server (like 60 of them)
1. how can i backup just one database on demand outside the maintenance
plan? and have it recognized by the maintenance when the next scheduled
backup occures? (such as purge file and so on)
2. what would be the difference of putting all 60 databases in one
maintenance vs. seperating them into 3 plans with staggering schedule?
any advice would be greatly appreciated.> if i were to create a maintenance plan to back up all user databases on a
> server (like 60 of them)
> 1. how can i backup just one database on demand outside the maintenance
> plan? and have it recognized by the maintenance when the next scheduled
> backup occures? (such as purge file and so on)
> 2. what would be the difference of putting all 60 databases in one
> maintenance vs. seperating them into 3 plans with staggering schedule?
> any advice would be greatly appreciated.
1. you can always right click on a db and backup from there. i believe the
dbmp determines which backups to delete by reading the
msdb.sysdbmaintplan_history table. you would probably have to "forge" an
entry in that table to get your dbmp to delete your manual backups. i
wouldn't recommend this although i've done something similar with no ill
effects.
i usually keep a couple of weeks of backups on disk. every once in a while i
go through those backup directories looking for old manual backups that don't
need to be there any more and manually delete them.
2. one dbmp for 60 db's will backup them up one at a time in alphabetical
order. 3 seperate plans is much more of a headache to manage. the biggest
problem is that when you add a new db, if you forget to add it to one of
those 3 dbmp's, it won't get backed up. if you delete a db without changing
the dbmp, you'll get errors when the jobs run trying to work on that db
that's been deleted. if you have a dbmp for all user databases, then you
don't have to modify a dbmp every time you add a new db or delete a db.|||thanks for such a good advice.
regarding #1, your suggestion works.
but if i want call that backup routine from the other scheduled task using
sql script, how would I know the backup dump file name currently available?
since the maintenance plan generate a new file name each day such as
MyDb_2004050401800.bak
"ch" <ch@.dontemailme.com> wrote in message
news:4097D623.1F2E0C9B@.dontemailme.com...
> > if i were to create a maintenance plan to back up all user databases on
a
> > server (like 60 of them)
> >
> > 1. how can i backup just one database on demand outside the maintenance
> > plan? and have it recognized by the maintenance when the next scheduled
> > backup occures? (such as purge file and so on)
> >
> > 2. what would be the difference of putting all 60 databases in one
> > maintenance vs. seperating them into 3 plans with staggering schedule?
> >
> > any advice would be greatly appreciated.
> 1. you can always right click on a db and backup from there. i believe
the
> dbmp determines which backups to delete by reading the
> msdb.sysdbmaintplan_history table. you would probably have to "forge" an
> entry in that table to get your dbmp to delete your manual backups. i
> wouldn't recommend this although i've done something similar with no ill
> effects.
> i usually keep a couple of weeks of backups on disk. every once in a
while i
> go through those backup directories looking for old manual backups that
don't
> need to be there any more and manually delete them.
> 2. one dbmp for 60 db's will backup them up one at a time in alphabetical
> order. 3 seperate plans is much more of a headache to manage. the
biggest
> problem is that when you add a new db, if you forget to add it to one of
> those 3 dbmp's, it won't get backed up. if you delete a db without
changing
> the dbmp, you'll get errors when the jobs run trying to work on that db
> that's been deleted. if you have a dbmp for all user databases, then you
> don't have to modify a dbmp every time you add a new db or delete a db.
>