Identify What Tables Are Being Access In SQL

Jul 20, 2005

The database I'm currently working with is very old and some of the
tables, SP, and views are not being used. I'm looking for a way to
identify what items are no longer in uses, or what items are
currently in use.

View 4 Replies


ADVERTISEMENT

How To Identify Hot Tables

Jul 20, 2005

Does anyone know how to identify the hottest, most active tables in adatabase?We have hundreds of users hitting a PeopleSoft database with hundredsof tables. We are I/O bound on our SAN, and are thinking of puttingthe hottest tables on a solid state (RAM) drive for improvedperformance. Problem is: which are the hottest tables? Would like todo this based on hard data instead of developer/vendor guesses.Any suggestions are much appreciated.

View 2 Replies View Related

Identify If A Tables Has An IDENTITY Column

Apr 1, 2008

Been poking around, but how can I tell if a an identity column exists in a table?

View 10 Replies View Related

Trying To Identify A Unique Record On Two Separate Tables

Oct 31, 2007

Hello,
I am working with a database that among other things uses multipart keys as the unique indexes which are not consistent from say one table where a parent record resides to another table which contains related child records. For example I am working with two tables right now, one that contains content that I'll call Contents and the other which contains Usage information about the contents (number of view, a rating and comments give by a customer) which I'll call ContentsUsage. The system that manages the data for the tables has a versioning system by which, whn a content item is added (first time) a "unique" id (guid) and a version number of 1 is created along with the rest of data items in the Contents table and likewise in the ContentsUsage table (essentially a one to one mapping) on the like named fields in that table. Now, each time a given record in the Contents table is updated a new version, with the same guid is created in the Contents and ContentsUsage table. So one side I have:ContentGUID > AAAAVersion > 1ContentGUID > AAAAVersion > 2And the other table (ContentsUsage)ContentGUID > AAAAVersion > 1ContentGUID > AAAAVersion > 2
While both of these tables have a quasi-unique record (row_id) of type char and stored as a guid neither obviously are the same in the two tables and having reviewed the database columns for these tables I find that the official unique key's for these tables are different (table 1, Contents combines the ContentGUID and Version) as the composite / mutli-key index, while table ContentsUsage uses the RowGUID as it's unique index. 
Contents                                   RowGUID (unique key)ContentGUIDVersionViewsRatingComments................RowGUID ContentGUID (unique key)Version (unique key)Description.....
Bearing this in mind I am unable of course to link directly the two tables by using the just the ContentGUID and have to combine the additional Version to I believe obtain the actual "unique" record in question. The question is in terms of writing queries, what would the most efficient query be? What would be the best way to join the two in a query? And are there any pitfalls with the current design that you can see with the way this database (or specifically these tables are defined)? It's something I inherited, so fire away at will on the critique. Having my druthers I would have designed these tables using a unique key of type int that was autogenerated by the database.
Any advice, thoughts or comments would be helpful.
Thanks,P. 
 
 
 
 

View 8 Replies View Related

SQL Server 2008 :: Identify Columns And / Or Tables From Records

Mar 3, 2015

I'm using MS SQL Server 2008 and I'm trying to figure out if it is possible to identify what tables / columns contain specific records.

In the example below information generated for the end user, so the column headers (Customer ID, Customer, Address, Phone, Email, Account Balance, Currency) are not necessarily the field names from the relevant tables, they are simply more identifiable headers for the user.

Customer ID CustomerAddress Phone Email Account Balance Currency
js0001 John Smith123 Nowhere Street555-123-456 jsmith@nowhere.com-100 USD
jd2345 Jane Doe 61a Down the road087-963258 jdoe@downthe road.com-2108 GBP
mx9999 Mr X Whoknowsville 147-852369 mrx@whoknows.com0 EUR

In reality the column headers may be called eg (CustID, CustName, CustAdr, CustPh, CustMail, CustACBal, Currency).

As I am not the generator of this report, I would like to know whether or not it is possible to identify the field names and / or what tables they exist in, if I were to used the report info to search for it. For example, could I perhaps find out the field name and table for "jd2345" or for "mrx@whoknows.com", because the Customer ID or Email may not be what the actual fields are called.

I'm not a DB admin and I don't have rights to do a stored procedure on the server. I'm guessing what I want is not so simple to do, but is it possible to do via a query?

View 2 Replies View Related

DB Design :: How To Identify Tables That Have Been Made On Temporary Basis Not Used

Sep 9, 2015

In the Operating environment databases, may be made tables in the database on a temporary basis but they are still yet and they are not removed, how to identify tables that have been made on a temporary basis are not used (don’t have any read & write records)? 

View 2 Replies View Related

DB Engine :: Using Metadata To Identify Which Objects Update Tables?

May 6, 2015

we run 2008 std edition (I believe r2 on this server, will double check) and I need to find a needle in a haystack.

I am looking at two tables and would like to learn which, if any objects on same db updates these tables.   I'd even live with any references to these tables.  I already know sql agent is out of the picture.  I'm looking for a static approach, not a monitoring one because its possible updates don't occur till month end.

Is there a way in sql server to query the answer to such a question using dmvs or something like dmvs?   What if I get bold and want to search all db's on this server for objects that update my two tables even across dbs?

In the mean time, i'll look at scripting all triggers and procs , and doing a search on these table names in the scripts. 

I don't know that I've ever seen a way to script all triggers before.  Procs I can easily script from the object explorer details.  But I'm not sure if in explorer details--> server objects --> triggers does what I hope it does.

View 6 Replies View Related

How To Identify Permissions For SQL Server Tables && Stored Proc. Via VB Code

Jul 20, 2005

I'm writing an application using VB 6.0 as the front-end GUI, and theMSDE version of SQL Server as the back-end (it's a program for areally small # of users --- less then 3-4).I'm trying to determine, through the Visual Basic interface, thepermissions of each user that's using the application on his/hermachine.For example, let's say I'm user "Michael" that's sitting down at mymachine using the app. I've written. The security for logging intoSQL Server will be setup using Windows Security (Trusted Connection)as opposed to Windows & SQL Server security. When Michael accesses aparticular form in the VB 6.0 GUI, I want to run some code thatautomatically checks Michael's permission levels on the underlyingtable (actually, a stored procedure supplying the data from the table)that supplies the data to the form he's looking at and then give himsome feedback on the form as to what type of permissions he has whilehe's browsing through the data shown in the form.For example, Michael opens a particular form, code in the backgroundis run to identify that this is Michael accessing the form, the codereturns a value that identifies what type of permissions he has on thedata in the form, and a text box on the form informs Michael (forexample) that he only has read-only permissions to the data he isviewing and cannot edit any of the data.As another example, user Karen sits down at her computer, logs intothe application, opens the same form that Michael just opened, thecode is run in VB to detect the level of permissions she has on thedata being displayed in the form, and the text box on the form informsher that she has editing permissions on the data in the underlyingtable.Etc...If anyone can post an example of the code they use in accomplishingthis task in an application they've written, I'd really appreciate apoint in the right direction or a real-world example that's beenimplemented by one of you. I've written several apps. thus far usingMSDE as the back-end, but the previous apps. I've written were forclients that didn't care about restricting access to theapplication... everyone could pretty much use the application as theydesired and do anything they desired to the data.The current client I'm writing the app. mentioned here for wants tohave security in place to where various users access the applicationwith various levels of permissions to do stuff (or *not* do stuff) tothe data in the application.Thanks very much in advance for any assistance / code provided!Sincerely,Brad McCollumJoin Bytes!

View 1 Replies View Related

Why Would Tables Pulled In From ODBC In Access Be Different Than Tables In SQL 2005 Tables?

Jan 24, 2008

I'm new to my company, although not new to SQL 2005 and I found something interesting. I don't have an ERD yet, and so I was asking a co-worker what table some data was in, they told me a table that is NOT in SQL Server 2005's list of tables, views or synonyms.

I thought that was strange, and so I searched over and over again and still I couldn't find it. Then I did a select statement the table that Access thinks exists and SQL Server does not show and to my shock, the select statement pulled in data!

So how did this happen? How can I find the object in SSMS folder listing of tables/views or whatever and what am I overlooking?

Thanks,
Keith

View 4 Replies View Related

Import Access Tables (set Up As Pass-through Table Types To Oracle )--OLE DB Connection To Access Cannot See Them

Mar 17, 2008

Access Connection

create a new Connection Manager by right-clicking in the Connection Managers section of the design area of the screen. Select New OLE DB Connection to bring up the Configure OLE DB Connection Manager dialog box. Click New to open the Connection Manager. In the Provider drop-down list, choose the Microsoft Jet 4.0 OLE DB Provider and click OK.
Browse to the Access database file and connection set up---all good!!!

Dataflow task
Add an OLE DB Source component
Double-click the icon to open the OLE DB Source Editor. Set the OLE DB Connection Manager property to the Connection Manager that I created . Select Table from the Data Access Mode drop-down list.
I cannot see the tables set up as set up as pass-through table types to a Oracle 9i db

Any ideas please help

thanks in advance
Dave

View 2 Replies View Related

List Groups That Have Access To Application And Use Grid Format To Show Access To Specific Tables

Jun 23, 2014

i am currently working on designing a database for a bank as a school project for my database class. We have to draw up an entity relationship diagram, Sql tables, database size estimate etc. I am currently working on the security portion of the project. I need to list the groups that have access to my application and use a grid format to show access to specific tables.

I am currently working on designing a database for a bank as a school project for my database class. We have to draw up an entity relationship diagram, Sql tables, database size estimate etc. I am currently working on the security portion of the project. I need to list the groups that have access to my application and use a grid format to show access to specific tables.

Role Loans Payments Transactions Accounts Customer Emplo
Database Admin SUID SUID SUID SUID SUID SUID
Branch Manager SUI SUI SUI SUI SUI SUI
Internal Auditor S S S S S S
Loan Officer SUID SUI SUI S S
Tellers S S S S SU
Customers U

View 1 Replies View Related

Solution!-Create Access/Jet DB, Tables, Delete Tables, Compact Database

Feb 5, 2007

From Newbie to Newbie,



Add reference to:

'Microsoft ActiveX Data Objects 2.8 Library

'Microsoft ADO Ext.2.8 for DDL and Security

'Microsoft Jet and Replication Objects 2.6 Library

--------------------------------------------------------

Imports System.IO

Imports System.IO.File





Code Snippet

'BACKUP DATABASE

Public Shared Sub Restart()

End Sub



'You have to have a BackUps folder included into your release!

Private Sub BackUpDB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackUpDB.Click
Dim addtimestamp As String
Dim f As String
Dim z As String
Dim g As String
Dim Dialogbox1 As New Backupinfo


addtimestamp = Format(Now(), "_MMddyy_HHmm")
z = "C:Program FilesVSoftAppMissNewAppDB.mdb"
g = addtimestamp + ".mdb"


'Add timestamp and .mdb endging to NewAppDB
f = "C:Program FilesVSoftAppMissBackUpsNewAppDB" & g & ""



Try

File.Copy(z, f)

Catch ex As System.Exception

System.Windows.Forms.MessageBox.Show(ex.Message)

End Try



MsgBox("Backup completed succesfully.")
If Dialogbox1.ShowDialog = Windows.Forms.DialogResult.OK Then
End If
End Sub






Code Snippet

'RESTORE DATABASE

Private Sub RestoreDB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

RestoreDB.Click
Dim Filename As String
Dim Restart1 As New RestoreRestart
Dim overwrite As Boolean
overwrite = True
Dim xi As String


With OpenFileDialog1
.Filter = "Database files (*.mdb)|*.mdb|" & "All files|*.*"
If .ShowDialog() = Windows.Forms.DialogResult.OK Then
Filename = .FileName



'Strips restored database from the timestamp
xi = "C:Program FilesVSoftAppMissNewAppDB.mdb"
File.Copy(Filename, xi, overwrite)
End If
End With


'Notify user
MsgBox("Data restored successfully")


Restart()
If Restart1.ShowDialog = Windows.Forms.DialogResult.OK Then
Application.Restart()
End If
End Sub








Code Snippet

'CREATE NEW DATABASE

Private Sub CreateNewDB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

CreateNewDB.Click
Dim L As New DatabaseEraseWarning
Dim Cat As ADOX.Catalog
Cat = New ADOX.Catalog
Dim Restart2 As New NewDBRestart
If File.Exists("C:Program FilesVSoftAppMissNewAppDB.mdb") Then
If L.ShowDialog() = Windows.Forms.DialogResult.Cancel Then
Exit Sub
Else
File.Delete("C:Program FilesVSoftAppMissNewAppDB.mdb")
End If
End If
Cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Program FilesVSoftAppMissNewAppDB.mdb;

Jet OLEDB:Engine Type=5")

Dim Cn As ADODB.Connection
'Dim Cat As ADOX.Catalog
Dim Tablename As ADOX.Table
'Taylor these according to your need - add so many column as you need.
Dim col As ADOX.Column = New ADOX.Column
Dim col1 As ADOX.Column = New ADOX.Column
Dim col2 As ADOX.Column = New ADOX.Column
Dim col3 As ADOX.Column = New ADOX.Column
Dim col4 As ADOX.Column = New ADOX.Column
Dim col5 As ADOX.Column = New ADOX.Column
Dim col6 As ADOX.Column = New ADOX.Column
Dim col7 As ADOX.Column = New ADOX.Column
Dim col8 As ADOX.Column = New ADOX.Column

Cn = New ADODB.Connection
Cat = New ADOX.Catalog
Tablename = New ADOX.Table



'Open the connection
Cn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Program FilesVSoftAppMissNewAppDB.mdb;Jet

OLEDB:Engine Type=5")


'Open the Catalog
Cat.ActiveConnection = Cn



'Create the table (you can name it anyway you want)
Tablename.Name = "Table1"


'Taylor according to your need - add so many column as you need. Watch for the DataType!
col.Name = "ID"
col.Type = ADOX.DataTypeEnum.adInteger
col1.Name = "MA"
col1.Type = ADOX.DataTypeEnum.adInteger
col1.Attributes = ADOX.ColumnAttributesEnum.adColNullable
col2.Name = "FName"
col2.Type = ADOX.DataTypeEnum.adVarWChar
col2.Attributes = ADOX.ColumnAttributesEnum.adColNullable
col3.Name = "LName"
col3.Type = ADOX.DataTypeEnum.adVarWChar
col3.Attributes = ADOX.ColumnAttributesEnum.adColNullable
col4.Name = "DOB"
col4.Type = ADOX.DataTypeEnum.adDate
col4.Attributes = ADOX.ColumnAttributesEnum.adColNullable
col5.Name = "Gender"
col5.Type = ADOX.DataTypeEnum.adVarWChar
col5.Attributes = ADOX.ColumnAttributesEnum.adColNullable
col6.Name = "Phone1"
col6.Type = ADOX.DataTypeEnum.adVarWChar
col6.Attributes = ADOX.ColumnAttributesEnum.adColNullable
col7.Name = "Phone2"
col7.Type = ADOX.DataTypeEnum.adVarWChar
col7.Attributes = ADOX.ColumnAttributesEnum.adColNullable
col8.Name = "Notes"
col8.Type = ADOX.DataTypeEnum.adVarWChar
col8.Attributes = ADOX.ColumnAttributesEnum.adColNullable



Tablename.Keys.Append("PrimaryKey", ADOX.KeyTypeEnum.adKeyPrimary, "ID")


'You have to append all your columns you have created above
Tablename.Columns.Append(col)
Tablename.Columns.Append(col1)
Tablename.Columns.Append(col2)
Tablename.Columns.Append(col3)
Tablename.Columns.Append(col4)
Tablename.Columns.Append(col5)
Tablename.Columns.Append(col6)
Tablename.Columns.Append(col7)
Tablename.Columns.Append(col8)



'Append the newly created table to the Tables Collection
Cat.Tables.Append(Tablename)



'User notification )
MsgBox("A new empty database was created successfully")


'clean up objects
Tablename = Nothing
Cat = Nothing
Cn.Close()
Cn = Nothing


'Restart application
If Restart2.ShowDialog() = Windows.Forms.DialogResult.OK Then
Application.Restart()
End If

End Sub








Code Snippet



'COMPACT DATABASE

Private Sub CompactDB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

CompactDB.Click
Dim JRO As JRO.JetEngine
JRO = New JRO.JetEngine


'The first source is the original, the second is the compacted database under an other name.
JRO.CompactDatabase("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:Program

FilesVSoftAppMissNewAppDB.mdb; Jet OLEDB:Engine Type=5", "Provider=Microsoft.Jet.OLEDB.4.0;

Data Source=C:Program FilesVSoftAppMissNewAppDBComp.mdb; JetOLEDB:Engine Type=5")


'Original (not compacted database is deleted)
File.Delete("C:Program FilesVSoftAppMissNewAppDB.mdb")


'Compacted database is renamed to the original databas's neme.
Rename("C:Program FilesVSoftAppMissNewAppDBComp.mdb", "C:Program FilesVSoftAppMissNewAppDB.mdb")


'User notification
MsgBox("The database was compacted successfully")

End Sub

End Class

View 1 Replies View Related

Access 2007 Linked Tables (vs Access 2003)

May 15, 2007

We migrated a MS Access 2003 mdb into MS Access 2007. The mdb has linked tables to SQL Server via a DSN and utilizes a mdw file. In 2003, the username/password is "passed" to SQL Server, so the UID/PWD that is used for opening the mdb, is used in SQL Server.



Opening the same file in 2007 using the same mdw, gives a secondary login on SQL Server.



Is there a way to have MS Access 2007 pass the UID/PWD to SQL Server on linked tables, the same way that 2003 does?



Thanks!

View 1 Replies View Related

Cannot Get Access To My Access 2003 Database Tables

Feb 5, 2007

I developed a database with Access 2003 and everything was working good until my tech came in and reformated my hard drive and install a new Ghost image that met our company standards.

Now I cannot go in and make any changes to any of the tables, queries and forms. All of this started when a new Ghost image was installed on my pc.

The message I get when I try to open my database is "You do not have permission to run "tblSwitchboard." I get the same error message when I try to do anything at all on the database.

I am at a loss as to what to do. Please help.



View 1 Replies View Related

Access To SQL Tables

Jan 24, 2001

If I want to disable access to a single table on an SQL server on a periodic basis can anyone tell me how to do it.

Thanks

View 1 Replies View Related

Import Access Tables Into SQL

Nov 6, 2007

Still really new at all this, but learning lots thanks to this forum.
I was wondering - is there a way to import Access tables into my SQL Server 2005 ?
(The Data and the Table Design?) 
 
 

View 3 Replies View Related

Readonly Access On Tables

Mar 1, 2005

Hi,

We have a SQL server database on remote server. We are using ODBC connection to read and write into the table. But we have another user wants to retrieve(readonly access) our data on his pages. How can we create a user on our database and grant readonly access to that user?

Thanks..

View 3 Replies View Related

Seeing SQL 7.0 ##temp Tables In Access 97

May 2, 2001

The problem is we need local tables in Access for SubReports (can't use store procedures as record source for this), therefore trying to create temp table and link to Access for each report instance.


When we create the ## type table in tempdb this cannot be linked from Access (cannot be seen via DSN).
The only other option we can find is doing
CREATE TABLE tempdb.dbo.[tablename]
but this requires the user to have admin permissions and therefore be 'dbo' on tempdb and not 'guest'.

Any clues?

Palmy

View 4 Replies View Related

How To Access Tables From A Dynamic

Jun 9, 2004

I have a procedure that takes database name and queries some tables in the database specified. I am trying to access tables like this:

SELECT COUNT(id) FROM @dbname..sysobjects WHERE type='U'

How can I access the tables while the database name is in a variable.

Thanx.

View 2 Replies View Related

Access/SQL Linked Tables

Nov 17, 2005

I have linked a number of tables from a SQL database to a Access front end. I am able to update all but one of the tables (the main table I need!!!). I get the error, cannot update record as it has been changed by another user although there is no other user. I believe it may be to do with the way the recordset is linked to the access database or the referential integrity of the table associations in the SQL database.

I can change the data using query analyser without issue.

Any help would be greatfully apreciated.

View 7 Replies View Related

Combining Tables In Access

Jul 1, 2014

I am trying to do a really weird combination of an Append/Union query..I'm doing most of my commands through macros and queries.how to do a normal Append/Union/Create queries but I am trying to do something kind of weird. If table X has rows A, B, C, and D, and table Y has a column with rows 1, 2, 3, and 4... I need the values in table Y to be assigned to each individual row in table X. Is there a way to create a new table where the columns merge such that values can be assigned like:

X Y
A 1
B 1
C 1
D 1
A 2
B 2
C 2
D 2
A 3
B 3

View 3 Replies View Related

Creating Access Tables With SQL

Feb 25, 2004

I'm currently writing a web application in Coldfusion which uses a Access 2000 db. I can create tables in SQL ok but am having problems with the Autonumber type. Any ideas?

View 8 Replies View Related

How Can I List The Tables If I Have SA Access?

Apr 3, 2008

Hi,

I'm very new in SQL Server. Please help me to combine the connection string to the server.
62.33.197.7
login: sa
pwd: S#15trLdatabase
What would be the connection string then? And can I get the tables names if I have the connection string?

View 5 Replies View Related

Import Access Tables To SQL

Nov 16, 2006

I have some Access tables that I want to import into SQL. I can do this using the AllTasks/ImportData. However if my Access table has a zero length string in a field this is imported into the SQL table as <NULL>. How can I make it import it as a zero length string ?

View 2 Replies View Related

Logins To Only Access Certain Tables

Feb 13, 2007

i want to be able to create a login to my database that cannot access the whole db but only certain tables.

how do i do this in sql 2005?

View 1 Replies View Related

Connecting SQL Tables To Access

Oct 11, 2007

I have been tinkering with connections to SQL Server 2000 from Access 2000 for a couple of days without much luck.

My most recent attempt is the following code to the click event of a command button on a form. Most of this code was acquired from other places on the net.

Dim oConn As ADODB.Connection

Set oConn = New ADODB.Connection
oConn.Open "Provider=sqloledb;" & _
"Data Source=Hed001;" & _
"Initial Catalog=My_Views;" & _
"User Id=;vel007" & _
"Password=driver"

Dim oRS As ADODB.Recordset
Set oRS = New ADODB.Recordset

oRS.Open "Select * from VOrder_Header", oConn


Amazingly, it does not error out. But what do I do next to see the records in VOrder_Header?

Just a newb blazing at trail here in the unknown...

View 1 Replies View Related

Cannot Access Any Tables In Queries

Nov 7, 2007



I am using SQL2005 (Installed on VISTA). It was running smoothly until today....for some reason I cannot access any tables in queries that I try to run in Management Studio. I can open the tables and see the information, but all queries I try to run result in the following error:


Msg 208, Level 16, State 1, Line 1

Invalid object name 'DBO.BEYLEVEL16'.


I tried to run simple select queries on other tables but I get the same error message. Do not understand, eveything was working fine yesterday.

Any suggestions greatly appreciated.
Thanks

View 9 Replies View Related

Access Tables Without Schema

Oct 11, 2006

Hello

in my database I have schema "x". I have user "x" who is database owner, The user has schema "x" as default schema and is owner of this schema.

Now there are tables "x.mytable"

If I connect to the db as "x" and try

select * from mytable

I get an error "Invalid object name", I have to write it this way

select * from x.mytable

Why?



Thank you

Eckard



View 5 Replies View Related

Linking Tables From MS Access

Apr 21, 2015

Is there a way to link MS Access tables with SQL Server tables so the client app sees them as tables from one database?

I have tried linked server but it appears that it gets stale after a while and needs to be re linked from time to time which is not very practical.

View 2 Replies View Related

READonly Access To Set Of Tables...!

Dec 7, 2007

Dear All,

I need experienced advice on Security in SQL Server 2005. All I need specific advice on restrcting users to access SQL Server database to have only READ access for certain tables.

Thanks,

View 3 Replies View Related

Import Tables From MS Access

Dec 17, 2006

Hi all,
I've just installed the Sql Server 2005 Express Ed + Management Studio Express and I can't get how to import data from a MS Access 2003 file. From what I've read is not possible to do through the Management Studio Express so is there any other tool to do that?

Thanks in advance,

Marc Soleda

View 7 Replies View Related

SQL 2000 Linking Tables To Access

Oct 23, 2004

Hi, I need to link an Access 97 database to sql server 2000. I can't use Enterprise Manager so I have created a simple asp.net page using sp_addlinkedserver and sp_addlinkedsrvlogin.

The mdb file is on a network share, then I have permissions problems: here is a sample

sp_addlinkedserver 'test', 'Access 97', 'Microsoft.Jet.OLEDB.4.0',
'\SVKNFS080Pshareaccess97db1.mdb', 'efco'

sp_addlinkedsrvlogin 'test', false, 'sa', 'Admin', NULL

I have no problems executing these stored procedures (the linked server is added in sysservers table), but when I try to query the access database

SELECT * FROM test...profile

I get this error

Microsoft][ODBC SQL Server Driver][SQL Server][OLE/DB provider returned message:
The Microsoft Jet database engine cannot open the file '\SVKNFS080Pshareaccess97dboutlet.mdb'. It is already opened exclusively by another user, or you need permission to view its data.]

The mdb file is not locked, I think is a permission's problem.

Can anyone help me ?

Thanks in advance

View 1 Replies View Related

Unable To Access Tables Or Do Insert

Nov 7, 2005

Hi,i'm at wit's end here.  My problem:I'm trying to do an insert into a table with ExecuteNonQuery and keep getting the error:"input string is not in correct format"I am trying to insert a string into sql server 2000 type varchar(length=50) and it won't work so instead I just decided to get a count on the number of records existing and I got the same error (see above) when I tried this.  The code for this last part:<CODE>
Dim MyCmd As New System.Data.SqlClient.SqlCommand.' other code here.......Dim TempSQL As String = "SELECT COUNT(*) FROM tblUsers"
MyCmd.CommandType = CommandType.Text
MyCmd.CommandText = TempSQLDim a As Object = MyCmd.ExecuteScalar()</CODE>I am really stuck on this and cant find the answer anywhere online.Cheers,Joe

View 13 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved