Hi all,
I would like to save the output of a FOR XML stored procedure to a file on my hard drive with a filename of my choosing. Can anybody point me in the write direction on how to do this. (I've got the FOR XML sproc written, I just need help figuring out ho
w to persist it to a file. Thanks.
JT
Hi JT,
I noticed you make another post with topic 'Persist Sproc OUTPUT' in the
newsgroup: microsoft.public.sqlserver.programming. I found an community
member has added his reply to that thread and I will add my reply if you
have follow up questions to that thread
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Mingqing Cheng
Microsoft Online Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
|||See the thread entitled "extracting results of XML stored proc to file"
started by Mike UK in this newsgroup.
Cheers,
Graeme
--
Graeme Malcolm
Principal Technologist
Content Master Ltd.
www.contentmaster.com
www.microsoft.com/mspress/books/6137.asp
"JT" <JTnospam@.verizon.net> wrote in message
news:A3758B34-4AC8-4675-8326-319C40508CFF@.microsoft.com...
> Hi all,
> I would like to save the output of a FOR XML stored procedure to a file on
my hard drive with a filename of my choosing. Can anybody point me in the
write direction on how to do this. (I've got the FOR XML sproc written, I
just need help figuring out how to persist it to a file. Thanks.
> JT
|||Thanks Graeme.
JT
Showing posts with label drive. Show all posts
Showing posts with label drive. Show all posts
Wednesday, March 28, 2012
Monday, March 12, 2012
permissions for drive where data is
Using SS2000 SP4. I have an account called "sqlserver" that I use to start
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
--
Dan D.I just tried to detach the database again in code and got messages like these:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.|||I ran the reattachment again and it was okay.
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
--
Dan D.I just tried to detach the database again in code and got messages like these:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.|||I ran the reattachment again and it was okay.
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
permissions for drive where data is
Using SS2000 SP4. I have an account called "sqlserver" that I use to start
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
Dan D.
I just tried to detach the database again in code and got messages like these:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
|||I ran the reattachment again and it was okay.
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
Dan D.
I just tried to detach the database again in code and got messages like these:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
|||I ran the reattachment again and it was okay.
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is an
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives are
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
permissions for drive where data is
Using SS2000 SP4. I have an account called "sqlserver" that I use to start
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
--
Dan D.I just tried to detach the database again in code and got messages like thes
e:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is a
n
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives a
re
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.|||I ran the reattachment again and it was okay.
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is a
n
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives a
re
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
the SQL Server service and the SQL Server Agent service. This account is an
admin account in sql server. I moved a database from one drive to a new
drive. The database came up as read-only. The permissions on both drives are
the same.
Any ideas why the database came up read-only?
Thanks,
--
Dan D.I just tried to detach the database again in code and got messages like thes
e:
Running UPDATE STATISTICS on all tables
Updating dbo.dtproperties
Server: Msg 3906, Level 16, State 1, Line 1
Could not run BEGIN TRANSACTION in database 'promo2007' because the database
is read-only.
I then tried to take the database offline in EM and it said the database
didn't exist. I then tried to rename the MDF file and I was able to.
Can I create a new database with the same name, detach it and put the
original MDF file in place and attach it again?
Thanks,
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is a
n
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives a
re
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.|||I ran the reattachment again and it was okay.
--
Dan D.
"Dan D." wrote:
> Using SS2000 SP4. I have an account called "sqlserver" that I use to start
> the SQL Server service and the SQL Server Agent service. This account is a
n
> admin account in sql server. I moved a database from one drive to a new
> drive. The database came up as read-only. The permissions on both drives a
re
> the same.
> Any ideas why the database came up read-only?
> Thanks,
> --
> Dan D.
Friday, March 9, 2012
Permissions
They removed the share off of the drive where my snapshot replication step
(SS 2000 SP3a) writes to. That's all well and good because someone had
accidently shared out the whole drive. But now my snapshot step is failing
with "process could not create \\server\h\repl\unc".
Of course, we added a share to the repl folder and it failed with the same
error msg. Then we added in the share to the whole drive again and it still
failed.
So I am wondering if some permissions got clobbered or changed. So here are
my q's:
1. What permissions does snapshot replication run under? Does it just run
under the main sql server service account?
2. Can we just share out the subfolder, i.e. either the repl or the unc
subfolder?
3. Is there anything else we should be troubleshooting?
Any help would be much appreciated...Nevermind - I got it to work.
"CLM" wrote:
> They removed the share off of the drive where my snapshot replication step
> (SS 2000 SP3a) writes to. That's all well and good because someone had
> accidently shared out the whole drive. But now my snapshot step is failin
g
> with "process could not create \\server\h\repl\unc".
> Of course, we added a share to the repl folder and it failed with the same
> error msg. Then we added in the share to the whole drive again and it sti
ll
> failed.
> So I am wondering if some permissions got clobbered or changed. So here a
re
> my q's:
> 1. What permissions does snapshot replication run under? Does it just ru
n
> under the main sql server service account?
> 2. Can we just share out the subfolder, i.e. either the repl or the unc
> subfolder?
> 3. Is there anything else we should be troubleshooting?
> Any help would be much appreciated...
(SS 2000 SP3a) writes to. That's all well and good because someone had
accidently shared out the whole drive. But now my snapshot step is failing
with "process could not create \\server\h\repl\unc".
Of course, we added a share to the repl folder and it failed with the same
error msg. Then we added in the share to the whole drive again and it still
failed.
So I am wondering if some permissions got clobbered or changed. So here are
my q's:
1. What permissions does snapshot replication run under? Does it just run
under the main sql server service account?
2. Can we just share out the subfolder, i.e. either the repl or the unc
subfolder?
3. Is there anything else we should be troubleshooting?
Any help would be much appreciated...Nevermind - I got it to work.
"CLM" wrote:
> They removed the share off of the drive where my snapshot replication step
> (SS 2000 SP3a) writes to. That's all well and good because someone had
> accidently shared out the whole drive. But now my snapshot step is failin
g
> with "process could not create \\server\h\repl\unc".
> Of course, we added a share to the repl folder and it failed with the same
> error msg. Then we added in the share to the whole drive again and it sti
ll
> failed.
> So I am wondering if some permissions got clobbered or changed. So here a
re
> my q's:
> 1. What permissions does snapshot replication run under? Does it just ru
n
> under the main sql server service account?
> 2. Can we just share out the subfolder, i.e. either the repl or the unc
> subfolder?
> 3. Is there anything else we should be troubleshooting?
> Any help would be much appreciated...
Labels:
database,
drive,
microsoft,
mysql,
oracle,
permissions,
replication,
server,
share,
snapshot,
sp3a,
sql,
step,
writes
Permissions
They removed the share off of the drive where my snapshot replication step
(SS 2000 SP3a) writes to. That's all well and good because someone had
accidently shared out the whole drive. But now my snapshot step is failing
with "process could not create \\server\h\repl\unc".
Of course, we added a share to the repl folder and it failed with the same
error msg. Then we added in the share to the whole drive again and it still
failed.
So I am wondering if some permissions got clobbered or changed. So here are
my q's:
1. What permissions does snapshot replication run under? Does it just run
under the main sql server service account?
2. Can we just share out the subfolder, i.e. either the repl or the unc
subfolder?
3. Is there anything else we should be troubleshooting?
Any help would be much appreciated...Nevermind - I got it to work.
"CLM" wrote:
> They removed the share off of the drive where my snapshot replication step
> (SS 2000 SP3a) writes to. That's all well and good because someone had
> accidently shared out the whole drive. But now my snapshot step is failing
> with "process could not create \\server\h\repl\unc".
> Of course, we added a share to the repl folder and it failed with the same
> error msg. Then we added in the share to the whole drive again and it still
> failed.
> So I am wondering if some permissions got clobbered or changed. So here are
> my q's:
> 1. What permissions does snapshot replication run under? Does it just run
> under the main sql server service account?
> 2. Can we just share out the subfolder, i.e. either the repl or the unc
> subfolder?
> 3. Is there anything else we should be troubleshooting?
> Any help would be much appreciated...
(SS 2000 SP3a) writes to. That's all well and good because someone had
accidently shared out the whole drive. But now my snapshot step is failing
with "process could not create \\server\h\repl\unc".
Of course, we added a share to the repl folder and it failed with the same
error msg. Then we added in the share to the whole drive again and it still
failed.
So I am wondering if some permissions got clobbered or changed. So here are
my q's:
1. What permissions does snapshot replication run under? Does it just run
under the main sql server service account?
2. Can we just share out the subfolder, i.e. either the repl or the unc
subfolder?
3. Is there anything else we should be troubleshooting?
Any help would be much appreciated...Nevermind - I got it to work.
"CLM" wrote:
> They removed the share off of the drive where my snapshot replication step
> (SS 2000 SP3a) writes to. That's all well and good because someone had
> accidently shared out the whole drive. But now my snapshot step is failing
> with "process could not create \\server\h\repl\unc".
> Of course, we added a share to the repl folder and it failed with the same
> error msg. Then we added in the share to the whole drive again and it still
> failed.
> So I am wondering if some permissions got clobbered or changed. So here are
> my q's:
> 1. What permissions does snapshot replication run under? Does it just run
> under the main sql server service account?
> 2. Can we just share out the subfolder, i.e. either the repl or the unc
> subfolder?
> 3. Is there anything else we should be troubleshooting?
> Any help would be much appreciated...
Labels:
database,
drive,
microsoft,
mysql,
oracle,
permissions,
replication,
server,
share,
snapshot,
sp3a,
sql,
step,
writes
Subscribe to:
Posts (Atom)