Tsql import from xml to table - sql server 2012 = (o row(s) affected)
Hello,
here is my XML header and footer:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<streetAndCities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<record>
<rowIndex></rowIndex>
<cityCode></cityCode>
<cityName></cityName>
<streetCode></streetCode>
<streetName></streetName>
</record>
</streetAndCities>
with a bunch of <record></record> tags with data inside....
I'm trying to import data from my XML file to my new and empty table with the following code:
DECLARE @xml XML
SELECT @xml = x.y
FROM OPENROWSET( BULK 'c:\st.xml', SINGLE_CLOB ) x(y)
INSERT INTO tblCitiesStreets(rowIndex, cityCode, cityName, streetCode, streetName)
SELECT
x.y.value('(Column[@Name="rowIndex"]/text())[1]', 'INT') rowIndex,
x.y.value('(Column[@Name="cityCode"]/text())[1]', 'NVARCHAR(255)') cityCode,
x.y.value('(Column[@Name="cityName"]/text())[1]', 'NVARCHAR(255)') cityName,
x.y.value('(Column[@Name="streetCode"]/text())[1]', 'NVARCHAR(255)') streetCode,
x.y.value('(Column[@Name="streetName"]/text())[1]', 'NVARCHAR(255)') streetName
FROM @xml.nodes('Root/DataRow') AS x(y)
but the output I get is
(0 row(s) affected)
and of course when I select * from tblCitiesStreets, the table is empty.
what is wrong with the code?
regards
Nothing's wrong with your code. You're working with the wrong file OR - I guess - you have copied those XPath expressions without further looking at them..
This works with your XML:
DECLARE @xml XML = N'
<streetAndCities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<record>
<rowIndex>1</rowIndex>
<cityCode>2</cityCode>
<cityName>3</cityName>
<streetCode>4</streetCode>
<streetName>5</streetName>
</record>
</streetAndCities>';
SELECT Record.value('rowIndex[1]', 'INT') rowIndex ,
Record.value('cityCode[1]', 'NVARCHAR(255)') cityCode ,
Record.value('cityName[1]', 'NVARCHAR(255)') cityName ,
Record.value('streetCode[1]', 'NVARCHAR(255)') streetCode ,
Record.value('streetName[1]', 'NVARCHAR(255)') streetName
FROM @xml.nodes('streetAndCities/record') AS StreetsAndCities ( Record );
Similar Messages
-
Bacpac import from Windows Azure into sql server 2012 fails
Very sorry if this is posted in the wrong froum I was not sure where to post
I am trying to verify a bacpac file I downloaded from my windows azure sql instance and I am getting this error when trying to Import into SQl server express 2012. SQL server 2008r2 is also installed on this machine. How can I fix this?
Count not load schema model from package. (Microsoft.SqlServer.Dac)
Program Location:
at Microsoft.SqlServer.Dac.DacPackage.LoadModel(IPackageSource packageSource)
at Microsoft.SqlServer.Dac.Extensions.DacExtensions.GetCollationString(IPackageSource packageSource)
at Microsoft.SqlServer.Dac.Extensions.DacExtensions.GetCollationString(BacPackage package)
at Microsoft.SqlServer.Management.Dac.DacWizard.CreateDatabaseOnTargetWorkItem.DoWork()
at Microsoft.SqlServer.Management.TaskForms.SimpleWorkItem.Run()
===================================
Internal Error. The internal target platform type SqlAzureDatabaseSchemaProvider does not support schema file version '2.5'. (File: G:\Fbasic8-2014-2-2-12-10.bacpac) (Microsoft.Data.Tools.Schema.Sql)
Program Location:
at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.UpgradeSchema(ExtensionManager em, String originalSchemaVersion, XmlReader originalSchemaReader, String source)
at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.DeserializeXml(TextReader input, ErrorManager errors, String source, Action`3 constructorParametersSetter)
at Microsoft.Data.Tools.Schema.SchemaModel.DataSchemaModel.DeserializePackage(SqlPackage package, ErrorManager errors, Action`3 constructorParametersSetter)
at Microsoft.SqlServer.Dac.DacPackage.LoadModel(IPackageSource packageSource)
Jon StrohHello,
Just as Mike post above, the issue may occurs as the previous SSDT releases are not compatible with this new version of DACFX.
You can refer to the following blog about this issue and download the latest release of SSDT from
here.
Reference:http://blogs.msdn.com/b/ssdt/archive/2012/10/10/ssdt-amp-dacfx-october-2012-compatibility-notes.aspx
Regards,
Fanny Liu
Fanny Liu
TechNet Community Support -
Comments not imported from Data Dictionary of SQL Server. SDDM 3.3.0.747
Hi,
SDDM 3.3.0.747 32-bit on Windows 7 64-bit.
Comments are not imported from Data Dictionary of SQL Server 2008. Connection through Microsoft JDBC Driver 4.0 for SQL Server or jTDS 1.2.7
What I have tried? In SDDM DDL generation, Comments in DBRMS for SQL Server are generated with "EXEC sp_addextendedproperty 'MS_Description' , 'Test Comment' ..." so I added extended property named "MS_Description" into SQL Server database, both on table and column. None of them were imported from Data Dictionary into SSDM. I have tried both drivers stated above. Is it a bug or am I missing something?
I've found similar question thread Re: Data dictionary import doesn't import column comments for SDDM 3.0.0.665, so I guess it is a bug when importing with JDBC drivers.
MiGli
Edited by: MiGli_1006342 on May 25, 2013 8:32 AM
Edited by: MiGli_1006342 on May 25, 2013 9:02 AMExtended properties were not imported correctly from SQLServer databases at DM 3.3.0.747.
Calls to sp_addextendedproperty and fn_listextendedproperty have been modified.
I don't think it is a problem with JDBC drivers.
A bug fix should be available in the next release of DM. -
Ssis - import data from flat file to table (sql server 2012)
i have create a ssis for importing data from flat file to table in sql server 2012.
but i got the below error for some column in data flow task.
error: cannot processed because than one code page (950 and 1252)
anyone helps~Hi,
The issue occurs because the source flat file uses ANSI/OEM – Tranditional Chinese Big5 encoding. When processing the source file, the flat file connection manager uses code page 950 for the columns. Because SQL Server uses code page to perform conversions
between non-Unicode data and Unicode data, the data in the code page 950 based input columns cannot be loaded to code page 1252 based destination columns. To resolve the issue, you need to load the data into a SQL Server destination table that includes Unicode
columns (nchar or nvarchar), and convert the input columns to Unicode columns via Data Conversion or the Advanced Editor for the Flat File Source at the same time.
Another option that may not be that practical is to create a new database based on the Chinese_Taiwan_Stroke_BIN collation, and load the data to non-Unicode columns directly.
Reference:
http://social.technet.microsoft.com/Forums/windows/en-US/f939e3ba-a47e-43b9-88c3-c94bdfb7da58/forum-faq-how-to-fix-the-error-the-column-xx-cannot-be-processed-because-more-than-one-code-page?forum=sqlintegrationservices
Regards,
Mike Yin
TechNet Community Support -
Hi all,
I used the following code to create a new Database (ScottChangDB) and a new Table (marvel) in my SQL Server 2012 Management Studio (SSMS2012) successfully:
-- ScottChangDB.sql saved in C://Documents/SQL Server XQuery_MacLochlainns Weblog_code
-- 14 April 2015 09:15 AM
USE master
IF EXISTS
(SELECT 1
FROM sys.databases
WHERE name = 'ScottChangDB')
DROP DATABASE ScottChangDB
GO
CREATE DATABASE ScottChangDB
GO
USE ScottChangDB
CREATE TABLE [dbo].[marvel] (
[avenger_name] [char] (30) NULL, [ID] INT NULL)
INSERT INTO marvel
(avenger_name,ID)
VALUES
('Hulk', 1),
('Iron Man', 2),
('Black Widow', 3),
('Thor', 4),
('Captain America', 5),
('Hawkeye', 6),
('Winter Soldier', 7),
('Iron Patriot', 8);
SELECT avenger_name FROM marvel ORDER BY ID For XML PATH('')
DECLARE @x XML
SELECT @x=(SELECT avenger_name FROM marvel ORDER BY ID FOR XML PATH('Marvel'))--,ROOT('root'))
SELECT
person.value('Marvel[4]', 'varchar(100)') AS NAME
FROM @x.nodes('.') AS Tbl(person)
ORDER BY NAME DESC
--Or if you want the completed element
SELECT @x.query('/Marvel[4]/avenger_name')
DROP TABLE [marvel]
Now I am trying to create my first XML Schema Collection to do the Validation on the Field Name (Column Title) of the "marvel" Table. I have studied Chapter 4 XML SCHEMA COLLECTIONS of the book "Pro SQL Server 2008 XML" written by
Michael Coles (published by Apress) and some beginning pages of XQuery Language Reference, SQL Server 2012 Books ONline (published by Microsoft). I mimicked Coles' Listing 04-05 and I wanted to execute the following first-drafted sql in
my SSMS2012:
-- Reference [Scott Chang modified Listing04-05.sql of Pro SQL Server 2008 XML by Michael Coles (Apress)]
-- [shcColes04-05.sql saved in C:\\Documents\XML_SQL_Server2008_code_Coles_Apress]
-- [executed: 2 April 2015 15:04 PM]
-- shcXMLschemaTableValidate1.sql in ScottChangDB of SQL Server 2012 Management Studio (SSMS2012)
-- saved in C:\Documents\XQuery-SQLServer2012
tried to run: 15 April 2015 ??? AM
USE ScottChangDB;
GO
CREATE XML SCHEMA COLLECTION dbo. ComplexTestSchemaCollection_all
AS
N'<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="marvel">
<xsd:complexType>
<xsd:all>
<xsd:element name="avenger_name" />
<xsd:element name="ID" />
</xsd:all>
</xsd:complexType>
</xsd:element>
</xsd:schema>';
GO
DECLARE @x XML (dbo. ComplexTestSchemaCollection_all);
SET @x = N'<?xml version="1.0"?>
<marvel>
<avenger_name>Thor</name>
<ID>4</ID>
</marvel>';
SELECT @x;
GO
DROP XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_all;
GO
I feel that drafted sql is very shaky and it needs the SQL Server XML experts to modify to make it work for me. Please kindly help, exam the coding of my shcXMLTableValidate1.sql and modify it to work.
Thanks in advance,
Scott ChangHi Scott,
2) Yes, FOR XML PATH clause converts relational data to XML format with a specific structure for the "marvel" Table. Regarding validate all the avenger_names, please see below
sample.
DECLARE @x XML
SELECT @x=(SELECT ID ,avenger_name FROM marvel FOR XML PATH('Marvel'))
SELECT @x
SELECT
n.value('avenger_name[1]','VARCHAR(99)') avenger_name,
n.value('ID[1]','INT') ID
FROM @x.nodes('//Marvel') Tab(n)
WHERE n.value('ID[1]','INT') = 1 -- specify the ID here
--FOR XML PATH('Marvel') --uncommented this line if you want the result as element type
3)i.check the xml schema content
--find xml schema collection
SELECT ss.name,xsc.name collection_name FROM sys.xml_schema_collections xsc JOIN sys.schemas ss ON xsc.schema_id= ss.schema_id
select * from sys.schemas
--check the schema content,use the name,collection_name from the above query
SELECT xml_schema_namespace(N'name',N'collection_name')
3)ii. View can be viewed as virtual table. Use a view to list the XML schema content.
CREATE VIEW XSDContentView
AS
SELECT ss.name,xsc.name collection_name,cat.content
FROM sys.xml_schema_collections xsc JOIN sys.schemas ss ON xsc.schema_id= ss.schema_id
CROSS APPLY(
SELECT xml_schema_namespace(ss.name,xsc.name) AS content
) AS cat
WHERE xsc.name<>'sys'
GO
SELECT * FROM XSDContentView
By the way, it would be appreciated if you can spread your questions into posts. For any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Importing English Wikipedia dump (large .xml file) into SQL server 2012
Hi there,
I've downloaded the latest English Wikipedia dump (enwiki-latest-pages-articles.xml),
and I'm trying to import it to SQL server 2012 by using XML Bulk Load. This is the VBScript
code I've used:
Dim objBL
Set objBL = CreateObject("SQLXMLBulkLoad.SQLXMLBulkload.4.0")
objBL.ConnectionString = "provider=SQLOLEDB;data source=localhost;database=tempdb;integrated security=SSPI"
objBL.ErrorLogFile = "error.log"
objBL.CheckConstraints=true
objBL.XMLFragment = True
objBL.SchemaGen = True
objBL.SGDropTables = True
objBL.Execute "export-0.8.xml", "enwiki-latest-pages-articles.xml"
Set objBL = Nothing
This VBScript should generate the tables and load the Wikipedia XML file into them. The VBScript code also uses the wikimedia
XSD schema. However, I'm getting this error:
Any help with this problem would be appropriate!Why not try looking at this:
http://technet.microsoft.com/en-us/library/ms191184.aspx
If this is helpful please mark it so. Also if this solved your problem mark as answer. -
Import data from Informix DB to SQL Server 2012
I am trying to use the SSIS Import and Export Wizard in SQL Server Data Tools to migrate an Informix database to SQL Server 2012. I go through the steps & when I hit Finish I get an error message that says:
TITLE: SQL Server Import and Export Wizard
Could not connect source component.
Error 0xc0047062: Source - material [1]: System.Data.Odbc.OdbcException (0x80131937): ERROR [42000] [Informix][Informix ODBC Driver][Informix]A syntax error has occurred.
at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Odbc.OdbcCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.ReinitializeMetaData()
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostReinitializeMetaData(IDTSManagedComponentWrapper100 wrapper)
ADDITIONAL INFORMATION:
ERROR [42000] [Informix][Informix ODBC Driver][Informix]A syntax error has occurred. (iclit09b.dll)
BUTTONS:
OK
I am getting this error when I use the "Copy data from one or more tables or views" option. I am able to migrate a single table with no problem when I use the "Write a query to specify the data to transfer"
option. This is my first time using SSIS so I am not sure what to do. Can anyone help me out? Thanks...The following link explains the steps/processes requires to perform this in SSIS:
http://davidbridge.wordpress.com/2012/05/30/extraction-from-informix-database-using-ssis-data-warehouse-etl/
Thanks, hsbal -
Hi all,
I learmed the basic stuff of XML, DTD, DOM, etc. long time ago. Now, I came back to resume my XML journey and try to learn the XML Schemas, XPath and XQuery. I have Microsoft SQL Server 2012 Management Studio (SSMS2012) in our computer network. From
Page 221 of the old Book "Beginning XML 2nd Edition" written by David Hunter, et.al., (published by Wrox), I copied the name5.xsd and name5.xml :
<?xml version="1.0"?>
<schema xmlns=http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.wrox.com/name" xmlns:target="http://www.wrox.com/name"
elementFormDefault="qualified">
<element name="name">
<complexType>
<sequence>
<element name="first" type="string"/>
<element name="middle" type="string"/>
<element name="last" type="string"/>
</sequence>
</complexType>
</element>
</schema>
<?xml version="1.0"?>
<name
xmlns=http://www.wrox.com/name"
xmlns:xsi="http://www.wrox.org/2001XMLSchema-instance"
xsi:schemaLocation="http://www.wrox.com/name name5.xsd"
title="Mr.">
<first>John</first>
<middle>Frizgerald</middle>
<last>Doe</last>
</name>
How can I execute these two files in my SSMS2012 for doing my first XML Schema trial?
Please kindly help, advise and respond.
Thanks in advance,
Scott ChangHi Eric Zhang, Thanks for your nice response.
1) I saw the CREATE XML SCHEMA COLLECTION (Transact-SQL) and tried its first example "Create XML schema collection in the database" in my SQL Server 2012 Management Studio (SSMS2012):
-- Create a sample database in which to load the XML schema collection.
-- Copied this set of code stsments from Microsoft Library (ms176009)
-- ColesMS12_20a.sql (saved in C:/Documents/SQL Server Management Studio)
-- 19 March 2015 1145 AM
CREATE DATABASE SampleDB
GO
USE SampleDB
GO
CREATE XML SCHEMA COLLECTION ManuInstructionsSchemaCollection AS
N'<?xml version="1.0" encoding="UTF-16"?>
<xsd:schema targetNamespace="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
xmlns ="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:complexType name="StepType" mixed="true" >
<xsd:choice minOccurs="0" maxOccurs="unbounded" >
<xsd:element name="tool" type="xsd:string" />
<xsd:element name="material" type="xsd:string" />
<xsd:element name="blueprint" type="xsd:string" />
<xsd:element name="specs" type="xsd:string" />
<xsd:element name="diag" type="xsd:string" />
</xsd:choice>
</xsd:complexType>
<xsd:element name="root">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element name="Location" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType mixed="true">
<xsd:sequence>
<xsd:element name="step" type="StepType" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="LocationID" type="xsd:integer" use="required"/>
<xsd:attribute name="SetupHours" type="xsd:decimal" use="optional"/>
<xsd:attribute name="MachineHours" type="xsd:decimal" use="optional"/>
<xsd:attribute name="LaborHours" type="xsd:decimal" use="optional"/>
<xsd:attribute name="LotSize" type="xsd:decimal" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>' ;
GO
-- Verify - list of collections in the database.
select *
from sys.xml_schema_collections
-- Verify - list of namespaces in the database.
select name
from sys.xml_schema_namespaces
-- Use it. Create a typed xml variable. Note collection name specified.
DECLARE @x xml (ManuInstructionsSchemaCollection)
GO
--Or create a typed xml column.
CREATE TABLE T (
i int primary key,
x xml (ManuInstructionsSchemaCollection))
GO
-- ////The following code statements are not used in order to create SampleDB
-- Clean up
---DROP TABLE T
---GO
---DROP XML SCHEMA COLLECTION ManuInstructionsSchemaCollection
---Go
---USE Master
---GO
---DROP DATABASE SampleDB
It worked and I got the following results:
1 4 NULL sys 2009-04-13 12:59:13.390 2012-02-10 20:16:02.097
65536 1 NULL ManuInstructionsSchemaCollection 2015-03-19 11:47:17.660 2015-03-19 11:47:17.660
http://www.w3.org/2001/XMLSchema
http://schemas.microsoft.com/sqlserver/2004/sqltypes
http://www.w3.org/XML/1998/namespace
http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions
But, I don't undertand (i) what SCHEMA COECTION is, (ii) what <xsd:schema targetNamespace=.....</xsd:complexType> are, (iii) How I can specify my "project specific" schema in the Microsoft SCHEMA COLLECTION to check my xml file.
2) I dived in the XQuery programmimng in SSMS2012 in the last few weeks. I used the examles of Ad-Hoc XML File Query by Seth Delconte (in
httpS://www.simple-talk.com/content/print.aspx?article=1756) in my SSMS2012. They worked. But I don't understand the (i) Importing XML data using a function, (ii) Using the XQuery contans()
function to find substrings, (iii)Efficiency comparisons in the article.
Please kindly help me in enlightening me to resolve the difficulties listed in 1) and 2).
Thanks,
Scott Chang -
Hi all,
I just got a copy of the book "Pro SQL Server 2008 XML" written by Michael Coles (published by Apress) and try to learn the XML Schema Collection in my SQL Server 2012 Management Studio (SSMS2012). I studied Chapter 4 XML Collection of the book
and executed the following code of Listing 4-8 Complex Schema with Attribute:
-- Pro SQL Server 2008 XML by Michael Coles (Apress)
-- Listing04-08.sql Complex XML Schema with Attribute
-- shcColes04-08.sql saved in C:\\Documents\XML_SQL_Server2008_code_Coles_Apress
-- 6 April 2015 8:00 PM
CREATE XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute
AS
N'<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="item">
<xs:complexType>
<xs:sequence>
<xs:element name="name" />
<xs:element name="color" />
<xs:group ref="id-price" />
<xs:group ref="size-group" />
</xs:sequence>
<xs:attribute name="id" />
<xs:attribute name="number" />
</xs:complexType>
</xs:element>
<xs:group name="id-price">
<xs:choice>
<xs:element name="list-price" />
<xs:element name="standard-cost" />
</xs:choice>
</xs:group>
<xs:group name="size-group">
<xs:sequence>
<xs:element name="size" />
<xs:element name="unit-of-measure" />
</xs:sequence>
</xs:group>
</xs:schema>';
GO
DECLARE @x XML (dbo.ComplexTestSchemaCollection_attribute);
SET @x = N'<?xml version="1.0"?>
<item id="749" number="BK-R93R-62">
<name>Road-150 Red, 62</name>
<color>Red</color>
<list-price>3578.27</list-price>
<size>62</size>
<unit-of-measure>CM</unit-of-measure>
</item>';
SELECT @x;
GO
DROP XML SCHEMA COLLECTION dbo.ComplexTestSchemaCollection_attribute;
It worked nicely. But, I just found out the coding that was downloaded from the website of Apress and I just executed was different from the coding of Listing 4-8 listed in the book: all the <xs: ....> and </xs: ..> in my SSMS2012 are
listed as <xsd:...> and </xsd:...> respectively in the book!!?? The same thing happens in the Listing 4-3 Simple XML Schema, Listing 4-5 XML Schema and Valid XML Document with Comple Type Definition, Listion 4-6 XML Schema and XML
Document Document with Complex Type Using <sequence> and <choice>, and Listing 4-7 Complex XML Schema and XML Document with Model Group Definition (I executed last week) too. I wonder: should xs or xsd be used in the XML
Schema Collection of SSMS2012? Please kindly help, clarify this matter and explain the diffirence of using xs and xsd for me.
Thanks in advance,
Scott ChangHi Scott,
Using xs or xsd depends on how you declare the namespace prefix.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="item">
I've posted a very good link in your last question, just in case you might have missed it, please see the below link.
Understanding XML Namespaces
In an XML document we use a namespace prefix to qualify the local names of both elements and attributes . A prefix is really just an abbreviation for the namespace identifier (URI), which is typically quite long. The prefix is first mapped to a namespace
identifier through a namespace declaration. The syntax for a namespace declaration is:
xmlns:<prefix>='<namespace identifier>'
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
Copy diagram to clipboard for sql server 2012 the row did not appear when paste in paint
hello,
i've been trying to create database diagram on my database on sql server 2012 platform. i can create the diagram, but when copy it to clipboard and try to paste it on paint, only the tables name appear without all the columns name. any idea how can i paste
it to have information for both tables name and columns name as well.i've no issue creating diagram and paste on paint for my sql server 2008.
Thanks in advance.
kneeahHi kneeah,
According to your description, SQL 2012 database diagram is not printed correctly and several of column names are missed. There are some suggestions for troubleshooting this issue, you can refer to the following steps.
1. We recommend you can copy database diagram to Word and check if it will print correctly.
2. When printing database diagrams, several of the tables contain large grey squares instead of the column names. We recommend switch Windows XP computer from Classic theme to Windows XP theme, and check if it can print correctly.
There is more similar issue about printing database diagram, you can review the following posts.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/267da892-c470-4269-854f-c1327746b16c/problem-with-printing-database-diagrams
http://forums.asp.net/t/1190828.aspx
Thanks,
Sofiya Li
Sofiya Li
TechNet Community Support -
Data Import from Oracle Dump to SQL Server(2000/2005)
Hi Friends,
I'm using Oracle 10g.
I've a scenario.
I've Oracle Dump file. Now i would like import in SQL Server(2000/2005).
Can any one suggest me how to do this?
Any idea,clue will be highly appreciated.I think you will need to import the data into SQL Server from an ASCII flat file using SQL Server DTS if avialable. You can use SQL Plus to extract the data outof Oracle into comma delimited flat files and then use SQL Server DTS load into the SQL Server database.
-
Migrating SSRS custom security from 2008 R2 to SQL Server 2012
Hi,
We have built custom security in SSRS 2008 R2 and now we are migrating it to SSRS 2012. We are facing an issue, it always throws Security exception below and when we are changing
web.config file to below line we are getting "500 Internal server error". Tried everything, no luck... can someone please assist here whether we need to rewrite entire custom security code and then migrate it to SSRS 2012 custom
security. Any help here much appreciated
<authentication mode="Forms">
<forms loginUrl="logon.aspx" name="sqlAuthCookie" timeout="60" path="/"></forms>
</authentication>
<identity impersonate="false" />
Regards,
HarishHi yashmitl,
In your case, please running the following command to check the current URL reservations on http.sys.
netsh http show urlacl
Then, please delete the URL reservation by executing the following command try to resolve the issue.
netsh http delete urlacl <url>
There is a similar issue, you can refer to it.
http://social.technet.microsoft.com/Forums/en-US/d5204dd3-e26d-4592-8ef0-a94005fc46a5/the-url-has-already-been-reserved?forum=sqlreportingservices
Hope this helps.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
SSISB Row Counts in SQL Server 2012
Does SSISDB (SQL Server 2012) track row counts such as total rows loaded, inserted rows, and updated rows?
Or do we still need to use the row count transformation to capture these counts?
Ryan P. Casey • <a href="http://www.R-P-C-Group.com">www.R-P-C-Group.com</a>Hi RPCASEY001,
Based on my research, Row Counts for Execute SQL Task do not get captured in [SSISDB].[internal].[execution_data_statistics] table even when logging on the SSISDB server is set to Verbose. As per my understanding, this makes sense that how would SSIS know
what the affected row counts are by the SQL statement in an Execute SQL Task given that we can put whatever we want in there?
If we want to capture row counts loaded using the Execute SQL task, we can create a log table and add the row counts column into the log table. For more details, please refer to the following blog:
http://consultingblogs.emc.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx
The following similar thread is for your reference:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/64ab1ec3-b0f2-4bba-9523-a7bcd6c154f1/ssis-logging-recording-record-count-from-sql-task?forum=sqlintegrationservices
Thanks,
Katherine Xiong
If you have any feedback on our support, please click
here.
Katherine Xiong
TechNet Community Support -
Where can i download SQL Server 2012 Standard Edition?
Hello everyone!
I have bought 2 open licenses for SQL Server 2012 Standard Edition for my application.
I want to download from microsoft site the SQL Server 2012 Standard Edition software in order to install it to my servers but as i searched in microsoft's site, i can't find
Stanard edition for downloading. I only find Express and Evaluation.
Can you please help me?
- Thanks -Hello,
Please try to download the Evaluation Edition from the following link and provide the Standard Edition key on the Product
Key page of SQL Server setup.
http://www.microsoft.com/en-us/download/details.aspx?id=29066
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Where do I find SQL Server 2012 Express with tools
I have to have this for a class and every web page I have tried and even from the Murach's SQL Server 2012 for developers book is giving me " this page not found".
Does anyone know where I can get it?Why I am unable to open your link Saeid ?
Saeid, BTW, also your signature link is somehow a little bit strange, here in this post the effective link is the URL of the post + sqldevelop.wordpress.com ...
http://social.msdn.microsoft.com/Forums/en-US/96b8dba8-ebd1-420b-b142-6cf25b4a93bb/sqldevelop.wordpress.com
Olaf Helper
[ Blog] [ Xing] [ MVP]
Maybe you are looking for
-
Moving a folder from Mac Pro to new MacBook Pro
I have a new 15" retina MBP and an older MacPro desktop, both for work. I like to move my Mail folder between the machines - to the MBP when out of office then back to the Mac Pro when I return. I was able to do this easily via Firewire with my old
-
I had been on facebook in the morning of this date. I went back to my page and things began loading slowly. I logged out and tried to reload my account and from that moment on I keep getting the "Unable to connect Firefox can't establish a connection
-
How do you make a saturation changing gif file?
I have a photograph that I want to turn into a 6 second color changing gif file some similar to this http://media.photobucket.com/user/MANITOU57/media/MARIJUANA%20ANIMATIONS/ANIMATIONICONATOR 2.gif.html?filters[term]=pot%20leaf%20gif&filters[primary]
-
Accordion widget not pushing content out of way
Hi, Following a Lynda.com tutorial I added a menu to an accordion widget while designing a mobile site. Expanding the accordion is supposed to push the page's content downwards but it is simply unfurling over it. Does anybody have any idea what mig
-
Hi, Again, I'm a noob to the Macworld and I want to get some of my old VCRs (through my VCR Player not Camcorder) onto my Mac to burn to DVD. What's a good cheap way of doing this?