Wednesday, March 21, 2012
Posting?
--
JC Frith"jcfrith" <jcfrith@.discussions.microsoft.com> wrote in message
news:9B431857-84BA-4849-80F8-1076F66418D9@.microsoft.com...
> Can you post a question to multiple Discussion Groups?
"yes and no"
If you post, post only to the relevant newsgroups (and if it's more than 3,
you're probably wrong about what's relevant :-).
And post to all in a single post (i.e. add them all to the newsgroup line).
Do not send 3 separate posts.
That causes people to answer the question multiple times since responses are
not seen in the other newsgroups.
> --
> JC Frith|||Hi
Along with Greg's answers it may help you if you read the articles at
http://www.aspfaq.com/etiquette.asp
John
"jcfrith" <jcfrith@.discussions.microsoft.com> wrote in message
news:9B431857-84BA-4849-80F8-1076F66418D9@.microsoft.com...
> Can you post a question to multiple Discussion Groups?
> --
> JC Frith
Posting?
--
JC Frith"jcfrith" <jcfrith@.discussions.microsoft.com> wrote in message
news:9B431857-84BA-4849-80F8-1076F66418D9@.microsoft.com...
> Can you post a question to multiple Discussion Groups?
"yes and no"
If you post, post only to the relevant newsgroups (and if it's more than 3,
you're probably wrong about what's relevant :-).
And post to all in a single post (i.e. add them all to the newsgroup line).
Do not send 3 separate posts.
That causes people to answer the question multiple times since responses are
not seen in the other newsgroups.
> --
> JC Frith|||Hi
Along with Greg's answers it may help you if you read the articles at
http://www.aspfaq.com/etiquette.asp
John
"jcfrith" <jcfrith@.discussions.microsoft.com> wrote in message
news:9B431857-84BA-4849-80F8-1076F66418D9@.microsoft.com...
> Can you post a question to multiple Discussion Groups?
> --
> JC Frith
Posting XMLA to AS from java without msmdpump.dll
Posting the request via HttpURLConnection as below works.
url = new URL("http://localhost//olap/
HttpURLConnection con = (HttpURLConnection) url.openConnection();
The question is I'd prefer not to have to require IIS plus the pump to be running on the AS server(msmdpump.dll). We know MS code is sending XMLA to the AS Database.
Why can we not use the same channel? It may not be http but I do not care. I'd rather have minimum stuff to do on the server.
Thanks in advance
Zub
I'd say in this stiuation you are probably better off using HTTP. On windows machine you can use naitive AS client : ADOMD.NET or AS OLEDB, and establish connection using TCP/IP , but coming from outside you will face quite a few problems. Configuring virtual direcory compared to ... for instance trying to figure out how to authenticate your non-windows user if by far easier task.
Hope that helps.
Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Posting to SQLXML
I'm new to SQLXML and have run into a problem when using it
to update SQL tables from our application database.
We are generating XML in our application db and http
posting it to update an SQL database. The
(attribute-centric) XML generated matches the target table,
the element name is the same as the table name and the
attributes match the columns to be updated.
<ROOT>
<SUPPINV TABLE_KEY="10542049*202.12" INVOICE_TOTAL="377.56"
INVOICE_NUMBER="124577" INVOICE_DATE_KEY="12475">
<SUPPINV TABLE_KEY="123 ... >
</ROOT>
We have to URLEncode the XML then using HTTP post, we post
directly to the SQLXML URL from the application db.
This works as long as the size of posted data does not
exceed about 35kb and is not between 4 & 8Kb. This means I
have to chunk the XML into about 40 rows per post.
Also after posting about 100,000 rows (at 40 per time) or
so I generally get an HTTP 500 error.
Can anyone explain what is going on here and perhaps
suggest a way to improve this.
Regards,
StuartDid you limit the post size in SqlXml? What about the timeout in IIS?
Could be the request is just taking too long and timing out...
Irwin
"Stuart" <newplanet_x@.yahoo.com.au> wrote in message
news:1cf801c50fe8$3fea0da0$a601280a@.phx.gbl...
> Hi,
> I'm new to SQLXML and have run into a problem when using it
> to update SQL tables from our application database.
> We are generating XML in our application db and http
> posting it to update an SQL database. The
> (attribute-centric) XML generated matches the target table,
> the element name is the same as the table name and the
> attributes match the columns to be updated.
> <ROOT>
> <SUPPINV TABLE_KEY="10542049*202.12" INVOICE_TOTAL="377.56"
> INVOICE_NUMBER="124577" INVOICE_DATE_KEY="12475">
> <SUPPINV TABLE_KEY="123 ... >
> </ROOT>
> We have to URLEncode the XML then using HTTP post, we post
> directly to the SQLXML URL from the application db.
> This works as long as the size of posted data does not
> exceed about 35kb and is not between 4 & 8Kb. This means I
> have to chunk the XML into about 40 rows per post.
> Also after posting about 100,000 rows (at 40 per time) or
> so I generally get an HTTP 500 error.
> Can anyone explain what is going on here and perhaps
> suggest a way to improve this.
> Regards,
> Stuartsql
Posting to SQLXML
I'm new to SQLXML and have run into a problem when using it
to update SQL tables from our application database.
We are generating XML in our application db and http
posting it to update an SQL database. The
(attribute-centric) XML generated matches the target table,
the element name is the same as the table name and the
attributes match the columns to be updated.
<ROOT>
<SUPPINV TABLE_KEY="10542049*202.12" INVOICE_TOTAL="377.56"
INVOICE_NUMBER="124577" INVOICE_DATE_KEY="12475">
<SUPPINV TABLE_KEY="123 ... >
</ROOT>
We have to URLEncode the XML then using HTTP post, we post
directly to the SQLXML URL from the application db.
This works as long as the size of posted data does not
exceed about 35kb and is not between 4 & 8Kb. This means I
have to chunk the XML into about 40 rows per post.
Also after posting about 100,000 rows (at 40 per time) or
so I generally get an HTTP 500 error.
Can anyone explain what is going on here and perhaps
suggest a way to improve this.
Regards,
Stuart
Did you limit the post size in SqlXml? What about the timeout in IIS?
Could be the request is just taking too long and timing out...
Irwin
"Stuart" <newplanet_x@.yahoo.com.au> wrote in message
news:1cf801c50fe8$3fea0da0$a601280a@.phx.gbl...
> Hi,
> I'm new to SQLXML and have run into a problem when using it
> to update SQL tables from our application database.
> We are generating XML in our application db and http
> posting it to update an SQL database. The
> (attribute-centric) XML generated matches the target table,
> the element name is the same as the table name and the
> attributes match the columns to be updated.
> <ROOT>
> <SUPPINV TABLE_KEY="10542049*202.12" INVOICE_TOTAL="377.56"
> INVOICE_NUMBER="124577" INVOICE_DATE_KEY="12475">
> <SUPPINV TABLE_KEY="123 ... >
> </ROOT>
> We have to URLEncode the XML then using HTTP post, we post
> directly to the SQLXML URL from the application db.
> This works as long as the size of posted data does not
> exceed about 35kb and is not between 4 & 8Kb. This means I
> have to chunk the XML into about 40 rows per post.
> Also after posting about 100,000 rows (at 40 per time) or
> so I generally get an HTTP 500 error.
> Can anyone explain what is going on here and perhaps
> suggest a way to improve this.
> Regards,
> Stuart
Posting stopped ?!?!
-PatPI'm still posting ;)|||Originally posted by rdjabarov
I'm still posting ;) You madman, you!
-PatP|||I guess everybody went for a lunch break|||some of us cannot post all of the time
but we do want to.
POSTing report parameters
of our report parameters can be very long (hundreds or even thousands of
characters) and is far to long to pass on a URL. Our solution has been to
POST the parameter, which does work, but not quite as we want it to. We only
need to provide a single parameter to the reprt as all the others have
default values.
The report generates and displays results as expected, however the parameter
selection and report navigation section is not visible on the report that is
rendered.
If we POST the parameters, is it possible to get the parameter selection and
report navigation sections to show? and, if so, how? The report is being
called from a custom app which passes the parameter to the report.
This is how we call our report:
http://sidev/ReportServer?/tbi/development/Report200_GIS
The POST data is:
XMLFarmIDs=<TbI>....</TbI>I've done this in the past by putting a hidden element in the form I'm
posting equivalent to the HTML Viewer command.
In my post form, I'll put this:
<input type=hidden name="rc:Parameters" value="false">
Andy Potter
Posting Multi-Value Parameter
Hi,
I tried Posting the values for a multi value parameter from my application to the reporting services, But the query string is not being hidden. Why is that ? since the the data is sent through the browser address bar, I am not able to send values more than the allowed lenght. Is there any work around ?
Thanks In Advance
Regards
Raja Annamalai S
Hi Raja-
Yes, you will be limited to the URL length restriction. If possible I might suggest using the Web Service to render reports rather than crafting the URL. This will not be limited by URL length.
Otherwise you can perform a POST instead of a GET on the http call. The post will send the parameter values in the body rather than appended to the URL. However, all parameters need to be in the body if you perform a POST.
Thanks, Jon
POSTING IT AGAIN TO RESOLVE THE ERROR
When i use the "sp_copysubscription" procedure, i am getting the following
error.
"Server: Msg 21236, Level 16, State 1, Procedure sp_copysubscription, Line
64
The subscription(s) to Publisher 'CNS_SQL1' does not allow subscription copy
or it has not been synchronized.".
My subscription datbabase contains only PULL subscription.It worked
previously and now started to give the above error.
Any help would be appreciated?
NOTE:
I do have anonymous pull subscription.
Copy subscription was working earlier and it is not now.
How to enable my publication for the copy subscription option?
Thanks,
Vijay
just for kicks, lets try this, go to your subscription database which you
pulled using anonymous authentication. Run the merge agent until it stops or
stop and start it until it goes idle, then stop it again.
Then start up profiler to trace the commands.
Then right click on your database in EM, select all tasks, and copy
subscription database. Does it work now? Does profiler give a different set
of parameters than what you are using?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Vijay" <vijay@.infosysusa.com> wrote in message
news:%23L$h4jWNFHA.1172@.TK2MSFTNGP12.phx.gbl...
> Hi,
> When i use the "sp_copysubscription" procedure, i am getting the following
> error.
> "Server: Msg 21236, Level 16, State 1, Procedure sp_copysubscription, Line
> 64
> The subscription(s) to Publisher 'CNS_SQL1' does not allow subscription
copy
> or it has not been synchronized.".
> My subscription datbabase contains only PULL subscription.It worked
> previously and now started to give the above error.
> Any help would be appreciated?
> NOTE:
> I do have anonymous pull subscription.
> Copy subscription was working earlier and it is not now.
> How to enable my publication for the copy subscription option?
> Thanks,
> Vijay
>
>
|||No, it doesn't work. I couldn't find any difference in the trace also.
..
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:ewB10weNFHA.2136@.TK2MSFTNGP14.phx.gbl...
> just for kicks, lets try this, go to your subscription database which you
> pulled using anonymous authentication. Run the merge agent until it stops
or
> stop and start it until it goes idle, then stop it again.
> Then start up profiler to trace the commands.
> Then right click on your database in EM, select all tasks, and copy
> subscription database. Does it work now? Does profiler give a different
set[vbcol=seagreen]
> of parameters than what you are using?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Vijay" <vijay@.infosysusa.com> wrote in message
> news:%23L$h4jWNFHA.1172@.TK2MSFTNGP12.phx.gbl...
following[vbcol=seagreen]
Line
> copy
>
|||what happens if you reinitialize, and resync. Can you do it now?
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Vijay" <vijay@.infosysusa.com> wrote in message
news:edD4fDhNFHA.3788@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> No, it doesn't work. I couldn't find any difference in the trace also.
> .
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:ewB10weNFHA.2136@.TK2MSFTNGP14.phx.gbl...
you[vbcol=seagreen]
stops[vbcol=seagreen]
> or
> set
> following
> Line
subscription
>
|||Hi,
I reinitialized and resync it. It doesn't help.
Any other ideas?
Thanks,
Vijay
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:OxnXX2iNFHA.2556@.TK2MSFTNGP15.phx.gbl...[vbcol=seagreen]
> what happens if you reinitialize, and resync. Can you do it now?
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
> "Vijay" <vijay@.infosysusa.com> wrote in message
> news:edD4fDhNFHA.3788@.tk2msftngp13.phx.gbl...
> you
> stops
different[vbcol=seagreen]
sp_copysubscription,
> subscription
>
sql
Posting an Image to SQL Server 2005
Hello Everyone I am trying to write image files to sql server using the following code. I have recieved the following error message
Failed to convert parameter value from a String to a Byte[]. Please help. I am sure it is a problem gathering the iostream. I am not very familiar. Any help is gretaly appreciated.
Thanks in advance
Here is the code:
'Dim User As MembershipUser = Membership.GetUser(CreateUserWizard1.UserName)
'Dim t As TextBox = DirectCast(FormView1.FindControl("aspnet_UserID"), TextBox)
Dim objConnAs SqlConnectionDim objComAs SqlCommand
IfMe.FileUpload1.HasFileThen
Dim fileExtensionAsString
Dim fileOKAsBoolean =False
fileExtension = System.IO.Path. _
GetExtension(FileUpload1.FileName).ToLower()
Dim allowedExtensionsAsString() = _{".jpg",".jpeg",".png",".gif",".mwv"}
For iAsInteger = 0To allowedExtensions.Length - 1If fileExtension = allowedExtensions(i)Then
fileOK =True
EndIf
Next
'Try
Dim imagestreamAs System.IO.Stream = FileUpload1.FileContentDim data()AsByte
ReDim data(imagestream.Length - 1)imagestream.Read(data, 0, imagestream.Length)
imagestream.Close()
objConn =New SqlConnection(strNewConnection)objCom =New SqlCommand("insert into ProfileImagesAndDocs(aspnet_userid,img_name,img_data,img_contenttype)values(@.aspnet_userid,@.imagename,@.Picture,@.CategoryName)", objConn)
'--------------
'this is the aspnet_userid
Dim useridparameterAs SqlParameter =New SqlParameter("@.aspnet_userid", SqlDbType.VarChar)useridparameter.Value =Me.aspnet_userid.TextobjCom.Parameters.Add(useridparameter)
'--------------
'This is the image name
Dim imagenameparameterAs SqlParameter =New SqlParameter("@.imagename", SqlDbType.VarChar)imagenameparameter.Value =Me.FileUpload1.FileNameobjCom.Parameters.Add(imagenameparameter)
'--------------
'this is the picture data
Dim pictureParameterAs SqlParameter =New SqlParameter("@.Picture", SqlDbType.Image)pictureParameter.Value = data
objCom.Parameters.Add(pictureParameter)
'--------------
'this is the profile area or category i.e. video intro
Dim categorynameParameterAs SqlParameter =New SqlParameter("@.CategoryName", SqlDbType.VarChar)pictureParameter.Value ="IntroVideo"
objCom.Parameters.Add(categorynameParameter)
objConn.Open()
objCom.ExecuteNonQuery()
objConn.Close()
'bookmark
Label1.Text ="File uploaded!"
'Catch ex As Exception
Label1.Text ="File could not be uploaded."
EndIf
Hi,
You may use FileStream to read the image content and save it as SqlDbType.Image into your database. See the following sample.
|||Private Function GetFile()As String''' GetFileDim fileAs HttpPostedFile = File1.PostedFilefileName = file.FileNameReturn fileNameEnd Function''' ReadFilePrivate Function ReadFile()As Byte()Dim fileAs FileStream = File.OpenRead(GetFile())Dim contentAs Byte() =New Byte(file.Length - 1) {}file.Read(content, 0, content.Length)file.Close()Return contentEnd FunctionPrivate Sub WriteImage()Dim commAs SqlCommand = conn.CreateCommand()comm.CommandText ="insert into images(image,type) values(@.image,@.type)"comm.CommandType = CommandType.TextDim paramAs SqlParameter = comm.Parameters.Add("@.image", SqlDbType.Image)param.Value = ReadFile()param = comm.Parameters.Add("@.type", SqlDbType.NVarChar)param.Value = GetContentType(New FileInfo(fileName).Extension.Remove(0, 1))If comm.ExecuteNonQuery() = 1ThenResponse.Write("Successful")ElseResponse.Write("Fail")End Ifconn.Close()End SubPrivate Function GetContentType(ByVal extensionAs String)As StringDim typeAs String =""If extension.Equals("jpg")OrElse extension.Equals("JPG")Thentype ="jpeg"Elsetype = extensionEnd IfReturn"image/" + typeEnd Function
Thanks.
Thanks the code above worked very well. I am having one other difficulty when I select a file with a *.wmv extension the file is not read and the script halts. Any Ideas?! and thanks again for the solution.
Posting an entire XML document to SQL Server
it gets posted, I can process it with a Stored Procedure?
My specific application is using BizTalk 2004 to send an entire document to
SQL Server without using the "updategram" schema. I just want to send an
entire document via a BizTalk 2004 SQL Send Port.
Thanks,
Mike Jansen
Sr. Software Developer
Prime ProData, Inc.
North Canton, Ohio USA
(mjansen) (at) (primepro-com)
In SQL Server 2000, define your stored proc with a parameter of type NTEXT
or TEXT and use your favorite provider to pass the XML (in an encoding that
is compatible with either Unicode (NTEXT) or your server code page (TEXT)).
Best regards
Michael
"Mike Jansen" <mjansen_nntp@.mail.com> wrote in message
news:uinFg5SvEHA.4020@.TK2MSFTNGP10.phx.gbl...
> How do I post an entire XML document to SQL Server in a such a way that
> when
> it gets posted, I can process it with a Stored Procedure?
> My specific application is using BizTalk 2004 to send an entire document
> to
> SQL Server without using the "updategram" schema. I just want to send an
> entire document via a BizTalk 2004 SQL Send Port.
> Thanks,
> Mike Jansen
> Sr. Software Developer
> Prime ProData, Inc.
> North Canton, Ohio USA
> (mjansen) (at) (primepro-com)
>
POSTING AGAIN Transaction Replication - Identity column
I am using transaction replication and the identity column is not included
for replication.
After creating the snapshot, i manually copying the data through stored
procedure from publishing database to subscription database. Then,if we run
the distribution agent,i am getting the following error. what will be the
process involved in applying the initial snapshot since i have already
copied the data. Will SQL server do bcp again? How can i avoid it?
Error Message: The process could not bulk copy into table '"hsassbtr"'.
Error Details:
Numeric value out of range
(Source: INFOSYS6 (ODBC); Error number: 22003)
Numeric value out of range
(Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
Unexpected EOF encountered in BCP data-file
(Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
key in object 'hsassbtr'.
(Source: INFOSYS6 (Data source); Error number: 2627)
Aritcle is added as follows:
--added all the columns
exec sp_articlecolumn @.publication = 'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = NULL,
@.operation = N'add',
@.force_invalidate_snapshot = 1
--dropped identity('DEX_ROW_ID') columns
exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = N'DEX_ROW_ID',
@.operation = N'drop',
@.force_invalidate_snapshot = 1
I have created the subscription as follows:
exec sp_addpullsubscription
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.independent_agent = N'true',
@.subscription_type = N'anonymous',
@.description = N'InfoSys POC Setup Table Publication',
@.update_mode = N'read only',
@.immediate_sync = 1
exec sp_addpullsubscription_agent
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.distributor = @.distributor,
@.subscriber_security_mode = @.security_mode,
@.distributor_security_mode = @.security_mode,
@.frequency_type = 8, --Weekly
@.frequency_interval = 1, --Sunday
@.frequency_recurrence_factor = 1, --Every Week
@.frequency_subday = 1, --Once a Day
@.active_start_time_of_day = 220000, --10 PM
@.enabled_for_syncmgr = N'false',
@.use_ftp = N'false',
@.publication_type = 0,
@.offloadagent = N'false'
Any help?
Thanks,
Vijay
Can you check and make sure the subscribing table is empty?
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Vijay" <vijay@.infosysusa.com> wrote in message
news:OEiWoNSkFHA.2852@.TK2MSFTNGP15.phx.gbl...
Hi,
I am using transaction replication and the identity column is not included
for replication.
After creating the snapshot, i manually copying the data through stored
procedure from publishing database to subscription database. Then,if we run
the distribution agent,i am getting the following error. what will be the
process involved in applying the initial snapshot since i have already
copied the data. Will SQL server do bcp again? How can i avoid it?
Error Message: The process could not bulk copy into table '"hsassbtr"'.
Error Details:
Numeric value out of range
(Source: INFOSYS6 (ODBC); Error number: 22003)
Numeric value out of range
(Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
Unexpected EOF encountered in BCP data-file
(Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
key in object 'hsassbtr'.
(Source: INFOSYS6 (Data source); Error number: 2627)
Aritcle is added as follows:
--added all the columns
exec sp_articlecolumn @.publication = 'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = NULL,
@.operation = N'add',
@.force_invalidate_snapshot = 1
--dropped identity('DEX_ROW_ID') columns
exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
@.article = @.table_name,
@.column = N'DEX_ROW_ID',
@.operation = N'drop',
@.force_invalidate_snapshot = 1
I have created the subscription as follows:
exec sp_addpullsubscription
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.independent_agent = N'true',
@.subscription_type = N'anonymous',
@.description = N'InfoSys POC Setup Table Publication',
@.update_mode = N'read only',
@.immediate_sync = 1
exec sp_addpullsubscription_agent
@.publisher = @.publisher,
@.publisher_db = @.publisher_db,
@.publication = N'InfoSys_Point_of_Care_Master_Tables',
@.distributor = @.distributor,
@.subscriber_security_mode = @.security_mode,
@.distributor_security_mode = @.security_mode,
@.frequency_type = 8, --Weekly
@.frequency_interval = 1, --Sunday
@.frequency_recurrence_factor = 1, --Every Week
@.frequency_subday = 1, --Once a Day
@.active_start_time_of_day = 220000, --10 PM
@.enabled_for_syncmgr = N'false',
@.use_ftp = N'false',
@.publication_type = 0,
@.offloadagent = N'false'
Any help?
Thanks,
Vijay
|||Vyas,
Subscribing table has data because i have manually copied the data through
stored procedure from Publising database.
Thanks,
Vijay
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:OFnpAcSkFHA.3256@.TK2MSFTNGP12.phx.gbl...
> Can you check and make sure the subscribing table is empty?
> --
> HTH,
> Vyas, MVP (SQL Server)
> SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
>
> "Vijay" <vijay@.infosysusa.com> wrote in message
> news:OEiWoNSkFHA.2852@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I am using transaction replication and the identity column is not
included
> for replication.
> After creating the snapshot, i manually copying the data through stored
> procedure from publishing database to subscription database. Then,if we
run
> the distribution agent,i am getting the following error. what will be the
> process involved in applying the initial snapshot since i have already
> copied the data. Will SQL server do bcp again? How can i avoid it?
>
> Error Message: The process could not bulk copy into table '"hsassbtr"'.
> Error Details:
> Numeric value out of range
> (Source: INFOSYS6 (ODBC); Error number: 22003)
> ----
--
> --
> Numeric value out of range
> (Source: ODBC SQL Server Driver (ODBC); Error number: 22003)
> ----
--
> --
> Unexpected EOF encountered in BCP data-file
> (Source: ODBC SQL Server Driver (ODBC); Error number: S1000)
> ----
--
> --
> Violation of PRIMARY KEY constraint 'PKhsassbtr'. Cannot insert duplicate
> key in object 'hsassbtr'.
> (Source: INFOSYS6 (Data source); Error number: 2627)
> ----
--
> --
> Aritcle is added as follows:
> --added all the columns
> exec sp_articlecolumn @.publication =
'InfoSys_Point_of_Care_Master_Tables',
> @.article = @.table_name,
> @.column = NULL,
> @.operation = N'add',
> @.force_invalidate_snapshot = 1
> --dropped identity('DEX_ROW_ID') columns
> exec sp_articlecolumn @.publication =
> 'InfoSys_Point_of_Care_Master_Tables',
> @.article = @.table_name,
> @.column = N'DEX_ROW_ID',
> @.operation = N'drop',
> @.force_invalidate_snapshot = 1
>
> I have created the subscription as follows:
> exec sp_addpullsubscription
> @.publisher = @.publisher,
> @.publisher_db = @.publisher_db,
> @.publication = N'InfoSys_Point_of_Care_Master_Tables',
> @.independent_agent = N'true',
> @.subscription_type = N'anonymous',
> @.description = N'InfoSys POC Setup Table Publication',
> @.update_mode = N'read only',
> @.immediate_sync = 1
> exec sp_addpullsubscription_agent
> @.publisher = @.publisher,
> @.publisher_db = @.publisher_db,
> @.publication = N'InfoSys_Point_of_Care_Master_Tables',
> @.distributor = @.distributor,
> @.subscriber_security_mode = @.security_mode,
> @.distributor_security_mode = @.security_mode,
> @.frequency_type = 8, --Weekly
> @.frequency_interval = 1, --Sunday
> @.frequency_recurrence_factor = 1, --Every Week
> @.frequency_subday = 1, --Once a Day
> @.active_start_time_of_day = 220000, --10 PM
> @.enabled_for_syncmgr = N'false',
> @.use_ftp = N'false',
> @.publication_type = 0,
> @.offloadagent = N'false'
> Any help?
>
> Thanks,
> Vijay
>
>
|||Why did you copy data manually, when you are configuring replication with
automatic sync?
You should either subscrine with nosync option or delete the data from
subscriber before the snapshot is applied (if the snapshot is not configure
to truncate/delete table).
If there are any special requirements for this subscriber, pelase post the
complete info, and someone will be able to assist.
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Vijay" <vijay@.infosysusa.com> wrote in message
news:uHJ%23ZgSkFHA.708@.TK2MSFTNGP09.phx.gbl...
> Vyas,
> Subscribing table has data because i have manually copied the data through
> stored procedure from Publising database.
> Thanks,
> Vijay
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:OFnpAcSkFHA.3256@.TK2MSFTNGP12.phx.gbl...
> included
> run
> --
> --
> --
> --
> 'InfoSys_Point_of_Care_Master_Tables',
>
Posting again as i had no reply : Moving dbs
standby state thats awaiting more T-logs to be applied and then attach/bring
it
back in the same state and continue with T-logs restores ? I know one can
detach a nonrecovered/standby database but while attaching it it recovers
it... and
that what i want to avoid.
Any way to modify some system tables (sysdatabases) to achieve this. Any
help would be much appreciated. Using SQL 2000.Not that I can see. I had a couple of tries at this but I see no documented
way to do it. As you rightly say, FOR ATTACH recovers the database. I guess
you could probably do something with the status but I would not recomend
hacking the system tables.
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:OPA7f$$cDHA.2416@.TK2MSFTNGP09.phx.gbl...
Is there a way that one can detach/move a database that is in norecovery or
standby state thats awaiting more T-logs to be applied and then attach/bring
it
back in the same state and continue with T-logs restores ? I know one can
detach a nonrecovered/standby database but while attaching it it recovers
it... and
that what i want to avoid.
Any way to modify some system tables (sysdatabases) to achieve this. Any
help would be much appreciated. Using SQL 2000.|||All I would say is that it would probably be unsupported should you
encounter any issues so you're on your own. If this is a production
environment I would strongly recomend against it.
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%237mkvdJdDHA.2804@.TK2MSFTNGP11.phx.gbl...
I tried to do this and was successful. It does involve hacking sysdatabases
. But am also hesitant as I am not too sure what the future holds. It works
fine now...But would hate to see some error later down the line
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:ucdZNaIdDHA.1128@.tk2msftngp13.phx.gbl...
> Not that I can see. I had a couple of tries at this but I see no
documented
> way to do it. As you rightly say, FOR ATTACH recovers the database. I
guess
> you could probably do something with the status but I would not recomend
> hacking the system tables.
> --
> HTH
> Jasper Smith (SQL Server MVP)
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:OPA7f$$cDHA.2416@.TK2MSFTNGP09.phx.gbl...
> Is there a way that one can detach/move a database that is in norecovery
or
> standby state thats awaiting more T-logs to be applied and then
attach/bring
> it
> back in the same state and continue with T-logs restores ? I know one can
> detach a nonrecovered/standby database but while attaching it it recovers
> it... and
> that what i want to avoid.
> Any way to modify some system tables (sysdatabases) to achieve this. Any
> help would be much appreciated. Using SQL 2000.
>
>
posting again
I do not see any guideline or a thorough article for ISVs who will be using MSDE for deploying their application on desktops using application security roles. There definetely is information here and there but a comprehensive writeup is needed. Any plan
s by any of you SQL Server gurus.
Thank you
Read the BOL about database security roles. There should be all the
information you need. In general you define the security roles you need
based on your application security model. Then set the permissions to your
database objects using the roles. Users of the database are then give a role
membership, rather than explicit permissions.
Jim
"qa" <anonymous@.discussions.microsoft.com> wrote in message
news:30E7FFAA-A6C6-4333-B3AD-382B25689330@.microsoft.com...
> Hi,
> I do not see any guideline or a thorough article for ISVs who will be
using MSDE for deploying their application on desktops using application
security roles. There definetely is information here and there but a
comprehensive writeup is needed. Any plans by any of you SQL Server gurus.
> Thank you
>
|||can all this be done even if I am using the integrated security. See I am implementing my own custom identity and principal classes and here is how it works:
1> my app's first screen will be the login screen.
2>once the user enters the username and password, these 2 fields will be verified from a table in my app's database. If the user does exist in the table then I assign this user as my app domain's current user and use it's id for further interaction with
the objects in the app. I even read the roles the user is part of from a role table, for e.g. dataentryclerk, poweruser etc.. these roles will be used to control the app's UI behaviour too.
3> I am using integrated security to access the database but instead of windows giving me the current user's id token, I am using my role based security (as explained above) and assigning the currect user to the app domain.
This was needed because it is not necessary that every user who accesses my app will be a windows user. My app's requirements state that anyone who has been entered in the database (we will provide a UI to enter users and their passwords) can access the
application.
So in this situation, how can I protect my database, tables and stored procedures from anyone who has some MSDE Manager type of tool.
sql
Posting a query?
Its very difficulty to find the link to post query...
In this forums site...pls tell me the location...where can I find the link to post a query...
Gotohttp://forums.asp.net/ click on a particular category and above the main grid you'll find a 'Write a New Post' button.