Tuesday, March 27, 2012
Do I stand a chance of being sucessful?
management, databases, networks, and programming. But, I'm not experienced
in Sequel or MSDE.
I'm helping a friend who recently purchased a small service business (a
sports gym) that manages all the membership details using software that uses
MSDE. The current club management software is about 4 years old, it's
limping along without too many problems. The company that wrote the
software didn't survive the .com implosion, so I have very little
information on the product nor anyone to ask.
If his server was to die, he'd be SOL. I want to start 'backing up' the
data in a format I can use to import into potential replacement software (I
have no way to recreate the existing environment).
Is this possible? Without any information on the database (names,
passwords, field, layout, etc), is it possible to create a flat file that
contains the basic membership data (names, address, status, membership type,
etc). (the existing software does not have this capability) I'm assuming
that the future software will allow me to import such a file. I this too
big of a task for a newbie?
Thanks for your time in advance...
It is definitely doable. You need some very basic knowledge on SQL
Server/MSDE. MSDE is a free version of SQL Server, so your problem is MSDE
does not come with a GUI tool. However, armed with basic SQL Server/MSDE
knowledge, you can use Access to connect to MSDE (either *.mdb or *.adp
file), and to view/modify/export data in the said MSDE database.
"The Dodger" <someone@.somewhere.com> wrote in message
news:%23EVc37K4FHA.2352@.TK2MSFTNGP12.phx.gbl...
> I'm basically a newbie; I understand the concepts of basic computer
> management, databases, networks, and programming. But, I'm not
> experienced in Sequel or MSDE.
> I'm helping a friend who recently purchased a small service business (a
> sports gym) that manages all the membership details using software that
> uses MSDE. The current club management software is about 4 years old,
> it's limping along without too many problems. The company that wrote the
> software didn't survive the .com implosion, so I have very little
> information on the product nor anyone to ask.
> If his server was to die, he'd be SOL. I want to start 'backing up' the
> data in a format I can use to import into potential replacement software
> (I have no way to recreate the existing environment).
> Is this possible? Without any information on the database (names,
> passwords, field, layout, etc), is it possible to create a flat file that
> contains the basic membership data (names, address, status, membership
> type, etc). (the existing software does not have this capability) I'm
> assuming that the future software will allow me to import such a file. I
> this too big of a task for a newbie?
> Thanks for your time in advance...
>
>
sql
Sunday, March 25, 2012
do I need to enable cross database ownership chaining for merge repl?
Do I need to enable cross database ownership chaining on databases that
participate in Merge replication (publishers and subscribers)? I have seen
info pointing to maybe yes, maybe no...
anyone have comments on this?
DJC,
I'm not aware of any issues having been reported.
In what context have you heard of problems arising? Maybe from the SP3
readme - there was an issue which has been clarified in the ReadMe
additions:
Clarification to Section 5.3.17 - Change to Requirements for Attaching or
Restoring a Replication Database
Section 5.3.17 "Change to Requirements for Attaching or Restoring a
Replication Database" in the SQL Server 2000 SP3 Readme file incorrectly
implies that enabling cross-database ownership chaining is a requirement for
attaching or restoring replication databases after SQL Server 2000 SP3 has
been applied. The preferred method for attaching or restoring databases
after applying SQL Server 2000 SP3, is to have a member of the sysadmin
fixed server role run the sp_changedbowner stored procedure to assign
ownership of the database to the sa built-in administrator logon. For
example:
Regards,
Paul Ibison
sql
Do I need stop Agents during primary Server power down?
Does anyone can tell that our production primary site need perform server
power down, and I have the databases transactional replication with push
setup on primary site? The secondary site will run all the time. Before,
primary site perform the power down, do I need stop the Log Reader and
Distribution Agents? What if I am not stopping those agents?
Regards,
Chen
You will be fine. Transactional replication replicates transactionally. So
if you power off in the middle of something, when it starts up again, it
will pick up where it left off.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Chen" <Chen@.discussions.microsoft.com> wrote in message
news:D91896AE-5BF7-47FA-A0D7-D4BFC0CAF422@.microsoft.com...
> Hi,
> Does anyone can tell that our production primary site need perform server
> power down, and I have the databases transactional replication with push
> setup on primary site? The secondary site will run all the time. Before,
> primary site perform the power down, do I need stop the Log Reader and
> Distribution Agents? What if I am not stopping those agents?
> Regards,
> Chen
>
sql
Monday, March 19, 2012
DMO Databases uptime
I need to query using isqlw the SQLService uptime (Or using DMO), could
anyone help me?get the create date of the tempdb using a SQLDMO object set to that database
.
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Tinchos" wrote:
> Hi friends...
> I need to query using isqlw the SQLService uptime (Or using DMO), could
> anyone help me?|||or...
select
[name]
,crdate
from
master..sysdatabases
where
[name] = 'tempdb'
regards,
Mark Baekdal
http://www.dbghost.com
http://www.innovartis.co.uk
+44 (0)208 241 1762
Build, Comparison and Synchronization from Source Control = Database change
management for SQL Server
"Tinchos" wrote:
> Hi friends...
> I need to query using isqlw the SQLService uptime (Or using DMO), could
> anyone help me?
DMO and Windows Authentication
I'd like to use DMO to browse for databases on our SQL Servers using Windows Authneitication, rather than the SQL Server Authentication with login and password. Is this possible. This is the chuck of code that I've borrowed to do it so far. Can you make the Connection without the user and password?
Thanks,
Howie
Set SQLInstance = New SQLDMO.SQLServer
'Connect to the server by name (from global variable)
SQLInstance.Connect t_Server, t_User, t_Password
'Set the instance to that server ID
SQLSrvrID = SQLInstance.ConnectionID
Set SQLInstance = SQL2000.SQLServers.ItemById(SQLSrvrID)
'Display the available databases in a list box
ListDatabases.Clear
x = 1
For Each DB In SQLInstance.Databases
'Do not add system databases to the list
If Not SQLInstance.Databases(x).SystemObject Then
Me.ListDatabases.AddItem (SQLInstance.Databases(x).name)
End If
x = x + 1
Next
Just as an added question, does anyone know how you might go about exploring for data sources in VB, either with ADO or DMO? These would be the ODBC data source that you would create by:
Control Panel
Administrative Tools
Data Sources(ODBC)
Once in the Data Sources application, you pick a name for the data source, and then locate and define the server and associated database.
Thanks gain for any ideas,
Howie
|||I am using VB6 and I can easily get the username using the APIPrivate Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
|||' login using windows authentication
SQLInstance.LoginSecure = True
SQLInstance.Connect sServer
You don't need the API above.. thanks to Josh on his website for the answer!
Josh Fruits
http://www.programmers-corner.com
josh@.programmerscorner.com
Sunday, March 11, 2012
dm query taking long time
I'm running a query (see below) on my development server and its taking around 45 seconds. It hosts 18 user databases ranging from 3 MB to 400 MB. The production server, which is very similar but with only 1 25 MB user database, runs the query in less than 1 second. Both servers have been running on VMWare for almost 1 year with no problems. However last week I applied SP 2 to the development server, and yesterday I applied Critical Update KB934458. The production server is still running SQL Server 2005 Standard SP 1. Other than that, both servers are identical and running Windows 2003 Server Standard SP 1. I'm not seeing this discrepancy with other queries running against user databases.
use MyDatabase
GO
select db_name(database_id) as 'Database', o.name as 'Table',
s.index_id, index_type_desc, alloc_unit_type_desc, index_level, i.name as 'Index Name',
avg_fragmentation_in_percent, fragment_count, avg_fragment_size_in_pages,
page_count, avg_page_space_used_in_percent, record_count,
ghost_record_count, min_record_size_in_bytes, avg_record_size_in_bytes, forwarded_record_count,
schema_id, create_date, modify_date from sys.dm_db_index_physical_stats (null, null, null, null, 'DETAILED') s
join sys.objects o on s.object_id = o.object_id
join sys.indexes i on i.object_id = s.object_id and i.index_id = s.index_id
where db_name(database_id) = 'MyDatabase'
order by avg_fragmentation_in_percent desc
--order by avg_fragment_size_in_pages desc
--order by page_count desc
--order by record_count desc
--order by avg_record_size_in_bytes desc
Alright Chap check this out.
Your dev server has 18 user databases and the
sys.dm_db_index_physical_stats (null, null, null, null, 'DETAILED')
checks all the databases.
replace the first NULL with the DBID of the database mydatabase and try running it again.
Jag
|||Thanks. So, I can consider this to be normal behavior?I reduced the number of user databases from 18 to 9. Now it runs in about 1 second. (Same query, I haven't yet made the change you suggested.) I think its safe to say that this query does not scale!
|||In 'DETAILED mode the dmv will read all pages that are used in a database. In the query that you specified, you indicated that you wanted to walk though all the pages in all the databases that were available on the system. If you have one big database with a lot of data, this command will take a long time because of all the I/O.
If you want faster (but less detailed) results, you can use 'LIMITED' mode.
Thanks,
Friday, February 24, 2012
distribution agent works for one db but timed out for another db
Can someone help me on this? I have set up transactional repl between the
primary site and secondary site for 2 databases. Both transactional repls are
bi-directional. Now the publication for one db works file but it did not work
for another db. The distribution agent was saying "time out expired" during
the initialization. I had modified QueryTimeout from 300 to 4800 which made
the subscriber's transaction log dramatically increase. My question is why it
works on one database but did not work on another one (this is bigger size).
both dbs stay on the same machines. Publisher and Distributor are the same
machine but the Subscriber is running on a separate one.
Thanks in advances,
Perhaps modify the LoginTimeout as well.
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
"FYK" <FYK@.discussions.microsoft.com> wrote in message
news:3F2213CE-63A2-45B8-A267-8E370F7CCEFC@.microsoft.com...
> Hi friends,
> Can someone help me on this? I have set up transactional repl between the
> primary site and secondary site for 2 databases. Both transactional repls
are
> bi-directional. Now the publication for one db works file but it did not
work
> for another db. The distribution agent was saying "time out expired"
during
> the initialization. I had modified QueryTimeout from 300 to 4800 which
made
> the subscriber's transaction log dramatically increase. My question is why
it
> works on one database but did not work on another one (this is bigger
size).
> both dbs stay on the same machines. Publisher and Distributor are the same
> machine but the Subscriber is running on a separate one.
> Thanks in advances,
Distribution Agent Error (Timeout)
that timeout with errors listed below.
The databases were replication for two days without a
problem and I received the errors listed below.
Please help me resolve these errors.
Thank You,
Mike
Errors from Distribution Agent:
The process is running and is waiting for a response from
the backend connection.
{call sp_MSget_repl_commands(4, ?, 0, 7500000)}
Timeout expired
(Source: ODBC SQL Server Driver (ODBC); Error number:
S1T00)
sounds like you are replicating to Oracle? is this true?
The backend connection errors are hard to diagnose.
Enable replication logging and see if anything is going on
http://support.microsoft.com/default...b;EN-US;312292
Also change your inactivity threshhold to something large - right click on
replication monitor, select refresh rates.
If nothing is going on you should stop the agent and restart. If this fails
stop the sql agent service and restart, if this fails stop SQL Server and
restart, if this fails reboot.
If logging does reveal activity bump up your querytimeout setting to
something large - ie 1 hour and see what happens.
Exactly what are you doing that caused this to hang.
"Mike" <anonymous@.discussions.microsoft.com> wrote in message
news:1d0ea01c4230f$31615340$a301280a@.phx.gbl...
> I have SQL Server 2000 transactional replication databases
> that timeout with errors listed below.
> The databases were replication for two days without a
> problem and I received the errors listed below.
> Please help me resolve these errors.
> Thank You,
> Mike
>
> Errors from Distribution Agent:
> The process is running and is waiting for a response from
> the backend connection.
> {call sp_MSget_repl_commands(4, ?, 0, 7500000)}
> Timeout expired
> (Source: ODBC SQL Server Driver (ODBC); Error number:
> S1T00)
Sunday, February 19, 2012
Distributing application that use MSDE
When distributing an application that uses MSDE, should you install
your application databases into a named instance or into the default
instance? Are there any guidelines on when to create a named instance
versus using the default one?
Thanks in advance.
Sincerely,
Dan
hi Dan,
"Dan" <ddeward@.msn.com> ha scritto nel messaggio
news:686970bc.0406141634.30e23b96@.posting.google.c om...
> Hi,
> When distributing an application that uses MSDE, should you install
> your application databases into a named instance or into the default
> instance? Are there any guidelines on when to create a named instance
> versus using the default one?
you usually have to ask your user... since MSDE is now free, you are not
obliged from Miscrosoft to create a new instance for each ISV relased
application...
but ISVs can "protect" with a personal EULA asserving their installed
instance only to their application...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message news:<2j852iFuc642U1@.uni-berlin.de>...
> hi Dan,
> "Dan" <ddeward@.msn.com> ha scritto nel messaggio
> news:686970bc.0406141634.30e23b96@.posting.google.c om...
> you usually have to ask your user... since MSDE is now free, you are not
> obliged from Miscrosoft to create a new instance for each ISV relased
> application...
> but ISVs can "protect" with a personal EULA asserving their installed
> instance only to their application...
Andrea,
I wasn't even aware of the earlier ISV requirement. Your suggestion
of asking the user makes sense. I will try into incorporate "freedom
of choice" in my setup.
Many thanks for your reply.
Sincerely,
Dan
|||There is still the legal requirement that each software company has to
use/install its own instance.
I suggest you do that to prevent confusion: one instance name for all MSDE
deployments with all your apps.
Jan
"Dan" <ddeward@.msn.com> wrote in message
news:686970bc.0406151557.18a33cdf@.posting.google.c om...
> "Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:<2j852iFuc642U1@.uni-berlin.de>...
> Andrea,
> I wasn't even aware of the earlier ISV requirement. Your suggestion
> of asking the user makes sense. I will try into incorporate "freedom
> of choice" in my setup.
> Many thanks for your reply.
> Sincerely,
> Dan
|||hi Jan,
"Jan Doggen" <j.doggen@.BLOCKqsa.nl> ha scritto nel messaggio
news:%23BzqIn6UEHA.1164@.tk2msftngp13.phx.gbl...
> There is still the legal requirement that each software company has to
> use/install its own instance.
> I suggest you do that to prevent confusion: one instance name for all MSDE
> deployments with all your apps.
I've been told by Microsoft representative that this is no more an issue
becouse of the new "free" nature of MSDE...
it's no more mandatory that every separate ISV has it's own separate
instance, but every ISV can force it's own intalled instance not to serve
other ISV applications...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.8.0 - DbaMgr ver 0.54.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
Tuesday, February 14, 2012
distributed transaction conundrum
servers
(n.b. rose is the 'linked' server):
select top 10 hhid, c.s21_cust_num
from rose.customer.dbo.customer rc
join customer c
on rc.s21_cust_num = c.s21_cust_num
where c.store_num = 232
When I run it interactively from query analyzer, it executes without
error and produces a result set.
When I create a stored procedure and run it in the SQL debugger, I
receive the following set of DTC errors (which is the same thing that
happens when our program tries to update the table on the 'remote'
server).:
create procedure selectcustomer
as
select top 10 hhid, c.s21_cust_num
from rose.customer.dbo.customer rc
join customer c
on rc.s21_cust_num = c.s21_cust_num
where c.store_num = 232
go
Server: Msg 7391, Level 16, State 1, Procedure selectcustomer, Line 5
[Microsoft][ODBC SQL Server Driver][SQL Server]The operation could not
be performed because the OLE DB provider 'SQLOLEDB' was unable to
begin a distributed transaction.
[OLE/DB provider returned message: New transaction cannot enlist in
the specified transaction coordinator. ]
OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
ITransactionJoin::JoinTransaction returned 0x8004d00a].
There is a firewall between the two servers, but it seems strange that
the queries would run interactively but fail when running under
program control.
Is there an explanation for that?| The following statement joins two tables in databases on different
| servers
| (n.b. rose is the 'linked' server):
|
| select top 10 hhid, c.s21_cust_num
| from rose.customer.dbo.customer rc
| join customer c
| on rc.s21_cust_num = c.s21_cust_num
| where c.store_num = 232
|
| When I run it interactively from query analyzer, it executes without
| error and produces a result set.
|
| When I create a stored procedure and run it in the SQL debugger, I
| receive the following set of DTC errors (which is the same thing that
| happens when our program tries to update the table on the 'remote'
| server).:
|
| create procedure selectcustomer
|
| as
|
| select top 10 hhid, c.s21_cust_num
| from rose.customer.dbo.customer rc
| join customer c
| on rc.s21_cust_num = c.s21_cust_num
| where c.store_num = 232
|
| go
|
| Server: Msg 7391, Level 16, State 1, Procedure selectcustomer, Line 5
| [Microsoft][ODBC SQL Server Driver][SQL Server]The operation could not
| be performed because the OLE DB provider 'SQLOLEDB' was unable to
| begin a distributed transaction.
|
| [OLE/DB provider returned message: New transaction cannot enlist in
| the specified transaction coordinator. ]
|
| OLE DB error trace [OLE/DB Provider 'SQLOLEDB'
| ITransactionJoin::JoinTransaction returned 0x8004d00a].
|
| There is a firewall between the two servers, but it seems strange that
| the queries would run interactively but fail when running under
| program control.
--
This Technet article might help:
HOWTO: Troubleshoot MS DTC Firewall Issues
http://support.microsoft.com/default.aspx?scid=kb;en-us;306843
Cheers,
--
Eric Cárdenas
SQL Server support|||"Eric Cardenas" <ecard@.anonymous.com> wrote in message
news:<MmeQtGrvDHA.3520@.cpmsftngxa07.phx.gbl>...
> This Technet article might help:
> HOWTO: Troubleshoot MS DTC Firewall Issues
> http://support.microsoft.com/default.aspx?scid=kb;en-us;306843
> Cheers,
> --
> Eric Cárdenas
> SQL Server support
Been there, and yes, I've had that problem. But I have another problem, too.
I created a linked server pointed to the SQL server on my workstation. In
the following code both tables t1 and t2 are in the same db, but in the
sproc I'm referencing one through a linked server (called SQL01). It runs
from a query analyzer window but fails in the debugger, with the same 7391
error. Can you tell me why does it fail in the debugger?
drop table t1
create table t1
(k1 int identity, nk1 int, att1 char(10), date1 datetime, varchar1 varchar
(30))
drop table t2
create table t2
(nk2 int, att2 char (10), date2 datetime, varchar2 varchar (30))
insert into t1
(nk1, att1, date1, varchar1)
values
(100, 'pot', getdate(), 'this is a test record')
insert into t1
(nk1, att1, date1, varchar1)
values
(200, 'pan', getdate(), 'this is another test record')
go
drop procedure movedata
go
create procedure movedata
as
set xact_abort on
insert into sql01.pos_rawdata.dbo.t2
(nk2, att2, date2)
select nk1, att1, date1 from t1
update rt2
set varchar2 = t1.varchar1
from t1, sql01.pos_rawdata.dbo.t2 rt2 where t1.nk1 = rt2.nk2 and nk1 = 100
go
select * from t2
Thanks for any insights you might have.|||This is just a thought, but doesn't the debugger have to begin a transaction while debugging in order to allow you teh rollback option? If this is the case, then everything you need in order to begin a DISTRIBUTED TRANSACTION needs to be in place. I notice that you included the SET XACT_ABORT ON command, which I know is one of the required conditions. The rest can be found in the BOL.
I hope this helps somehow.
Matthew Bando
BandoM@.(REmove)CSCTechnologies.com
>--Original Message--
>"Eric Cardenas" <ecard@.anonymous.com> wrote in message
>news:<MmeQtGrvDHA.3520@.cpmsftngxa07.phx.gbl>...
>> This Technet article might help:
>> HOWTO: Troubleshoot MS DTC Firewall Issues
>> http://support.microsoft.com/default.aspx?scid=3Dkb;en-
us;306843
>> Cheers,
>> --
>> Eric C=E1rdenas
>> SQL Server support
>Been there, and yes, I've had that problem. But I have another problem, too.
>I created a linked server pointed to the SQL server on my workstation. In
>the following code both tables t1 and t2 are in the same db, but in the
>sproc I'm referencing one through a linked server (called SQL01). It runs
>from a query analyzer window but fails in the debugger, with the same 7391
>error. Can you tell me why does it fail in the debugger?
>drop table t1
>create table t1
>(k1 int identity, nk1 int, att1 char(10), date1 datetime, varchar1 varchar
>(30))
>drop table t2
>create table t2
>(nk2 int, att2 char (10), date2 datetime, varchar2 varchar (30))
>insert into t1
>(nk1, att1, date1, varchar1)
>values
>(100, 'pot', getdate(), 'this is a test record')
>insert into t1
>(nk1, att1, date1, varchar1)
>values
>(200, 'pan', getdate(), 'this is another test record')
>go
>drop procedure movedata
>go
>create procedure movedata
>as
>set xact_abort on
>insert into sql01.pos_rawdata.dbo.t2
>(nk2, att2, date2)
>select nk1, att1, date1 from t1
>update rt2
>set varchar2 =3D t1.varchar1
>from t1, sql01.pos_rawdata.dbo.t2 rt2 where t1.nk1 =3D rt2.nk2 and nk1 =3D 100
>go
>select * from t2
>Thanks for any insights you might have.
>
>.
>|||I think that was a really good call.
"Matthew Bando" <anonymous@.discussions.microsoft.com> wrote in message
news:02af01c3bf4a$bf73fa80$a101280a@.phx.gbl...
This is just a thought, but doesn't the debugger have to
begin a transaction while debugging in order to allow you
teh rollback option? If this is the case, then
everything you need in order to begin a DISTRIBUTED
TRANSACTION needs to be in place. I notice that you
included the SET XACT_ABORT ON command, which I know is
one of the required conditions. The rest can be found in
the BOL.
I hope this helps somehow.
Matthew Bando
BandoM@.(REmove)CSCTechnologies.com
Distributed Trans. Coordinator for DAO and RDO
We access 2 different databases in our program. One of them is SQL database, we aceess it via RDO and the other one is Access database, used via DAO.
Now we need to "synchronize" 2 transaction that are carried against these databases. More precisely, we have 2 transactions, one upon DAO connection, the second upon RDO, and we need them to obey 2-Phase Commit protocol rules when commiting.
Anyone has faced similar task? Do we need to handle the transaction synchronization ourselves or there is a sort of DTC that can handle the situation?
Thank You in advance.
The Jet/Access database engine does not support distributed transactions. You'd need to handle the transaction synchronization yourself.
David Sceppa
ADO.NET Program Manager
Microsoft