Thursday, March 29, 2012
Do replication for a non-Administrators
me to another database?
possibly, you need to be system administrator or dbo to create publications.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
"M" <mxchen@.hotvoice.com> wrote in message
news:%23Lwd3w38EHA.1188@.tk2msftngp13.phx.gbl...
> Can I do replication to copy tables in one database which was not create
by
> me to another database?
>
Thursday, March 22, 2012
Do i alsocopy sys dbs when i copy a db to a new disk with 'Att & D
I need to copy a user database from disk E to disk G using the 'attach and
detach' and then take that disk to another server where i will attach the
database. Do i also have to copy the systems databases (Master, MSDB, Model)?
How do i also keep the logins and security features that were on the
databases previously? I cant use 'import and export data' as the other
machine is not on the domain/network.
Thank you in advance
You don't have to.
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
"MittyKom" <MittyKom@.discussions.microsoft.com> wrote in message
news:E7B05938-593E-4F3C-9124-EC9957207120@.microsoft.com...
> Hi all
> I need to copy a user database from disk E to disk G using the 'attach and
> detach' and then take that disk to another server where i will attach the
> database. Do i also have to copy the systems databases (Master, MSDB,
> Model)?
> How do i also keep the logins and security features that were on the
> databases previously? I cant use 'import and export data' as the other
> machine is not on the domain/network.
> Thank you in advance
Friday, February 24, 2012
Distribution Agent Fails on Pull subscriptions
SQLServer 2000 Enterprise w/SP3
Win 2000 Server w/SP3
In testing replication against a copy of our production database, when I run
the snapshot agent, it completes with success. When I then run the
distribution agent, I get the following error returned:
The name ' ' is not permitted in this context. Only constants, expressions,
or variables allowed here. Column names are not permitted.
(Source: STAGING2 (Data source); Error number: 128)
As near as I can tell, the script being processed when the error is
generated is:
================================================== ==
SET QUOTED_IDENTIFIER ON
GO
drop procedure [spBDCInsertAddressRecord]
GO
CREATE PROCEDURE [spBDCInsertAddressRecord] @.pAddress_id_out int OUT
AS
/************************************************** ************************************************** ******
INSERTS A BLANK ADDRESS RECORD AND RETURNS THE ADDRESS_ID VALUE
************************************************** ************************************************** *******/
INSERT INTO ADDRESS (LINE1) VALUES(" ")
SELECT @.pAddress_id_out = @.@.IDENTITY
RETURN 0
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
================================================== =
This is a Transactional replication and the subscription is a Pull
subscription. The address_id column is the primary key for the table and is
an automatically generated INT data type.
Any thoughts?
TIA,
Ken
Try using INSERT INTO ADDRESS (LINE1) VALUES(' ') -- ie single quotes
Rgds,
Paul Ibison
"kmkrause2" <kmkrause2@.discussions.microsoft.com> wrote in message
news:3C35C8AF-8CD0-44E7-898C-BBF2C0978F5E@.microsoft.com...
> Environment:
> SQLServer 2000 Enterprise w/SP3
> Win 2000 Server w/SP3
> In testing replication against a copy of our production database, when I
run
> the snapshot agent, it completes with success. When I then run the
> distribution agent, I get the following error returned:
> The name ' ' is not permitted in this context. Only constants,
expressions,
> or variables allowed here. Column names are not permitted.
> (Source: STAGING2 (Data source); Error number: 128)
> As near as I can tell, the script being processed when the error is
> generated is:
> ================================================== ==
> SET QUOTED_IDENTIFIER ON
> GO
> drop procedure [spBDCInsertAddressRecord]
> GO
> CREATE PROCEDURE [spBDCInsertAddressRecord] @.pAddress_id_out int OUT
> AS
>
/************************************************** *************************
*******************************
> INSERTS A BLANK ADDRESS RECORD AND RETURNS THE ADDRESS_ID VALUE
>
************************************************** **************************
*******************************/
> INSERT INTO ADDRESS (LINE1) VALUES(" ")
> SELECT @.pAddress_id_out = @.@.IDENTITY
> RETURN 0
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
> ================================================== =
> This is a Transactional replication and the subscription is a Pull
> subscription. The address_id column is the primary key for the table and
is
> an automatically generated INT data type.
> Any thoughts?
> TIA,
> Ken
Sunday, February 19, 2012
Distributing database with app
What is/should be required for a target client machine to use and connect to a local copy of a SqlExpress database? Can't seem to get a db connection established to a different machine through a VB6 app. Installed the sql native client on the machine, but still can't connect. What am I missing, or do I have to distribute/install the entire SqlExpress client? Working fine from my development machine.
Rick
If you are connecting via TCP/IP you have to enable these protocols. You also have to ensure to enable remote connections.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||I'm not using a remote connection. It's a local copy of the database. What simply does the target deployment machine require or in order for the VB app to connect to the db?
|||The deployment machine needs a Data access components like MDAC or SQL Native Client, both the app machine and the database machine must be able to negotiate to a common protocol like TCP/IP. If that is used you have to allow remote connections on the database server and if you are using another port than 1433 either specify that in your connecting string like MachineName\SQLExpress,Portnumber or start SQL Browser on the database server which will automatically redirect the request to the appropiate port.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
|||Thanks Jens. I don't quite understand what you're saying with remote connections. There is no database machine. This is all starting to sound like every target machine for my application requires SqlExpress be installed on that machine, or a server that machine is connected to. Is this correct or not?
|||
Do you have SQL Express installed anywhere?
You must have a SQL Server running in order to access your data. There are two basic models to do this:
Local Data Access - SQL Express is installed on the same computer with the application. Each user has thier own copy of the database installed on their computer and data is not shared. This is the configuration for a single user application.|||Mike ... I was speaking of Local access (and think I used the term "local" a few times). All I've been asking is -- must SqlExpress be installed a client machine, be it local or server? Apparently, the answer is yes, which complicates distribution and installation by end-users who won't have a clue. I was under the mistaken impression it was not unlike distributing an Access mdb file. I'm clear on this point now. Thanks.Now I'm trying to understand more on User Instance usage:
If not specified in the connection string, what is the default, yes or no?
For shared multiuser usage located on a server, should it be enabled or not?
I'm just unclear on when/when not to use it.
TIA ... Rick
|||If you don′t uise the user instance keyword you use SQL Server Exprtess just as a normal database. If you want to attach the database to a SQL Server instance you don′t need to use User instance availbility. Just attach the db to a SQL Servert (Express) and connect via the "normal* connection string to it (without specifying something like user instance)
HTH, Jens SUessmeyer.
http://www.sqlserver2005.de
|||Hi Rick,
Regarding User Instances:
If you don't specify it in the connection string, User Instances are not used.