Hi,
I have developed a simple app using asp.net (vb.net 2003).
Normally I would copy the application files from
c:\Inetpub\wwwroot\
to the server and paste them to the same location on the
server.
I have installed a new server with win2k3 sp1 and installed
beta 2 of sql2005. I have tried the same copying and pasting
but when I run the application, I get the following error:
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
----
A name was started with an invalid character. Error processing resource
'http://localhost/webit/login.aspx'. Line 1, Posit...
<%@. Page Language="vb" AutoEventWireup="false" Codebehind="Login.aspx.vb"
Inherits="WebIT.Login"%>
-^
what should i do?
Please help.
Rgs,
MehulI think there's a problem with the IIS 6.0.
I had a sumiliar Problem and there's a discussion about it in the IIS
General UserGroup Now,waiting 4 answer.
"melu" wrote:
> Hi,
> I have developed a simple app using asp.net (vb.net 2003).
> Normally I would copy the application files from
> c:\Inetpub\wwwroot\
> to the server and paste them to the same location on the
> server.
> I have installed a new server with win2k3 sp1 and installed
> beta 2 of sql2005. I have tried the same copying and pasting
> but when I run the application, I get the following error:
>
>
> Cannot view XML input using XSL style sheet. Please correct the error
> and then click the Refresh button, or try again later.
>
> ----
> A name was started with an invalid character. Error processing resource
> 'http://localhost/webit/login.aspx'. Line 1, Posit...
> <%@. Page Language="vb" AutoEventWireup="false" Codebehind="Login.aspx.vb"
> Inherits="WebIT.Login"%>
> -^
>
> what should i do?
> Please help.
> Rgs,
> Mehul
Showing posts with label copy. Show all posts
Showing posts with label copy. Show all posts
Monday, March 26, 2012
Wednesday, March 7, 2012
Run Barch in SQL Server problem - share drive??
Hello Guys,
I have a problem with a job moving and zipping file to share drive
What does my Batch?
1) Copy backup device (initially in D:/) into
//SERVER/SHARE/Archived_Backups/
2) Create new folder in //SERVER/SHARE/Archived_Backups/
3) Move the DEVICE into this new folder
4) Zip the DEVICE and named it today.zip
if I run it manually the batch file works perfectly, But if I launch it
with sql server (what I would like to perform) this step does not run
perfectly.
What does this job?
1) run the batch
Step 1
DECLARE @.cmd sysname, @.var sysname
SET @.var = 'start D:\Backups\MyBacth.bat'
EXEC master..xp_cmdshell @.var
2) Overwrite the DEVICE
3) Verify DEVICE integrity
I have already set privileges for sqlservice in to this share
What do i need to do? Any Suggestions?
Thanks in advance
InaSorry,
Thank you for your answer... yes it is running and has network
privileges.
Regards,
Ina
John Bell wrote:
> Hi
> Apart from the typo in your script! You don't say what the SQL Agent account
> is running as and if it has network privileges.
> John
> "ina" wrote:
> > Hello Guys,
> >
> > I have a problem with a job moving and zipping file to share drive
> >
> >
> > What does my Batch?
> >
> >
> >
> > 1) Copy backup device (initially in D:/) into
> > //SERVER/SHARE/Archived_Backups/
> >
> > 2) Create new folder in //SERVER/SHARE/Archived_Backups/
> >
> > 3) Move the DEVICE into this new folder
> >
> > 4) Zip the DEVICE and named it today.zip
> >
> >
> > if I run it manually the batch file works perfectly, But if I launch it
> > with sql server (what I would like to perform) this step does not run
> > perfectly.
> >
> > What does this job?
> >
> > 1) run the batch
> > Step 1
> > DECLARE @.cmd sysname, @.var sysname
> > SET @.var = 'start D:\Backups\MyBacth.bat'
> > EXEC master..xp_cmdshell @.var
> >
> > 2) Overwrite the DEVICE
> >
> > 3) Verify DEVICE integrity
> >
> >
> > I have already set privileges for sqlservice in to this share
> >
> >
> > What do i need to do? Any Suggestions?
> >
> >
> > Thanks in advance
> >
> >
> >
> > Ina
> >
> >|||Hi Ina
Does this mean that you have solved the problem? If not can you log onto the
server as the service account and run the job?
John
"ina" wrote:
> Sorry,
> Thank you for your answer... yes it is running and has network
> privileges.
> Regards,
> Ina
>
> John Bell wrote:
> > Hi
> >
> > Apart from the typo in your script! You don't say what the SQL Agent account
> > is running as and if it has network privileges.
> >
> > John
> >
> > "ina" wrote:
> >
> > > Hello Guys,
> > >
> > > I have a problem with a job moving and zipping file to share drive
> > >
> > >
> > > What does my Batch?
> > >
> > >
> > >
> > > 1) Copy backup device (initially in D:/) into
> > > //SERVER/SHARE/Archived_Backups/
> > >
> > > 2) Create new folder in //SERVER/SHARE/Archived_Backups/
> > >
> > > 3) Move the DEVICE into this new folder
> > >
> > > 4) Zip the DEVICE and named it today.zip
> > >
> > >
> > > if I run it manually the batch file works perfectly, But if I launch it
> > > with sql server (what I would like to perform) this step does not run
> > > perfectly.
> > >
> > > What does this job?
> > >
> > > 1) run the batch
> > > Step 1
> > > DECLARE @.cmd sysname, @.var sysname
> > > SET @.var = 'start D:\Backups\MyBacth.bat'
> > > EXEC master..xp_cmdshell @.var
> > >
> > > 2) Overwrite the DEVICE
> > >
> > > 3) Verify DEVICE integrity
> > >
> > >
> > > I have already set privileges for sqlservice in to this share
> > >
> > >
> > > What do i need to do? Any Suggestions?
> > >
> > >
> > > Thanks in advance
> > >
> > >
> > >
> > > Ina
> > >
> > >
>|||Hello Jonh I was in holidays,
Happy new 2007!!!
I did not solved the problem. my sqlservice has network privileges but
I cannot run this job. So, I did a scheduled task for copy and zip the
backup and run a job to overwrite the existing backup.
I have three disk configurate with my slq server (C --> local, D -->
Data and F --> backup) how can I set up a new one without restall sql
Server again.
Best regards,
Ina
John Bell wrote:
> Hi Ina
> Does this mean that you have solved the problem? If not can you log onto the
> server as the service account and run the job?
> John
> "ina" wrote:
> > Sorry,
> >
> > Thank you for your answer... yes it is running and has network
> > privileges.
> >
> > Regards,
> >
> > Ina
> >
> >
> > John Bell wrote:
> > > Hi
> > >
> > > Apart from the typo in your script! You don't say what the SQL Agent account
> > > is running as and if it has network privileges.
> > >
> > > John
> > >
> > > "ina" wrote:
> > >
> > > > Hello Guys,
> > > >
> > > > I have a problem with a job moving and zipping file to share drive
> > > >
> > > >
> > > > What does my Batch?
> > > >
> > > >
> > > >
> > > > 1) Copy backup device (initially in D:/) into
> > > > //SERVER/SHARE/Archived_Backups/
> > > >
> > > > 2) Create new folder in //SERVER/SHARE/Archived_Backups/
> > > >
> > > > 3) Move the DEVICE into this new folder
> > > >
> > > > 4) Zip the DEVICE and named it today.zip
> > > >
> > > >
> > > > if I run it manually the batch file works perfectly, But if I launch it
> > > > with sql server (what I would like to perform) this step does not run
> > > > perfectly.
> > > >
> > > > What does this job?
> > > >
> > > > 1) run the batch
> > > > Step 1
> > > > DECLARE @.cmd sysname, @.var sysname
> > > > SET @.var = 'start D:\Backups\MyBacth.bat'
> > > > EXEC master..xp_cmdshell @.var
> > > >
> > > > 2) Overwrite the DEVICE
> > > >
> > > > 3) Verify DEVICE integrity
> > > >
> > > >
> > > > I have already set privileges for sqlservice in to this share
> > > >
> > > >
> > > > What do i need to do? Any Suggestions?
> > > >
> > > >
> > > > Thanks in advance
> > > >
> > > >
> > > >
> > > > Ina
> > > >
> > > >
> >
> >|||John Thank you for this tips.
I will try to do that.
Ina
John Bell wrote:
> Hi Ina
> Happy New Year!
> Looking back at your script, can you change the batch file it so that does
> not map the network drive, zips up the backup file before it copies it to the
> UNC? On the extended properties for the step can you then add a log file so
> that any error messages are captured. Then schedule the job to run and post
> the messages from the log file.
> Thanks
> John
>
> "ina" wrote:
> > Hello Jonh I was in holidays,
> >
> > Happy new 2007!!!
> >
> > I did not solved the problem. my sqlservice has network privileges but
> > I cannot run this job. So, I did a scheduled task for copy and zip the
> > backup and run a job to overwrite the existing backup.
> >
> > I have three disk configurate with my slq server (C --> local, D -->
> > Data and F --> backup) how can I set up a new one without restall sql
> > Server again.
> >
> > Best regards,
> >
> > Ina
> >
> > John Bell wrote:
> > > Hi Ina
> > >
> > > Does this mean that you have solved the problem? If not can you log onto the
> > > server as the service account and run the job?
> > >
> > > John
> > >
> > > "ina" wrote:
> > >
> > > > Sorry,
> > > >
> > > > Thank you for your answer... yes it is running and has network
> > > > privileges.
> > > >
> > > > Regards,
> > > >
> > > > Ina
> > > >
> > > >
> > > > John Bell wrote:
> > > > > Hi
> > > > >
> > > > > Apart from the typo in your script! You don't say what the SQL Agent account
> > > > > is running as and if it has network privileges.
> > > > >
> > > > > John
> > > > >
> > > > > "ina" wrote:
> > > > >
> > > > > > Hello Guys,
> > > > > >
> > > > > > I have a problem with a job moving and zipping file to share drive
> > > > > >
> > > > > >
> > > > > > What does my Batch?
> > > > > >
> > > > > >
> > > > > >
> > > > > > 1) Copy backup device (initially in D:/) into
> > > > > > //SERVER/SHARE/Archived_Backups/
> > > > > >
> > > > > > 2) Create new folder in //SERVER/SHARE/Archived_Backups/
> > > > > >
> > > > > > 3) Move the DEVICE into this new folder
> > > > > >
> > > > > > 4) Zip the DEVICE and named it today.zip
> > > > > >
> > > > > >
> > > > > > if I run it manually the batch file works perfectly, But if I launch it
> > > > > > with sql server (what I would like to perform) this step does not run
> > > > > > perfectly.
> > > > > >
> > > > > > What does this job?
> > > > > >
> > > > > > 1) run the batch
> > > > > > Step 1
> > > > > > DECLARE @.cmd sysname, @.var sysname
> > > > > > SET @.var = 'start D:\Backups\MyBacth.bat'
> > > > > > EXEC master..xp_cmdshell @.var
> > > > > >
> > > > > > 2) Overwrite the DEVICE
> > > > > >
> > > > > > 3) Verify DEVICE integrity
> > > > > >
> > > > > >
> > > > > > I have already set privileges for sqlservice in to this share
> > > > > >
> > > > > >
> > > > > > What do i need to do? Any Suggestions?
> > > > > >
> > > > > >
> > > > > > Thanks in advance
> > > > > >
> > > > > >
> > > > > >
> > > > > > Ina
> > > > > >
> > > > > >
> > > >
> > > >
> >
> >
I have a problem with a job moving and zipping file to share drive
What does my Batch?
1) Copy backup device (initially in D:/) into
//SERVER/SHARE/Archived_Backups/
2) Create new folder in //SERVER/SHARE/Archived_Backups/
3) Move the DEVICE into this new folder
4) Zip the DEVICE and named it today.zip
if I run it manually the batch file works perfectly, But if I launch it
with sql server (what I would like to perform) this step does not run
perfectly.
What does this job?
1) run the batch
Step 1
DECLARE @.cmd sysname, @.var sysname
SET @.var = 'start D:\Backups\MyBacth.bat'
EXEC master..xp_cmdshell @.var
2) Overwrite the DEVICE
3) Verify DEVICE integrity
I have already set privileges for sqlservice in to this share
What do i need to do? Any Suggestions?
Thanks in advance
InaSorry,
Thank you for your answer... yes it is running and has network
privileges.
Regards,
Ina
John Bell wrote:
> Hi
> Apart from the typo in your script! You don't say what the SQL Agent account
> is running as and if it has network privileges.
> John
> "ina" wrote:
> > Hello Guys,
> >
> > I have a problem with a job moving and zipping file to share drive
> >
> >
> > What does my Batch?
> >
> >
> >
> > 1) Copy backup device (initially in D:/) into
> > //SERVER/SHARE/Archived_Backups/
> >
> > 2) Create new folder in //SERVER/SHARE/Archived_Backups/
> >
> > 3) Move the DEVICE into this new folder
> >
> > 4) Zip the DEVICE and named it today.zip
> >
> >
> > if I run it manually the batch file works perfectly, But if I launch it
> > with sql server (what I would like to perform) this step does not run
> > perfectly.
> >
> > What does this job?
> >
> > 1) run the batch
> > Step 1
> > DECLARE @.cmd sysname, @.var sysname
> > SET @.var = 'start D:\Backups\MyBacth.bat'
> > EXEC master..xp_cmdshell @.var
> >
> > 2) Overwrite the DEVICE
> >
> > 3) Verify DEVICE integrity
> >
> >
> > I have already set privileges for sqlservice in to this share
> >
> >
> > What do i need to do? Any Suggestions?
> >
> >
> > Thanks in advance
> >
> >
> >
> > Ina
> >
> >|||Hi Ina
Does this mean that you have solved the problem? If not can you log onto the
server as the service account and run the job?
John
"ina" wrote:
> Sorry,
> Thank you for your answer... yes it is running and has network
> privileges.
> Regards,
> Ina
>
> John Bell wrote:
> > Hi
> >
> > Apart from the typo in your script! You don't say what the SQL Agent account
> > is running as and if it has network privileges.
> >
> > John
> >
> > "ina" wrote:
> >
> > > Hello Guys,
> > >
> > > I have a problem with a job moving and zipping file to share drive
> > >
> > >
> > > What does my Batch?
> > >
> > >
> > >
> > > 1) Copy backup device (initially in D:/) into
> > > //SERVER/SHARE/Archived_Backups/
> > >
> > > 2) Create new folder in //SERVER/SHARE/Archived_Backups/
> > >
> > > 3) Move the DEVICE into this new folder
> > >
> > > 4) Zip the DEVICE and named it today.zip
> > >
> > >
> > > if I run it manually the batch file works perfectly, But if I launch it
> > > with sql server (what I would like to perform) this step does not run
> > > perfectly.
> > >
> > > What does this job?
> > >
> > > 1) run the batch
> > > Step 1
> > > DECLARE @.cmd sysname, @.var sysname
> > > SET @.var = 'start D:\Backups\MyBacth.bat'
> > > EXEC master..xp_cmdshell @.var
> > >
> > > 2) Overwrite the DEVICE
> > >
> > > 3) Verify DEVICE integrity
> > >
> > >
> > > I have already set privileges for sqlservice in to this share
> > >
> > >
> > > What do i need to do? Any Suggestions?
> > >
> > >
> > > Thanks in advance
> > >
> > >
> > >
> > > Ina
> > >
> > >
>|||Hello Jonh I was in holidays,
Happy new 2007!!!
I did not solved the problem. my sqlservice has network privileges but
I cannot run this job. So, I did a scheduled task for copy and zip the
backup and run a job to overwrite the existing backup.
I have three disk configurate with my slq server (C --> local, D -->
Data and F --> backup) how can I set up a new one without restall sql
Server again.
Best regards,
Ina
John Bell wrote:
> Hi Ina
> Does this mean that you have solved the problem? If not can you log onto the
> server as the service account and run the job?
> John
> "ina" wrote:
> > Sorry,
> >
> > Thank you for your answer... yes it is running and has network
> > privileges.
> >
> > Regards,
> >
> > Ina
> >
> >
> > John Bell wrote:
> > > Hi
> > >
> > > Apart from the typo in your script! You don't say what the SQL Agent account
> > > is running as and if it has network privileges.
> > >
> > > John
> > >
> > > "ina" wrote:
> > >
> > > > Hello Guys,
> > > >
> > > > I have a problem with a job moving and zipping file to share drive
> > > >
> > > >
> > > > What does my Batch?
> > > >
> > > >
> > > >
> > > > 1) Copy backup device (initially in D:/) into
> > > > //SERVER/SHARE/Archived_Backups/
> > > >
> > > > 2) Create new folder in //SERVER/SHARE/Archived_Backups/
> > > >
> > > > 3) Move the DEVICE into this new folder
> > > >
> > > > 4) Zip the DEVICE and named it today.zip
> > > >
> > > >
> > > > if I run it manually the batch file works perfectly, But if I launch it
> > > > with sql server (what I would like to perform) this step does not run
> > > > perfectly.
> > > >
> > > > What does this job?
> > > >
> > > > 1) run the batch
> > > > Step 1
> > > > DECLARE @.cmd sysname, @.var sysname
> > > > SET @.var = 'start D:\Backups\MyBacth.bat'
> > > > EXEC master..xp_cmdshell @.var
> > > >
> > > > 2) Overwrite the DEVICE
> > > >
> > > > 3) Verify DEVICE integrity
> > > >
> > > >
> > > > I have already set privileges for sqlservice in to this share
> > > >
> > > >
> > > > What do i need to do? Any Suggestions?
> > > >
> > > >
> > > > Thanks in advance
> > > >
> > > >
> > > >
> > > > Ina
> > > >
> > > >
> >
> >|||John Thank you for this tips.
I will try to do that.
Ina
John Bell wrote:
> Hi Ina
> Happy New Year!
> Looking back at your script, can you change the batch file it so that does
> not map the network drive, zips up the backup file before it copies it to the
> UNC? On the extended properties for the step can you then add a log file so
> that any error messages are captured. Then schedule the job to run and post
> the messages from the log file.
> Thanks
> John
>
> "ina" wrote:
> > Hello Jonh I was in holidays,
> >
> > Happy new 2007!!!
> >
> > I did not solved the problem. my sqlservice has network privileges but
> > I cannot run this job. So, I did a scheduled task for copy and zip the
> > backup and run a job to overwrite the existing backup.
> >
> > I have three disk configurate with my slq server (C --> local, D -->
> > Data and F --> backup) how can I set up a new one without restall sql
> > Server again.
> >
> > Best regards,
> >
> > Ina
> >
> > John Bell wrote:
> > > Hi Ina
> > >
> > > Does this mean that you have solved the problem? If not can you log onto the
> > > server as the service account and run the job?
> > >
> > > John
> > >
> > > "ina" wrote:
> > >
> > > > Sorry,
> > > >
> > > > Thank you for your answer... yes it is running and has network
> > > > privileges.
> > > >
> > > > Regards,
> > > >
> > > > Ina
> > > >
> > > >
> > > > John Bell wrote:
> > > > > Hi
> > > > >
> > > > > Apart from the typo in your script! You don't say what the SQL Agent account
> > > > > is running as and if it has network privileges.
> > > > >
> > > > > John
> > > > >
> > > > > "ina" wrote:
> > > > >
> > > > > > Hello Guys,
> > > > > >
> > > > > > I have a problem with a job moving and zipping file to share drive
> > > > > >
> > > > > >
> > > > > > What does my Batch?
> > > > > >
> > > > > >
> > > > > >
> > > > > > 1) Copy backup device (initially in D:/) into
> > > > > > //SERVER/SHARE/Archived_Backups/
> > > > > >
> > > > > > 2) Create new folder in //SERVER/SHARE/Archived_Backups/
> > > > > >
> > > > > > 3) Move the DEVICE into this new folder
> > > > > >
> > > > > > 4) Zip the DEVICE and named it today.zip
> > > > > >
> > > > > >
> > > > > > if I run it manually the batch file works perfectly, But if I launch it
> > > > > > with sql server (what I would like to perform) this step does not run
> > > > > > perfectly.
> > > > > >
> > > > > > What does this job?
> > > > > >
> > > > > > 1) run the batch
> > > > > > Step 1
> > > > > > DECLARE @.cmd sysname, @.var sysname
> > > > > > SET @.var = 'start D:\Backups\MyBacth.bat'
> > > > > > EXEC master..xp_cmdshell @.var
> > > > > >
> > > > > > 2) Overwrite the DEVICE
> > > > > >
> > > > > > 3) Verify DEVICE integrity
> > > > > >
> > > > > >
> > > > > > I have already set privileges for sqlservice in to this share
> > > > > >
> > > > > >
> > > > > > What do i need to do? Any Suggestions?
> > > > > >
> > > > > >
> > > > > > Thanks in advance
> > > > > >
> > > > > >
> > > > > >
> > > > > > Ina
> > > > > >
> > > > > >
> > > >
> > > >
> >
> >
Run As Command
I need to copy a backup file from server to server in seperate domains.
Unfortunately in my company they do not have trusted connections. So I need
to use a seperate logon for the destination server. I have tried a mapped
drive that is mapped as a valid logon in thatdomain with no luck, I get
"cannot find the drive specified." Is there a way thorugh sql server to run
a
job or a copy as something different than the SQL Agent account. FYI, the
logon that I use to logon to the other domain cannot be registered as a logo
n
to SQL server bacause SQL Server cannot see that domain. Any suggestions?Not sure of all the details on the mapped drive - you had no
luck where? Can you create a mapped drive and access it from
your domain with a particular login and password?
If you have that, you could execute net use to map a drive
and specify a domain\user and password. Then copy the file
to that mapped drive. Then delete the mapped drive when
done.
-Sue
On Mon, 21 May 2007 09:11:00 -0700, Rick
<Rick@.discussions.microsoft.com> wrote:
>I need to copy a backup file from server to server in seperate domains.
>Unfortunately in my company they do not have trusted connections. So I need
>to use a seperate logon for the destination server. I have tried a mapped
>drive that is mapped as a valid logon in thatdomain with no luck, I get
>"cannot find the drive specified." Is there a way thorugh sql server to run
a
>job or a copy as something different than the SQL Agent account. FYI, the
>logon that I use to logon to the other domain cannot be registered as a log
on
>to SQL server bacause SQL Server cannot see that domain. Any suggestions?|||Rick
here is how you can do it
SELECT @.VCHCOMMAND = 'net use v: \\10.1.97.150\sqlbackups$\SRDEV dbbackup
/user:XXXX\srdev_db_backup'
EXEC @.IRESULT = MASTER..XP_CMDSHELL @.VCHCOMMAND, NO_OUTPUT
where v: is the share name
dbbackup : password to connect \\10.1.97.150\sqlbackups$\SRDEV
XXXX\srdev_db_backup : is the user login on the destination server
if you are using BACKUP DATABASE command to backup the database then
issue the above command first and then backup up the database on to v:
hope this helps you
Regards
VT
Knowledge is power, share it...
http://oneplace4sql.blogspot.com/
"Rick" <Rick@.discussions.microsoft.com> wrote in message
news:042AEE4F-6267-4EA8-8BB6-4609B32409DB@.microsoft.com...
>I need to copy a backup file from server to server in seperate domains.
> Unfortunately in my company they do not have trusted connections. So I
> need
> to use a seperate logon for the destination server. I have tried a mapped
> drive that is mapped as a valid logon in thatdomain with no luck, I get
> "cannot find the drive specified." Is there a way thorugh sql server to
> run a
> job or a copy as something different than the SQL Agent account. FYI, the
> logon that I use to logon to the other domain cannot be registered as a
> logon
> to SQL server bacause SQL Server cannot see that domain. Any suggestions?|||This is what I came up with after a lot of trial and error
Declare @.VCHCOMMAND Char (150),
@.CMD Char (50),
@.COPY Char (50)
Set @.VCHCOMMAND = 'net use L: *\\172.9.17.99\Backup peoples123
/user:sigueqa\rpeoples'
Set @.COPY = 'copy \\server2\Backup\DB\SIRETGUE.Bak L:\DB'
Set @.CMD = @.VCHCOMMAND + ' Y ' + @.COPY
EXEC MASTER..XP_CMDSHELL @.CMD
, but I get the following error:
L: has a remembered connection to \\172.17.9.67\backup. Do you
want to overwrite the remembered connection? (Y/N) [Y]:
No valid response was provided.
NULL
Any Suggestions?
"vt" wrote:
> Rick
> here is how you can do it
> SELECT @.VCHCOMMAND = 'net use v: \\10.1.97.150\sqlbackups$\SRDEV dbbackup
> /user:XXXX\srdev_db_backup'
> EXEC @.IRESULT = MASTER..XP_CMDSHELL @.VCHCOMMAND, NO_OUTPUT
> where v: is the share name
> dbbackup : password to connect \\10.1.97.150\sqlbackups$\SRDEV
> XXXX\srdev_db_backup : is the user login on the destination server
> if you are using BACKUP DATABASE command to backup the database then
> issue the above command first and then backup up the database on to v:
> hope this helps you
>
>
> Regards
> VT
> Knowledge is power, share it...
> http://oneplace4sql.blogspot.com/
>
> "Rick" <Rick@.discussions.microsoft.com> wrote in message
> news:042AEE4F-6267-4EA8-8BB6-4609B32409DB@.microsoft.com...
>
>|||> L: has a remembered connection to \\172.17.9.67\backup. Do you
> want to overwrite the remembered connection? (Y/N) [Y]:
> No valid response was provided.
> NULL
> Any Suggestions?
First, remove the persistent connection:
EXEC master..xp_cmdshell 'net use L: /delete'
Then try:
--map drive
EXEC master..xp_cmdshell 'net use L: \\172.9.17.99\Backup peoples123
/user:sigueqa\rpeoples /persistent:no'
--copy
EXEC master..xp_cmdshell 'copy \\server2\Backup\DB\SIRETGUE.Bak L:\DB'
--unmap drive
EXEC master..xp_cmdshell 'net use L: /delete'
I might be wrong but I think you could also do without the drive letter:
--establish security credentials
EXEC master..xp_cmdshell 'net use \\172.9.17.99\Backup peoples123
/user:sigueqa\rpeoples /persistent:no'
--copy
EXEC master..xp_cmdshell 'copy \\server2\Backup\DB\SIRETGUE.Bak
\\172.9.17.99\Backup\DB'
--unmap
EXEC master..xp_cmdshell 'net use \\172.9.17.99\Backup /delete'
Hope this helps.
Dan Guzman
SQL Server MVP
"Rick" <Rick@.discussions.microsoft.com> wrote in message
news:6D7669E9-390B-46D4-8EAB-F03196899C3B@.microsoft.com...[vbcol=seagreen]
> This is what I came up with after a lot of trial and error
> Declare @.VCHCOMMAND Char (150),
> @.CMD Char (50),
> @.COPY Char (50)
> Set @.VCHCOMMAND = 'net use L: *\\172.9.17.99\Backup peoples123
> /user:sigueqa\rpeoples'
> Set @.COPY = 'copy \\server2\Backup\DB\SIRETGUE.Bak L:\DB'
> Set @.CMD = @.VCHCOMMAND + ' Y ' + @.COPY
> EXEC MASTER..XP_CMDSHELL @.CMD
>
> , but I get the following error:
> L: has a remembered connection to \\172.17.9.67\backup. Do you
> want to overwrite the remembered connection? (Y/N) [Y]:
> No valid response was provided.
> NULL
> Any Suggestions?
> "vt" wrote:
>
Unfortunately in my company they do not have trusted connections. So I need
to use a seperate logon for the destination server. I have tried a mapped
drive that is mapped as a valid logon in thatdomain with no luck, I get
"cannot find the drive specified." Is there a way thorugh sql server to run
a
job or a copy as something different than the SQL Agent account. FYI, the
logon that I use to logon to the other domain cannot be registered as a logo
n
to SQL server bacause SQL Server cannot see that domain. Any suggestions?Not sure of all the details on the mapped drive - you had no
luck where? Can you create a mapped drive and access it from
your domain with a particular login and password?
If you have that, you could execute net use to map a drive
and specify a domain\user and password. Then copy the file
to that mapped drive. Then delete the mapped drive when
done.
-Sue
On Mon, 21 May 2007 09:11:00 -0700, Rick
<Rick@.discussions.microsoft.com> wrote:
>I need to copy a backup file from server to server in seperate domains.
>Unfortunately in my company they do not have trusted connections. So I need
>to use a seperate logon for the destination server. I have tried a mapped
>drive that is mapped as a valid logon in thatdomain with no luck, I get
>"cannot find the drive specified." Is there a way thorugh sql server to run
a
>job or a copy as something different than the SQL Agent account. FYI, the
>logon that I use to logon to the other domain cannot be registered as a log
on
>to SQL server bacause SQL Server cannot see that domain. Any suggestions?|||Rick
here is how you can do it
SELECT @.VCHCOMMAND = 'net use v: \\10.1.97.150\sqlbackups$\SRDEV dbbackup
/user:XXXX\srdev_db_backup'
EXEC @.IRESULT = MASTER..XP_CMDSHELL @.VCHCOMMAND, NO_OUTPUT
where v: is the share name
dbbackup : password to connect \\10.1.97.150\sqlbackups$\SRDEV
XXXX\srdev_db_backup : is the user login on the destination server
if you are using BACKUP DATABASE command to backup the database then
issue the above command first and then backup up the database on to v:
hope this helps you
Regards
VT
Knowledge is power, share it...
http://oneplace4sql.blogspot.com/
"Rick" <Rick@.discussions.microsoft.com> wrote in message
news:042AEE4F-6267-4EA8-8BB6-4609B32409DB@.microsoft.com...
>I need to copy a backup file from server to server in seperate domains.
> Unfortunately in my company they do not have trusted connections. So I
> need
> to use a seperate logon for the destination server. I have tried a mapped
> drive that is mapped as a valid logon in thatdomain with no luck, I get
> "cannot find the drive specified." Is there a way thorugh sql server to
> run a
> job or a copy as something different than the SQL Agent account. FYI, the
> logon that I use to logon to the other domain cannot be registered as a
> logon
> to SQL server bacause SQL Server cannot see that domain. Any suggestions?|||This is what I came up with after a lot of trial and error
Declare @.VCHCOMMAND Char (150),
@.CMD Char (50),
@.COPY Char (50)
Set @.VCHCOMMAND = 'net use L: *\\172.9.17.99\Backup peoples123
/user:sigueqa\rpeoples'
Set @.COPY = 'copy \\server2\Backup\DB\SIRETGUE.Bak L:\DB'
Set @.CMD = @.VCHCOMMAND + ' Y ' + @.COPY
EXEC MASTER..XP_CMDSHELL @.CMD
, but I get the following error:
L: has a remembered connection to \\172.17.9.67\backup. Do you
want to overwrite the remembered connection? (Y/N) [Y]:
No valid response was provided.
NULL
Any Suggestions?
"vt" wrote:
> Rick
> here is how you can do it
> SELECT @.VCHCOMMAND = 'net use v: \\10.1.97.150\sqlbackups$\SRDEV dbbackup
> /user:XXXX\srdev_db_backup'
> EXEC @.IRESULT = MASTER..XP_CMDSHELL @.VCHCOMMAND, NO_OUTPUT
> where v: is the share name
> dbbackup : password to connect \\10.1.97.150\sqlbackups$\SRDEV
> XXXX\srdev_db_backup : is the user login on the destination server
> if you are using BACKUP DATABASE command to backup the database then
> issue the above command first and then backup up the database on to v:
> hope this helps you
>
>
> Regards
> VT
> Knowledge is power, share it...
> http://oneplace4sql.blogspot.com/
>
> "Rick" <Rick@.discussions.microsoft.com> wrote in message
> news:042AEE4F-6267-4EA8-8BB6-4609B32409DB@.microsoft.com...
>
>|||> L: has a remembered connection to \\172.17.9.67\backup. Do you
> want to overwrite the remembered connection? (Y/N) [Y]:
> No valid response was provided.
> NULL
> Any Suggestions?
First, remove the persistent connection:
EXEC master..xp_cmdshell 'net use L: /delete'
Then try:
--map drive
EXEC master..xp_cmdshell 'net use L: \\172.9.17.99\Backup peoples123
/user:sigueqa\rpeoples /persistent:no'
--copy
EXEC master..xp_cmdshell 'copy \\server2\Backup\DB\SIRETGUE.Bak L:\DB'
--unmap drive
EXEC master..xp_cmdshell 'net use L: /delete'
I might be wrong but I think you could also do without the drive letter:
--establish security credentials
EXEC master..xp_cmdshell 'net use \\172.9.17.99\Backup peoples123
/user:sigueqa\rpeoples /persistent:no'
--copy
EXEC master..xp_cmdshell 'copy \\server2\Backup\DB\SIRETGUE.Bak
\\172.9.17.99\Backup\DB'
--unmap
EXEC master..xp_cmdshell 'net use \\172.9.17.99\Backup /delete'
Hope this helps.
Dan Guzman
SQL Server MVP
"Rick" <Rick@.discussions.microsoft.com> wrote in message
news:6D7669E9-390B-46D4-8EAB-F03196899C3B@.microsoft.com...[vbcol=seagreen]
> This is what I came up with after a lot of trial and error
> Declare @.VCHCOMMAND Char (150),
> @.CMD Char (50),
> @.COPY Char (50)
> Set @.VCHCOMMAND = 'net use L: *\\172.9.17.99\Backup peoples123
> /user:sigueqa\rpeoples'
> Set @.COPY = 'copy \\server2\Backup\DB\SIRETGUE.Bak L:\DB'
> Set @.CMD = @.VCHCOMMAND + ' Y ' + @.COPY
> EXEC MASTER..XP_CMDSHELL @.CMD
>
> , but I get the following error:
> L: has a remembered connection to \\172.17.9.67\backup. Do you
> want to overwrite the remembered connection? (Y/N) [Y]:
> No valid response was provided.
> NULL
> Any Suggestions?
> "vt" wrote:
>
Run an SP without adding anything to the transaction log?
Hi, I have an SP that will basically copy one table's data to another with
some transformation involved. The source table over 1 billion rows. The
machine has limited disk space and the transaction log will grow too large
and cause trouble.
Is there a way to run this SP and not have the transactions logged for it?
Thanks,
ADAMWhat kind of transformation?
If you can use a select statement to bcp the data to a file, then you can
change the recovery model (first make a full db backup) to bulk-logged, and
use bcp utility or bulk insert statement to insert the data into the second
table. Change back the recovery model to full when you finish.
AMB
"adami" wrote:
> Hi, I have an SP that will basically copy one table's data to another with
> some transformation involved. The source table over 1 billion rows. The
> machine has limited disk space and the transaction log will grow too large
> and cause trouble.
> Is there a way to run this SP and not have the transactions logged for it?
> Thanks,
> ADAM|||Hi,
Set the database into Simple recovery Recovery model. After that execute the
Insert statment in batches of 1000 or 2000. Commit the transaction after
each batch. This will clear the Transaction log and will ensure that LDF
will not grow.
Thanks
Hari
SQL Server MVP
"adami" <adami@.discussions.microsoft.com> wrote in message
news:44698021-D132-412F-8BC2-0C47D08AA976@.microsoft.com...
> Hi, I have an SP that will basically copy one table's data to another with
> some transformation involved. The source table over 1 billion rows. The
> machine has limited disk space and the transaction log will grow too large
> and cause trouble.
> Is there a way to run this SP and not have the transactions logged for it?
> Thanks,
> ADAM|||To start, read up the setting the database's recovery model to simple, even
if temporarily for this process. Also, you could see if setting the database
to SINGLE_USER mode during the process is possible. Dropping indexes from
the destination table prior to the inserts and then re-creating them again
afterward will also reduce the number of transaction, speed things up and
reduce index fragmentation.
I have a data warehousing project where I have a similar situation, except
my row volume is only around 10,000,000 instead of 1,000,000,000, but still
a dump load of data. What I actually did was to create a view of the source
table which performs the needed transformations, and a DTS package exports
the view to a tab delimited text file. Once the export is complete, I bulk
copy (BCP.EXE) the text file into the destination table. Read up on the bulk
copy feature and how it can be used to move data with minimal logging. Of
everything I tried, this was by far the fastest.
"adami" <adami@.discussions.microsoft.com> wrote in message
news:44698021-D132-412F-8BC2-0C47D08AA976@.microsoft.com...
> Hi, I have an SP that will basically copy one table's data to another with
> some transformation involved. The source table over 1 billion rows. The
> machine has limited disk space and the transaction log will grow too large
> and cause trouble.
> Is there a way to run this SP and not have the transactions logged for it?
> Thanks,
> ADAM
some transformation involved. The source table over 1 billion rows. The
machine has limited disk space and the transaction log will grow too large
and cause trouble.
Is there a way to run this SP and not have the transactions logged for it?
Thanks,
ADAMWhat kind of transformation?
If you can use a select statement to bcp the data to a file, then you can
change the recovery model (first make a full db backup) to bulk-logged, and
use bcp utility or bulk insert statement to insert the data into the second
table. Change back the recovery model to full when you finish.
AMB
"adami" wrote:
> Hi, I have an SP that will basically copy one table's data to another with
> some transformation involved. The source table over 1 billion rows. The
> machine has limited disk space and the transaction log will grow too large
> and cause trouble.
> Is there a way to run this SP and not have the transactions logged for it?
> Thanks,
> ADAM|||Hi,
Set the database into Simple recovery Recovery model. After that execute the
Insert statment in batches of 1000 or 2000. Commit the transaction after
each batch. This will clear the Transaction log and will ensure that LDF
will not grow.
Thanks
Hari
SQL Server MVP
"adami" <adami@.discussions.microsoft.com> wrote in message
news:44698021-D132-412F-8BC2-0C47D08AA976@.microsoft.com...
> Hi, I have an SP that will basically copy one table's data to another with
> some transformation involved. The source table over 1 billion rows. The
> machine has limited disk space and the transaction log will grow too large
> and cause trouble.
> Is there a way to run this SP and not have the transactions logged for it?
> Thanks,
> ADAM|||To start, read up the setting the database's recovery model to simple, even
if temporarily for this process. Also, you could see if setting the database
to SINGLE_USER mode during the process is possible. Dropping indexes from
the destination table prior to the inserts and then re-creating them again
afterward will also reduce the number of transaction, speed things up and
reduce index fragmentation.
I have a data warehousing project where I have a similar situation, except
my row volume is only around 10,000,000 instead of 1,000,000,000, but still
a dump load of data. What I actually did was to create a view of the source
table which performs the needed transformations, and a DTS package exports
the view to a tab delimited text file. Once the export is complete, I bulk
copy (BCP.EXE) the text file into the destination table. Read up on the bulk
copy feature and how it can be used to move data with minimal logging. Of
everything I tried, this was by far the fastest.
"adami" <adami@.discussions.microsoft.com> wrote in message
news:44698021-D132-412F-8BC2-0C47D08AA976@.microsoft.com...
> Hi, I have an SP that will basically copy one table's data to another with
> some transformation involved. The source table over 1 billion rows. The
> machine has limited disk space and the transaction log will grow too large
> and cause trouble.
> Is there a way to run this SP and not have the transactions logged for it?
> Thanks,
> ADAM
Subscribe to:
Posts (Atom)