If object_id('tempdb.#Table_usage_data') is not nullĬreate table #Table_usage_data (ID int identity (1,1), varchar(255), datetime, datetime, datetime) Select as ,'last_boot' = 'days_since_last_boot' = datediff(d, getdate()) JOIN sys.databases AS d ON i.database_id =d.database_id Last_user_lookup = MAX(last_user_lookup), Use any of this SQL querys SELECT d.name, How do i see when someone last accessed the database? (PROD is the database name and the ODBC connection name, change to your need)Īlso check the C:\Windows\System32\drivers\etc\hosts file for any hard coded references to the DB2 server.Īdd row like this in the HOSTS file, to point to the DB2 server ip to maybe improve connection start speed Use a bat file to call the config file: if not exist "\Program Files\IBM\SQLLIB\BIN" goto stoppĭb2cmd db2setcp " db2 -tvf C:\db2script\catalog.sql "Ĭatalog.sql file can contain command like this More of the DB2 connection is stored in files, that are updated when you run command like this: ![]() “Driver”=”C:\\Program Files\\IBM\\SQLLIB\\BIN\\DB2CLIO.DLL” In windows registry you can see part of the ODBC settings in your setup If it does not work, start the program db2cwadmin to get a CMD prompt where you can run the db2 commands. Run command db2 list node directory to see what server you are connecting to. Can be C:\Program Files\IBM\SQLLIB\BIN folder. Go to a command prompt, and go to the folder where the DB2 active client files are installed. How see what server is in use for the DB2 ODBC connection, when the setup of the DB2 ODBC connection does not work. DB21061E Command line environment not initialized. “Azure Active Directory authentication allows you to centrally manage identity and access to your Azure SQL Database.”Ĭonnect Azure SQL from Data Factory using Managed Identity If you are Owner of the Azure database, then you do not need to be AAD Admin to be able to perform the change in SSMS. ![]() Select the database and click New Query: CREATE USER FROM EXTERNAL PROVIDERĪLTER ROLE ADD MEMBER īy adding a USER direct to the database, and not create a login in SQL, the user must provided the database name when it connects to AZURE SQL. Login to the AZURE SQL server with SSMS, use the Azure SQL server name to connect. Then you can add the resource to AZURE SQL with below command to give it access to the database. To make Azure Data Factory to connect to a Azure SQL resource with Managed Identity, you need to create a Managed identity for the ADF resource. Managed Identity can be replaced with the resource name, when referring to the object. Use the managed resource name instead of the object id. Principal ‘xyz’ could not be found or this principal type is not supported.Ĭannot add the principal ‘xyz’, because it does not exist or you do not have permission. Use around columns names to ensure they are not misunderstood.Įrror when try to create a user in AZURE SQL from a Managed Identity Object ID. Then to copy the data over to that new table use: INSERT INTO. To use a small set in a new table, create a new table first: CREATE TABLE. Then you can check the new table inside SSMS. Set a primary key, and change any date formatted columns to string or correct date format. Select the csv file and enter the name of the new table ![]() Right click on your database and select Tasks – Import Flat File. How to import a txt file to a table inside SQL server?ĭownload the file you want to import to your laptop or computer where SSMS is installed. ![]() This site can’t provide a secure connection.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |