Showing posts with label file. Show all posts
Showing posts with label file. Show all posts

Friday, March 30, 2012

Modifing XML document is too slow

I need insert many dates from tables to XML file, I use T-SQL, everything is OK, but it works too slow.

Is there another way? Thanks' a lot.

I use such sequence T-SQL:

Declare

@.doc XML,

@.ixml nvarchar(4000)

SELECT @.ixml=(SELECT * FROM SAMPLE "d:SAMPLE" for XML AUTO)

SET @.ixml = 'SET @.Doc.modify(''

declare namespace dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution";

declare namespace d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields";

insert ('+@.ixml+') into (dfs:myFields/dfs:dataFields)[1] '')'

exec sp_ExecuteSql @.STMT = @.ixml, @.PARAMS = N'@.DOC XML OUT', @.DOC = @.DOC OUT

In order for me to help you troubleshoot the performance please explain the shape of your XML data and the scenario you are using XML in.

General notes.

If your scenario is collecting changes made to a set of tables and aggregating them into an XML document you may want to aggregate each change into a smaller XML instance in a dedicated XML column and then aggregate multiple instances into a bigger XML document upon retrieval.

If your scenario is adding data from database tables to an existing document on the client side you may retrieve your data from the server in XML form using FOR XML and then combine the new and the existing XML documents using XSLT.

If you need to add data from database tables to an XML document stored in an XML variable/parameter the most performing will be to compose a new instance, for example:

WITH XMLNAMESPACES(

'http://schemas.microsoft.com/office/infopath/2003/dataFormSolution' AS dfs,

'http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' AS d)

SELECT @.doc =

(

SELECT

@.doc.query('dfs:myFields/dfs:dataFields/*') AS "dfs:dataFields",

(SELECT * FROM SAMPLE FOR XML RAW('d:SAMPLE'), TYPE) AS "dfs:dataFields"

FOR XML PATH, TYPE, ROOT('dfs:myFields')

);

If reconstruction is too complex you can combine the old and new XML into a single instance, insert the new part into the appropriate place, and then delete the new part:

-- combine the old and the new XML

WITH XMLNAMESPACES(

'http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' AS d)

SELECT @.doc =

(

SELECT

@.doc,

(SELECT * FROM SAMPLE FOR XML RAW('d:SAMPLE'), TYPE) AS "Wrapper"

FOR XML PATH, TYPE

);

-- insert the new XML fragment into the appropriate place

SET @.doc = @.doc.modify('

declare namespace dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution";

insert /Wrapper/* into (dfs:myFields/dfs:dataFields)[1]

');

-- delete the new XML fragment

SET @.doc = @.doc.modify('delete /Wrapper');

Inserting bigger XML fragments using dynamic query with modify(‘insert…’) method on XML type is not recommended in terms of performance.

Best regards,

Eugene Kogan,

Technical Lead,

SQL Server Engine

This posting is provided "AS IS" with no warranties, and confers no rights.

The code samples were not verified and may contain syntax errors.

|||

Thanks’ a lot.

I use completely another way, simple serializing with some handwriting end tags, time was decreased from 2 minutes 38 seconds to 7 seconds.

Modifing XML document is too slow

I need insert many dates from tables to XML file, I use T-SQL, everything is OK, but it works too slow.

Is there another way? Thanks' a lot.

I use such sequence T-SQL:

Declare

@.doc XML,

@.ixml nvarchar(4000)

SELECT @.ixml=(SELECT * FROM SAMPLE "d:SAMPLE" for XML AUTO)

SET @.ixml = 'SET @.Doc.modify(''

declare namespace dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution";

declare namespace d="http://schemas.microsoft.com/office/infopath/2003/ado/dataFields";

insert ('+@.ixml+') into (dfs:myFields/dfs:dataFields)[1] '')'

exec sp_ExecuteSql @.STMT = @.ixml, @.PARAMS = N'@.DOC XML OUT', @.DOC = @.DOC OUT

In order for me to help you troubleshoot the performance please explain the shape of your XML data and the scenario you are using XML in.

General notes.

If your scenario is collecting changes made to a set of tables and aggregating them into an XML document you may want to aggregate each change into a smaller XML instance in a dedicated XML column and then aggregate multiple instances into a bigger XML document upon retrieval.

If your scenario is adding data from database tables to an existing document on the client side you may retrieve your data from the server in XML form using FOR XML and then combine the new and the existing XML documents using XSLT.

If you need to add data from database tables to an XML document stored in an XML variable/parameter the most performing will be to compose a new instance, for example:

WITH XMLNAMESPACES(

'http://schemas.microsoft.com/office/infopath/2003/dataFormSolution' AS dfs,

'http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' AS d)

SELECT @.doc =

(

SELECT

@.doc.query('dfs:myFields/dfs:dataFields/*') AS "dfs:dataFields",

(SELECT * FROM SAMPLE FOR XML RAW('d:SAMPLE'), TYPE) AS "dfs:dataFields"

FOR XML PATH, TYPE, ROOT('dfs:myFields')

);

If reconstruction is too complex you can combine the old and new XML into a single instance, insert the new part into the appropriate place, and then delete the new part:

-- combine the old and the new XML

WITH XMLNAMESPACES(

'http://schemas.microsoft.com/office/infopath/2003/ado/dataFields' AS d)

SELECT @.doc =

(

SELECT

@.doc,

(SELECT * FROM SAMPLE FOR XML RAW('d:SAMPLE'), TYPE) AS "Wrapper"

FOR XML PATH, TYPE

);

-- insert the new XML fragment into the appropriate place

SET @.doc = @.doc.modify('

declare namespace dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution";

insert /Wrapper/* into (dfs:myFields/dfs:dataFields)[1]

');

-- delete the new XML fragment

SET @.doc = @.doc.modify('delete /Wrapper');

Inserting bigger XML fragments using dynamic query with modify(‘insert…’) method on XML type is not recommended in terms of performance.

Best regards,

Eugene Kogan,

Technical Lead,

SQL Server Engine

This posting is provided "AS IS" with no warranties, and confers no rights.

The code samples were not verified and may contain syntax errors.

|||

Thanks’ a lot.

I use completely another way, simple serializing with some handwriting end tags, time was decreased from 2 minutes 38 seconds to 7 seconds.

Modified Date of a file

Hi All,
Think this must be pretty easy to do but can't find the commands anywhere... how can i use T-SQL to find the modified date of a particular file (say c:\temp\test.out) ?
Thanks
JohnYou could use extended sp xp_getfiledetails or xp_cmdshell to check info about file. If you need use this information late - save it in table.

insert mytable--table has to have structure according to sp recordset.
master..xp_cmdshell "dir c:\myfile.zip"

insert mytable--table has to have structure according to sp recordset.
master..xp_getfiledetails "c:\myfile.zip"|||Thanks Snail, worked a treat

Modification Logs

Is there a way to determine when a file was changed/modified? We're on
SQL 2000 and I need to know when a view was modified and by whom.
Thanks!By "file" I assume you mean that the view on the database has been
modified?

If so then there are several things you could do:

1. Get a transaction log examining tool which will let you scan the
transaction logs for the DDL command that modified the view. The "by
whom" depends on how your database security is set up. If, for
example, everyone is accustomed to using the "sa" account then this
won't tell you very much. If you have specific account set up for
each individual user then you'll have all the info you need.

2. If the answer to the above was the former then review your database
access security and ensure that only person-specific user accounts
have the privileges to make modifications.

3. Implement a change process for your SQL code - take a look at
www.dbghost.com for a tool that enables such a process.sql

Monday, March 26, 2012

Model and File Paths

I thought that the file path of the model is what would be used, when
creating a new database. I moved the logfile to it's own drive, and it all
works fine. However, when I create a new DB, it still shows that the Log
file goes to the same directory as my data file.
Am I missing something?
Can someone help me set my system, so newly created DB's are DEFAULT to:
d:\mssql\data = mdf files
e:\mssql\logs = ldf files
Thanks.
Kevin
I bet you created the database via EM. Take a look at CREATE DATABASE topic
in the BOL
"Kevin Antel" <kevina@.cqlcorp.com> wrote in message
news:ezw0GVNIGHA.1836@.TK2MSFTNGP11.phx.gbl...
>I thought that the file path of the model is what would be used, when
>creating a new database. I moved the logfile to it's own drive, and it all
>works fine. However, when I create a new DB, it still shows that the Log
>file goes to the same directory as my data file.
> Am I missing something?
> Can someone help me set my system, so newly created DB's are DEFAULT to:
> d:\mssql\data = mdf files
> e:\mssql\logs = ldf files
> Thanks.
>
|||Hi Kevin
this can be set up in two places - one during the installation - which
you could go back to using the REBUILDM.EXE utility I think - or right
click at the server level for you SQL Server in Enterprise manager and
you can set it on a tab under there - you may have to restart SQL
Server to force it in.
Model DB is the basis on all future DB creations - ie if you need to
set Collation on a particular column for future databases, you can set
it here and it will apply on all new databases. Also, you can set the
sizes on Model, so all future databases will have that property (ie
Immediate 50Mb MDF file)
Cheers
Steve L
|||That was it Steve, thanks! <right click> on EM and set it there. I queried
BOL but couldn't find anything about that setting.
Thanks again!
"Steve L" <steve_lawrenson@.tiscali.co.uk> wrote in message
news:1138104852.069486.319350@.g44g2000cwa.googlegr oups.com...
> Hi Kevin
> this can be set up in two places - one during the installation - which
> you could go back to using the REBUILDM.EXE utility I think - or right
> click at the server level for you SQL Server in Enterprise manager and
> you can set it on a tab under there - you may have to restart SQL
> Server to force it in.
> Model DB is the basis on all future DB creations - ie if you need to
> set Collation on a particular column for future databases, you can set
> it here and it will apply on all new databases. Also, you can set the
> sizes on Model, so all future databases will have that property (ie
> Immediate 50Mb MDF file)
> Cheers
> Steve L
>

Model and File Paths

I thought that the file path of the model is what would be used, when
creating a new database. I moved the logfile to it's own drive, and it all
works fine. However, when I create a new DB, it still shows that the Log
file goes to the same directory as my data file.
Am I missing something?
Can someone help me set my system, so newly created DB's are DEFAULT to:
d:\mssql\data = mdf files
e:\mssql\logs = ldf files
Thanks.Kevin
I bet you created the database via EM. Take a look at CREATE DATABASE topic
in the BOL
"Kevin Antel" <kevina@.cqlcorp.com> wrote in message
news:ezw0GVNIGHA.1836@.TK2MSFTNGP11.phx.gbl...
>I thought that the file path of the model is what would be used, when
>creating a new database. I moved the logfile to it's own drive, and it all
>works fine. However, when I create a new DB, it still shows that the Log
>file goes to the same directory as my data file.
> Am I missing something?
> Can someone help me set my system, so newly created DB's are DEFAULT to:
> d:\mssql\data = mdf files
> e:\mssql\logs = ldf files
> Thanks.
>|||Hi Kevin
this can be set up in two places - one during the installation - which
you could go back to using the REBUILDM.EXE utility I think - or right
click at the server level for you SQL Server in Enterprise manager and
you can set it on a tab under there - you may have to restart SQL
Server to force it in.
Model DB is the basis on all future DB creations - ie if you need to
set Collation on a particular column for future databases, you can set
it here and it will apply on all new databases. Also, you can set the
sizes on Model, so all future databases will have that property (ie
Immediate 50Mb MDF file)
Cheers
Steve L|||That was it Steve, thanks! <right click> on EM and set it there. I queried
BOL but couldn't find anything about that setting.
Thanks again!
"Steve L" <steve_lawrenson@.tiscali.co.uk> wrote in message
news:1138104852.069486.319350@.g44g2000cwa.googlegroups.com...
> Hi Kevin
> this can be set up in two places - one during the installation - which
> you could go back to using the REBUILDM.EXE utility I think - or right
> click at the server level for you SQL Server in Enterprise manager and
> you can set it on a tab under there - you may have to restart SQL
> Server to force it in.
> Model DB is the basis on all future DB creations - ie if you need to
> set Collation on a particular column for future databases, you can set
> it here and it will apply on all new databases. Also, you can set the
> sizes on Model, so all future databases will have that property (ie
> Immediate 50Mb MDF file)
> Cheers
> Steve L
>

Model and File Paths

I thought that the file path of the model is what would be used, when
creating a new database. I moved the logfile to it's own drive, and it all
works fine. However, when I create a new DB, it still shows that the Log
file goes to the same directory as my data file.
Am I missing something?
Can someone help me set my system, so newly created DB's are DEFAULT to:
d:\mssql\data = mdf files
e:\mssql\logs = ldf files
Thanks.Kevin
I bet you created the database via EM. Take a look at CREATE DATABASE topic
in the BOL
"Kevin Antel" <kevina@.cqlcorp.com> wrote in message
news:ezw0GVNIGHA.1836@.TK2MSFTNGP11.phx.gbl...
>I thought that the file path of the model is what would be used, when
>creating a new database. I moved the logfile to it's own drive, and it all
>works fine. However, when I create a new DB, it still shows that the Log
>file goes to the same directory as my data file.
> Am I missing something?
> Can someone help me set my system, so newly created DB's are DEFAULT to:
> d:\mssql\data = mdf files
> e:\mssql\logs = ldf files
> Thanks.
>|||Hi Kevin
this can be set up in two places - one during the installation - which
you could go back to using the REBUILDM.EXE utility I think - or right
click at the server level for you SQL Server in Enterprise manager and
you can set it on a tab under there - you may have to restart SQL
Server to force it in.
Model DB is the basis on all future DB creations - ie if you need to
set Collation on a particular column for future databases, you can set
it here and it will apply on all new databases. Also, you can set the
sizes on Model, so all future databases will have that property (ie
Immediate 50Mb MDF file)
Cheers
Steve L|||That was it Steve, thanks! <right click> on EM and set it there. I queried
BOL but couldn't find anything about that setting.
Thanks again!
"Steve L" <steve_lawrenson@.tiscali.co.uk> wrote in message
news:1138104852.069486.319350@.g44g2000cwa.googlegroups.com...
> Hi Kevin
> this can be set up in two places - one during the installation - which
> you could go back to using the REBUILDM.EXE utility I think - or right
> click at the server level for you SQL Server in Enterprise manager and
> you can set it on a tab under there - you may have to restart SQL
> Server to force it in.
> Model DB is the basis on all future DB creations - ie if you need to
> set Collation on a particular column for future databases, you can set
> it here and it will apply on all new databases. Also, you can set the
> sizes on Model, so all future databases will have that property (ie
> Immediate 50Mb MDF file)
> Cheers
> Steve L
>sql

Mobile sdf File created on Server

Hi there,

Background: I've created an application to run on windows mobile 5.0 devices. It replicates to a publication on a server. To do this it goes through ASP.net. This creates the database on the Mobile Devices.

Issue: Problem is the initial download of the database is taking 2hours plus to replicate (create) for the first time. So I'm trying to create the .sdf file on the server, zip it, and send it across to the handheld. All subsequent replications take about 5 minutes.

Question: Does anyone know how, or have examples for creating a Mobile CE database on the server. I need to create it using ASP.net and go through a pre-existing publication where a hostname used for filtering.

http://msdn2.microsoft.com/en-us/library/ms173009.aspx explains how to create this in SQL Server Management Stuidio. How do you do the same thing over ASP?

Can this be done using SMO? How do you create a SQLServerCompactEdition database using normal .NET Framework? Thanks for your help!!

Is it possible to access System.Data.SqlServerCe namespace without using the .NET Compact Framework?

So if I wanted to access the assembly in a VB.NET Windows App inside the .NET Framework, is this possible?

|||

Yes, SQL CE 3.1 allows you to do that. There’s a special version of SQL CE provider for desktop framework.

|||You can run code like in this sample (http://msdn2.microsoft.com/en-us/library/system.data.sqlserverce.sqlcereplication.synchronize.aspx

on your web server. create the file to the local file system and zip it. Then give the device the URL to the .zip file and your .NET Compact Framework app can the download the .zip file using HttpWebRequest class and unzip.

|||

So the problem i was having was in using an assembly that came with the compact framework. The System.Data.SqlServerCE.dll file is located in at least two places on my machine. One in the CE and one in the Common folder...both have the same name and version number.

I changed the reference from pointing at the CE version to the normal version and it cleared up the problem. Thanks for the responses, I'm still not sure what the differences in the assemblies are.

Mobile sdf File created on Server

Hi there,

Background: I've created an application to run on windows mobile 5.0 devices. It replicates to a publication on a server. To do this it goes through ASP.net. This creates the database on the Mobile Devices.

Issue: Problem is the initial download of the database is taking 2hours plus to replicate (create) for the first time. So I'm trying to create the .sdf file on the server, zip it, and send it across to the handheld. All subsequent replications take about 5 minutes.

Question: Does anyone know how, or have examples for creating a Mobile CE database on the server. I need to create it using ASP.net and go through a pre-existing publication where a hostname used for filtering.

http://msdn2.microsoft.com/en-us/library/ms173009.aspx explains how to create this in SQL Server Management Stuidio. How do you do the same thing over ASP?

Can this be done using SMO? How do you create a SQLServerCompactEdition database using normal .NET Framework? Thanks for your help!!

Is it possible to access System.Data.SqlServerCe namespace without using the .NET Compact Framework?

So if I wanted to access the assembly in a VB.NET Windows App inside the .NET Framework, is this possible?

|||

Yes, SQL CE 3.1 allows you to do that. There’s a special version of SQL CE provider for desktop framework.

|||You can run code like in this sample (http://msdn2.microsoft.com/en-us/library/system.data.sqlserverce.sqlcereplication.synchronize.aspx

on your web server. create the file to the local file system and zip it. Then give the device the URL to the .zip file and your .NET Compact Framework app can the download the .zip file using HttpWebRequest class and unzip.

|||

So the problem i was having was in using an assembly that came with the compact framework. The System.Data.SqlServerCE.dll file is located in at least two places on my machine. One in the CE and one in the Common folder...both have the same name and version number.

I changed the reference from pointing at the CE version to the normal version and it cleared up the problem. Thanks for the responses, I'm still not sure what the differences in the assemblies are.

sql

Friday, March 23, 2012

mmc.exe writes a lot to SQL.LOG when working with Enterprise Manag

I noticed that mmc.exe wrote a lot of information to SQL.LOG file, which was
generated by mmc.exe, when I was working with Enterprise Manager. For
instance, a double-click a database name or the server name would write abou
t
330K to the file. Thus, I had to wait for about 40 seconds per click. It
happended only on my Windows 2000 Server (SP4). Other servers do not even
generate the file. The following is sample of information written to the fil
e:
sqlstp 17c-840 ENTER SQLAllocHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 00000000
SQLHANDLE * 00794460
Any idea about it? How to turn off it? Thanks.I found a solution: Turning off ODBC tracing. It's the ODBC tracing that
writes trace to the file.
"Kathy" wrote:

> I noticed that mmc.exe wrote a lot of information to SQL.LOG file, which w
as
> generated by mmc.exe, when I was working with Enterprise Manager. For
> instance, a double-click a database name or the server name would write ab
out
> 330K to the file. Thus, I had to wait for about 40 seconds per click. It
> happended only on my Windows 2000 Server (SP4). Other servers do not even
> generate the file. The following is sample of information written to the f
ile:
> sqlstp 17c-840 ENTER SQLAllocHandle
> SQLSMALLINT 1 <SQL_HANDLE_ENV>
> SQLHANDLE 00000000
> SQLHANDLE * 00794460
> Any idea about it? How to turn off it? Thanks.
>

mmc.exe writes a lot to SQL.LOG when working with Enterprise Manag

I noticed that mmc.exe wrote a lot of information to SQL.LOG file, which was
generated by mmc.exe, when I was working with Enterprise Manager. For
instance, a double-click a database name or the server name would write about
330K to the file. Thus, I had to wait for about 40 seconds per click. It
happended only on my Windows 2000 Server (SP4). Other servers do not even
generate the file. The following is sample of information written to the file:
sqlstp 17c-840ENTER SQLAllocHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 00000000
SQLHANDLE * 00794460
Any idea about it? How to turn off it? Thanks.
I found a solution: Turning off ODBC tracing. It's the ODBC tracing that
writes trace to the file.
"Kathy" wrote:

> I noticed that mmc.exe wrote a lot of information to SQL.LOG file, which was
> generated by mmc.exe, when I was working with Enterprise Manager. For
> instance, a double-click a database name or the server name would write about
> 330K to the file. Thus, I had to wait for about 40 seconds per click. It
> happended only on my Windows 2000 Server (SP4). Other servers do not even
> generate the file. The following is sample of information written to the file:
> sqlstp 17c-840ENTER SQLAllocHandle
> SQLSMALLINT 1 <SQL_HANDLE_ENV>
> SQLHANDLE 00000000
> SQLHANDLE * 00794460
> Any idea about it? How to turn off it? Thanks.
>

mmc.exe writes a lot to SQL.LOG when working with Enterprise Manag

I noticed that mmc.exe wrote a lot of information to SQL.LOG file, which was
generated by mmc.exe, when I was working with Enterprise Manager. For
instance, a double-click a database name or the server name would write about
330K to the file. Thus, I had to wait for about 40 seconds per click. It
happended only on my Windows 2000 Server (SP4). Other servers do not even
generate the file. The following is sample of information written to the file:
sqlstp 17c-840 ENTER SQLAllocHandle
SQLSMALLINT 1 <SQL_HANDLE_ENV>
SQLHANDLE 00000000
SQLHANDLE * 00794460
Any idea about it? How to turn off it? Thanks.I found a solution: Turning off ODBC tracing. It's the ODBC tracing that
writes trace to the file.
"Kathy" wrote:
> I noticed that mmc.exe wrote a lot of information to SQL.LOG file, which was
> generated by mmc.exe, when I was working with Enterprise Manager. For
> instance, a double-click a database name or the server name would write about
> 330K to the file. Thus, I had to wait for about 40 seconds per click. It
> happended only on my Windows 2000 Server (SP4). Other servers do not even
> generate the file. The following is sample of information written to the file:
> sqlstp 17c-840 ENTER SQLAllocHandle
> SQLSMALLINT 1 <SQL_HANDLE_ENV>
> SQLHANDLE 00000000
> SQLHANDLE * 00794460
> Any idea about it? How to turn off it? Thanks.
>sql

MMC.EXE -Application Error

--Using SQL Server 2000 standard edition with SP3 on Windows 2000 Server
I am getting an error when I try to copy the data from a table to a text fil
e using a DTS Package. I am simply creating a connection to the database (s
ource) where the table exists and then creating another connection to the te
xt file (destination). The
properties of the text file are comma for the column delimiter, double quote
s for the text qualifers and first row contains column names. So after crea
ting the two connections I then create the 'Transform Data Task' (black arro
w going from the source to
the destination). I then go to the properties of the 'Transform Data Task'.
On the 'Source' tab I select the table I want to copy. I can preview the
data with no problems. I then click on the 'Destination' tab to define the
colmns. I click 'populate
from source' (it populates from the source) and then click 'execute'. This
is where the problem happens. It doesn't define the columns in the 'Destina
tion' tab. It is blank in the white space below. When I click the 'Define
Columns' button to try def
ine the columns again, I receive the following error in a pop up window:
In the Title Bar of the pop up window it says: MMC.EXE - Application Error
In the main part of the window it says: The instruction at 0x4173d23a" refe
renced memory at "0x01521e90". The memory could not be "written". Click on
OK to terminate the program
I click OK, and then it boots me out of Enterprise Manager.
In the 'disconnected edit' properties for the text file destination connecti
on, I have set the OLE DB Properties 'max characters per delimited column' f
rom 255 to 8000 to set if that is the problem since I have some columns that
are varchar 255. Still ge
t the same error.
I appreciate any help in advance to try resolving this problem.This error occurs when you apply SP3 or SP3a to your server. Article 814113
addresses this problem and then tells you to go to article 821277 for the p
atch downloads. You have to apply a cumulative security patch which creates
a problem with passwords o
n sql logins so you have to apply a small patch to fix that. I applied both
hotfixes in a test environment and it fixed the error. Hopefully it doesn'
t break anything else. Also, you have to apply these hotfixes to sql server
2000 with SP3 or SP3a and
also to workstations who are just running the client.
"IKE" wrote:

> --Using SQL Server 2000 standard edition with SP3 on Windows 2000 Server
> I am getting an error when I try to copy the data from a table to a text file usin
g a DTS Package. I am simply creating a connection to the database (source) where t
he table exists and then creating another connection to the text file (destination).
T
he properties of the text file are comma for the column delimiter, double qu
otes for the text qualifers and first row contains column names. So after c
reating the two connections I then create the 'Transform Data Task' (black a
rrow going from the source
to the destination). I then go to the properties of the 'Transform Data Tas
k'. On the 'Source' tab I select the table I want to copy. I can preview t
he data with no problems. I then click on the 'Destination' tab to define t
he colmns. I click 'popula
te from source' (it populates from the source) and then click 'execute'. Th
is is where the problem happens. It doesn't define the columns in the 'Dest
ination' tab. It is blank in the white space below. When I click the 'Defi
ne Columns' button to try d
efine the columns again, I receive the following error in a pop up window:
> In the Title Bar of the pop up window it says: MMC.EXE - Application Erro
r
> In the main part of the window it says: The instruction at 0x4173d23a" re
ferenced memory at "0x01521e90". The memory could not be "written". Click
on OK to terminate the program
> I click OK, and then it boots me out of Enterprise Manager.
> In the 'disconnected edit' properties for the text file destination connection, I
have set the OLE DB Properties 'max characters per delimited column' from 255 to 800
0 to set if that is the problem since I have some columns that are varchar 255. Sti
ll
get the same error.
> I appreciate any help in advance to try resolving this problem.
>
>

MMC.EXE -Application Error

--Using SQL Server 2000 standard edition with SP3 on Windows 2000 Server
I am getting an error when I try to copy the data from a table to a text file using a DTS Package. I am simply creating a connection to the database (source) where the table exists and then creating another connection to the text file (destination). The
properties of the text file are comma for the column delimiter, double quotes for the text qualifers and first row contains column names. So after creating the two connections I then create the 'Transform Data Task' (black arrow going from the source to
the destination). I then go to the properties of the 'Transform Data Task'. On the 'Source' tab I select the table I want to copy. I can preview the data with no problems. I then click on the 'Destination' tab to define the colmns. I click 'populate
from source' (it populates from the source) and then click 'execute'. This is where the problem happens. It doesn't define the columns in the 'Destination' tab. It is blank in the white space below. When I click the 'Define Columns' button to try def
ine the columns again, I receive the following error in a pop up window:
In the Title Bar of the pop up window it says: MMC.EXE - Application Error
In the main part of the window it says: The instruction at 0x4173d23a" referenced memory at "0x01521e90". The memory could not be "written". Click on OK to terminate the program
I click OK, and then it boots me out of Enterprise Manager.
In the 'disconnected edit' properties for the text file destination connection, I have set the OLE DB Properties 'max characters per delimited column' from 255 to 8000 to set if that is the problem since I have some columns that are varchar 255. Still ge
t the same error.
I appreciate any help in advance to try resolving this problem.
This error occurs when you apply SP3 or SP3a to your server. Article 814113 addresses this problem and then tells you to go to article 821277 for the patch downloads. You have to apply a cumulative security patch which creates a problem with passwords o
n sql logins so you have to apply a small patch to fix that. I applied both hotfixes in a test environment and it fixed the error. Hopefully it doesn't break anything else. Also, you have to apply these hotfixes to sql server 2000 with SP3 or SP3a and
also to workstations who are just running the client.
"IKE" wrote:

> --Using SQL Server 2000 standard edition with SP3 on Windows 2000 Server
> I am getting an error when I try to copy the data from a table to a text file using a DTS Package. I am simply creating a connection to the database (source) where the table exists and then creating another connection to the text file (destination). T
he properties of the text file are comma for the column delimiter, double quotes for the text qualifers and first row contains column names. So after creating the two connections I then create the 'Transform Data Task' (black arrow going from the source
to the destination). I then go to the properties of the 'Transform Data Task'. On the 'Source' tab I select the table I want to copy. I can preview the data with no problems. I then click on the 'Destination' tab to define the colmns. I click 'popula
te from source' (it populates from the source) and then click 'execute'. This is where the problem happens. It doesn't define the columns in the 'Destination' tab. It is blank in the white space below. When I click the 'Define Columns' button to try d
efine the columns again, I receive the following error in a pop up window:
> In the Title Bar of the pop up window it says: MMC.EXE - Application Error
> In the main part of the window it says: The instruction at 0x4173d23a" referenced memory at "0x01521e90". The memory could not be "written". Click on OK to terminate the program
> I click OK, and then it boots me out of Enterprise Manager.
> In the 'disconnected edit' properties for the text file destination connection, I have set the OLE DB Properties 'max characters per delimited column' from 255 to 8000 to set if that is the problem since I have some columns that are varchar 255. Still
get the same error.
> I appreciate any help in advance to try resolving this problem.
>
>

MMC SQL Server

Hello all,
I know this may be a basic question, and that the short answer is probably
"Yes"; but the File menu on the Computer Management console doesn't have an
Add or Remove Snap In choice. When I run MMC (from the run command), I get
a new/blank console, the Add or Remove Snap In choice is there, but there
are no snap-ins shown to choose from.
What I want is to manage sql servers on my network from the Computer
Management Console.
Can someone please help me do this?
TIA
Jake
Hi
Have you installed the client tools? The msc files should be in the
tools\binn directory!
Client tools are not available with MSDE!!!!
John
"GitarJake" <wiekiewatchee@.spamkiller.net> wrote in message
news:Z65Wc.47$4o.29@.fed1read01...
> Hello all,
> I know this may be a basic question, and that the short answer is probably
> "Yes"; but the File menu on the Computer Management console doesn't have
an
> Add or Remove Snap In choice. When I run MMC (from the run command), I
get
> a new/blank console, the Add or Remove Snap In choice is there, but there
> are no snap-ins shown to choose from.
> What I want is to manage sql servers on my network from the Computer
> Management Console.
> Can someone please help me do this?
> TIA
> Jake
>
>
|||Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:357881 microsoft.public.management.mmc:17348
Hi
Have you installed the client tools? The msc files should be in the
tools\binn directory!
Client tools are not available with MSDE!!!!
John
"GitarJake" <wiekiewatchee@.spamkiller.net> wrote in message
news:Z65Wc.47$4o.29@.fed1read01...
> Hello all,
> I know this may be a basic question, and that the short answer is probably
> "Yes"; but the File menu on the Computer Management console doesn't have
an
> Add or Remove Snap In choice. When I run MMC (from the run command), I
get
> a new/blank console, the Add or Remove Snap In choice is there, but there
> are no snap-ins shown to choose from.
> What I want is to manage sql servers on my network from the Computer
> Management Console.
> Can someone please help me do this?
> TIA
> Jake
>
>
sql

MMC SQL Server

Hello all,

I know this may be a basic question, and that the short answer is probably
"Yes"; but the File menu on the Computer Management console doesn't have an
Add or Remove Snap In choice. When I run MMC (from the run command), I get
a new/blank console, the Add or Remove Snap In choice is there, but there
are no snap-ins shown to choose from.

What I want is to manage sql servers on my network from the Computer
Management Console.

Can someone please help me do this?

TIA

JakeHi

Have you installed the client tools? The msc files should be in the
tools\binn directory!
Client tools are not available with MSDE!!!!

John

"GitarJake" <wiekiewatchee@.spamkiller.net> wrote in message
news:Z65Wc.47$4o.29@.fed1read01...
> Hello all,
> I know this may be a basic question, and that the short answer is probably
> "Yes"; but the File menu on the Computer Management console doesn't have
an
> Add or Remove Snap In choice. When I run MMC (from the run command), I
get
> a new/blank console, the Add or Remove Snap In choice is there, but there
> are no snap-ins shown to choose from.
> What I want is to manage sql servers on my network from the Computer
> Management Console.
> Can someone please help me do this?
> TIA
> Jake
>|||Hi

Have you installed the client tools? The msc files should be in the
tools\binn directory!
Client tools are not available with MSDE!!!!

John

"GitarJake" <wiekiewatchee@.spamkiller.net> wrote in message
news:Z65Wc.47$4o.29@.fed1read01...
> Hello all,
> I know this may be a basic question, and that the short answer is probably
> "Yes"; but the File menu on the Computer Management console doesn't have
an
> Add or Remove Snap In choice. When I run MMC (from the run command), I
get
> a new/blank console, the Add or Remove Snap In choice is there, but there
> are no snap-ins shown to choose from.
> What I want is to manage sql servers on my network from the Computer
> Management Console.
> Can someone please help me do this?
> TIA
> Jake
>

MMC SQL Server

Hello all,
I know this may be a basic question, and that the short answer is probably
"Yes"; but the File menu on the Computer Management console doesn't have an
Add or Remove Snap In choice. When I run MMC (from the run command), I get
a new/blank console, the Add or Remove Snap In choice is there, but there
are no snap-ins shown to choose from.
What I want is to manage sql servers on my network from the Computer
Management Console.
Can someone please help me do this?
TIA
JakeHi
Have you installed the client tools? The msc files should be in the
tools\binn directory!
Client tools are not available with MSDE!!!!
John
"GitarJake" <wiekiewatchee@.spamkiller.net> wrote in message
news:Z65Wc.47$4o.29@.fed1read01...
> Hello all,
> I know this may be a basic question, and that the short answer is probably
> "Yes"; but the File menu on the Computer Management console doesn't have
an
> Add or Remove Snap In choice. When I run MMC (from the run command), I
get
> a new/blank console, the Add or Remove Snap In choice is there, but there
> are no snap-ins shown to choose from.
> What I want is to manage sql servers on my network from the Computer
> Management Console.
> Can someone please help me do this?
> TIA
> Jake
>
>|||Hi
Have you installed the client tools? The msc files should be in the
tools\binn directory!
Client tools are not available with MSDE!!!!
John
"GitarJake" <wiekiewatchee@.spamkiller.net> wrote in message
news:Z65Wc.47$4o.29@.fed1read01...
> Hello all,
> I know this may be a basic question, and that the short answer is probably
> "Yes"; but the File menu on the Computer Management console doesn't have
an
> Add or Remove Snap In choice. When I run MMC (from the run command), I
get
> a new/blank console, the Add or Remove Snap In choice is there, but there
> are no snap-ins shown to choose from.
> What I want is to manage sql servers on my network from the Computer
> Management Console.
> Can someone please help me do this?
> TIA
> Jake
>
>

MMC SQL Server

Hello all,
I know this may be a basic question, and that the short answer is probably
"Yes"; but the File menu on the Computer Management console doesn't have an
Add or Remove Snap In choice. When I run MMC (from the run command), I get
a new/blank console, the Add or Remove Snap In choice is there, but there
are no snap-ins shown to choose from.
What I want is to manage sql servers on my network from the Computer
Management Console.
Can someone please help me do this?
TIA
JakeHi
Have you installed the client tools? The msc files should be in the
tools\binn directory!
Client tools are not available with MSDE!!!!
John
"GitarJake" <wiekiewatchee@.spamkiller.net> wrote in message
news:Z65Wc.47$4o.29@.fed1read01...
> Hello all,
> I know this may be a basic question, and that the short answer is probably
> "Yes"; but the File menu on the Computer Management console doesn't have
an
> Add or Remove Snap In choice. When I run MMC (from the run command), I
get
> a new/blank console, the Add or Remove Snap In choice is there, but there
> are no snap-ins shown to choose from.
> What I want is to manage sql servers on my network from the Computer
> Management Console.
> Can someone please help me do this?
> TIA
> Jake
>
>|||Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:357881 microsof
t.public.management.mmc:17348
Hi
Have you installed the client tools? The msc files should be in the
tools\binn directory!
Client tools are not available with MSDE!!!!
John
"GitarJake" <wiekiewatchee@.spamkiller.net> wrote in message
news:Z65Wc.47$4o.29@.fed1read01...
> Hello all,
> I know this may be a basic question, and that the short answer is probably
> "Yes"; but the File menu on the Computer Management console doesn't have
an
> Add or Remove Snap In choice. When I run MMC (from the run command), I
get
> a new/blank console, the Add or Remove Snap In choice is there, but there
> are no snap-ins shown to choose from.
> What I want is to manage sql servers on my network from the Computer
> Management Console.
> Can someone please help me do this?
> TIA
> Jake
>
>

MMC Can't open SQL Server Enterprise Manager.msc

Hi All,
I'm using XP Pro, and Windows SQL Server 2000 SP3a, and I'm getting the
error:
MMC cannot open the file c:\Program Files\Microsoft SQL
Server\80\Tools\Binn\SQL Server Enterprise Manager.msc. This may be because
the files does not exist, is not an MMC console, or was created by a later
version of MMC. This may also be because you do not have sufficied access
rights to the file.
...when trying to run Enterprise Manager. I have tried re-installing the
server and client tools, and SP3a, but still the same error.
I have administrator access to the PC, but strangely, I can run enterprise
manager if logged on as the local administrator. I can also run SQL Server
Enterprise Manager.msc if I rename it to anything else, and it seems to work
all right.
Shall I just carry on using the new SQL Server Enterprise Manager 2? It
seems like a very odd issue.
Thanks in advance.
RyanRyan,
Can you rename it to SQLEM.msc? Does that work? Then just create a
shortcut on your desktop or Start Menu, and all should be well.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Ryan Breakspear wrote:
> Hi All,
> I'm using XP Pro, and Windows SQL Server 2000 SP3a, and I'm getting the
> error:
> MMC cannot open the file c:\Program Files\Microsoft SQL
> Server\80\Tools\Binn\SQL Server Enterprise Manager.msc. This may be becau
se
> the files does not exist, is not an MMC console, or was created by a later
> version of MMC. This may also be because you do not have sufficied access
> rights to the file.
> ...when trying to run Enterprise Manager. I have tried re-installing the
> server and client tools, and SP3a, but still the same error.
> I have administrator access to the PC, but strangely, I can run enterprise
> manager if logged on as the local administrator. I can also run SQL Serve
r
> Enterprise Manager.msc if I rename it to anything else, and it seems to wo
rk
> all right.
> Shall I just carry on using the new SQL Server Enterprise Manager 2? It
> seems like a very odd issue.
> Thanks in advance.
> Ryan
>|||Yep, I can rename it to anything. I can run it fine renamed as something
else, I just wondered why the problem, and if there was a solution.
Thanks for your reply.
Ryan
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:edplxoLcEHA.1248@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Ryan,
> Can you rename it to SQLEM.msc? Does that work? Then just create a
> shortcut on your desktop or Start Menu, and all should be well.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Ryan Breakspear wrote:
because[vbcol=seagreen]
later[vbcol=seagreen]
access[vbcol=seagreen]
the[vbcol=seagreen]
enterprise[vbcol=seagreen]
Server[vbcol=seagreen]
work[vbcol=seagreen]|||I have the exact same settings, and the exact same problem. Wish I had
found this workaround before re-installing everything... Still would
like to know what is causing this though...
Cheers - Craig
Ryan Breakspear wrote:
> *Hi All,
> I'm using XP Pro, and Windows SQL Server 2000 SP3a, and I'm getting
> the
> error:
> MMC cannot open the file c:\Program Files\Microsoft SQL
> Server\80\Tools\Binn\SQL Server Enterprise Manager.msc. This may be
> because
> the files does not exist, is not an MMC console, or was created by a
> later
> version of MMC. This may also be because you do not have sufficied
> access
> rights to the file.
> ....when trying to run Enterprise Manager. I have tried
> re-installing the
> server and client tools, and SP3a, but still the same error.
> I have administrator access to the PC, but strangely, I can run
> enterprise
> manager if logged on as the local administrator. I can also run SQL
> Server
> Enterprise Manager.msc if I rename it to anything else, and it seems
> to work
> all right.
> Shall I just carry on using the new SQL Server Enterprise Manager 2?
> It
> seems like a very odd issue.
> Thanks in advance.
> Ryan *
cjeff
---
Posted via http://www.mcse.ms
---
View this thread: http://www.mcse.ms/message888314.html|||I have been trying to fix this problem for some time. The fact that it
worked for you when you renamed it tipped me off to the source of the
problem. There is a cached version of the MMC file in the C:\Documents and
Settings\<username>\Application Data\Microsoft\MMC folder.
The problem is that on my system that cached file was corrupted.
Once I deleted the cached file, I was able to open SQL EntMgr with no proble
m.
"cjeff" wrote:

> I have the exact same settings, and the exact same problem. Wish I had
> found this workaround before re-installing everything... Still would
> like to know what is causing this though...
> Cheers - Craig
> Ryan Breakspear wrote:
>
> --
> cjeff
> ---
> Posted via http://www.mcse.ms
> ---
> View this thread: http://www.mcse.ms/message888314.html
>

Wednesday, March 21, 2012

MMC Can't open SQL Server Enterprise Manager.msc

Hi All,
I'm using XP Pro, and Windows SQL Server 2000 SP3a, and I'm getting the
error:
MMC cannot open the file c:\Program Files\Microsoft SQL
Server\80\Tools\Binn\SQL Server Enterprise Manager.msc. This may be because
the files does not exist, is not an MMC console, or was created by a later
version of MMC. This may also be because you do not have sufficied access
rights to the file.
...when trying to run Enterprise Manager. I have tried re-installing the
server and client tools, and SP3a, but still the same error.
I have administrator access to the PC, but strangely, I can run enterprise
manager if logged on as the local administrator. I can also run SQL Server
Enterprise Manager.msc if I rename it to anything else, and it seems to work
all right.
Shall I just carry on using the new SQL Server Enterprise Manager 2? It
seems like a very odd issue.
Thanks in advance.
Ryan
Ryan,
Can you rename it to SQLEM.msc? Does that work? Then just create a
shortcut on your desktop or Start Menu, and all should be well.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Ryan Breakspear wrote:
> Hi All,
> I'm using XP Pro, and Windows SQL Server 2000 SP3a, and I'm getting the
> error:
> MMC cannot open the file c:\Program Files\Microsoft SQL
> Server\80\Tools\Binn\SQL Server Enterprise Manager.msc. This may be because
> the files does not exist, is not an MMC console, or was created by a later
> version of MMC. This may also be because you do not have sufficied access
> rights to the file.
> ...when trying to run Enterprise Manager. I have tried re-installing the
> server and client tools, and SP3a, but still the same error.
> I have administrator access to the PC, but strangely, I can run enterprise
> manager if logged on as the local administrator. I can also run SQL Server
> Enterprise Manager.msc if I rename it to anything else, and it seems to work
> all right.
> Shall I just carry on using the new SQL Server Enterprise Manager 2? It
> seems like a very odd issue.
> Thanks in advance.
> Ryan
>
|||Yep, I can rename it to anything. I can run it fine renamed as something
else, I just wondered why the problem, and if there was a solution.
Thanks for your reply.
Ryan
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:edplxoLcEHA.1248@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Ryan,
> Can you rename it to SQLEM.msc? Does that work? Then just create a
> shortcut on your desktop or Start Menu, and all should be well.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> Ryan Breakspear wrote:
because[vbcol=seagreen]
later[vbcol=seagreen]
access[vbcol=seagreen]
the[vbcol=seagreen]
enterprise[vbcol=seagreen]
Server[vbcol=seagreen]
work[vbcol=seagreen]
|||I have the exact same settings, and the exact same problem. Wish I had found this workaround before re-installing everything... Still would like to know what is causing this though...
Cheers - Craig

Quote:

Originally posted by Ryan Breakspear
Hi All,
I'm using XP Pro, and Windows SQL Server 2000 SP3a, and I'm getting the
error:
MMC cannot open the file c:\Program Files\Microsoft SQL
Server\80\Tools\Binn\SQL Server Enterprise Manager.msc. This may be because
the files does not exist, is not an MMC console, or was created by a later
version of MMC. This may also be because you do not have sufficied access
rights to the file.
....when trying to run Enterprise Manager. I have tried re-installing the
server and client tools, and SP3a, but still the same error.
I have administrator access to the PC, but strangely, I can run enterprise
manager if logged on as the local administrator. I can also run SQL Server
Enterprise Manager.msc if I rename it to anything else, and it seems to work
all right.
Shall I just carry on using the new SQL Server Enterprise Manager 2? It
seems like a very odd issue.
Thanks in advance.
Ryan

|||I have been trying to fix this problem for some time. The fact that it
worked for you when you renamed it tipped me off to the source of the
problem. There is a cached version of the MMC file in the C:\Documents and
Settings\<username>\Application Data\Microsoft\MMC folder.
The problem is that on my system that cached file was corrupted.
Once I deleted the cached file, I was able to open SQL EntMgr with no problem.
"cjeff" wrote:

> I have the exact same settings, and the exact same problem. Wish I had
> found this workaround before re-installing everything... Still would
> like to know what is causing this though...
> Cheers - Craig
> Ryan Breakspear wrote:
>
> --
> cjeff
> Posted via http://www.mcse.ms
> View this thread: http://www.mcse.ms/message888314.html
>